Auto Centering moves out of the experiment tabs to its own row between
Manual sample and Exp. Config., with an apply-after-mount checkbox that
re-runs it on every detected sample mount (guarded against firing on GUI
startup). Draw a Grid now only shows on the Raster scan tab.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Click is no longer the only way back to the "?" badge: moving the
pointer off the expanded box, or out of the widget entirely, folds it.
Checked before the interaction gate so it works in viewing mode too.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bottom-right corner shows the hovered pixel coordinates with a grey
1-2-5 scale bar above them, derived from geom.pixel_in_mm and the
current zoom. Works in viewing mode (before the interaction gate),
clears on leave, and skips drawing outside the image.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
basedpyright requires _admin_tip_anchor to exist after __init__, so the
anchor is created eagerly instead of lazily. Cover the red-tip branch and
the status-bar menu gate; the menu test swaps in a QMenu subclass with a
no-op exec because PySide method lookup ignores class-attr monkeypatches.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Beam location, Beamstop alignment and Flux measurement grey out for
non-staff in the state strip and the status-bar transitions menu. All
"not admin" denials now show as an auto-dismissing QToolTip on a
Catppuccin red wash instead of a click-to-close QMessageBox.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Operable controls (Fast Shutter, State, p-group, Session) group right
via addPermanentWidget and share one hover affordance - hand cursor +
underline - now owned by ClickableLabel; ValueLabel opts out for the
passive readouts, and the unwired busy label becomes a plain QLabel.
Cryo sits first in the operable group but stays passive: a cryo
operation is planned (TODO in status_bar.py), the placement just
reserves its spot.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same exception as the motion watch: busy in Sample alignment is the
alignment itself, and the sample motion is watched in these very
views - the curtain hid exactly what the user needed to see. Gated
at both style call sites (sample camera and the Axis views); the
session-driven 'In viewing mode' badge is unaffected.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Robot motion switches to the combined view; alignment beginning
switches straight back while busy is still set, and staying busy in
alignment never re-triggers. Piggybacks on the init test's window -
extra MainWindow constructions feed the PySide teardown flake.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
_autoscale now defaults on, so the view fits from the first layout
(the constructor's placeholder already carries the camera size and
resizeEvent refits on every resize). update_pixmap additionally
refits when the frame size changes - the real stream resolution can
differ from the placeholder, and only a view resize refit before.
Right-click 'Scale to fit' still toggles back to 1:1.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The queue engine keeps insertion order and Run pops its head, but the
Queued view sorted by the dewar table's header sort - the top row was
not what runs next. set_queued_ids now keeps the order it is fed (the
queue model's order) and the Queued view displays exactly that; header
clicks no longer reorder it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Status flag on the left (same rich-text scheme as the status bar,
theme-aware via set_theme), Open/Close buttons on the right, wired
to the same daq.open_shutter/close_shutter slots staff-gated in
main_window.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The status column holds no sortable data, so its header click slot
was free: it now does Ctrl+A, pairing with the Unmeasured chip to
grab everything still to be done in one motion. The sort indicator
is put back afterwards - the click drags it onto '#' even though
the model ignores sorting there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Confirmed by Dawn: any rotation data counts as measured; unmeasured
is exactly rotation count 0. The old > 1 rule left single-rotation
samples looking like still-to-do work in the Unmeasured view.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New 'Current energy / lambda' row above the setpoint, fed per DAQ
tick from diffraction.energy_keV; the setpoint row is renamed
'Set Energy (keV)' so 'what is' and 'what to set' are distinct.
Guards energy 0.0 (server's detector-unavailable fallback) because
the wavelength property divides by it. The copied energy row in the
experiment configuration is renamed to match.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Complement of Measured (rotation count <= 1): one click shows
everything still to be done, so it can be selected wholesale and
queued. Plain chip like All - unmeasured rows carry no tint, so
there is no legend color to wear; cross-status marks (queued/
flagged) show like in the Measured view.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
While Moving, the target state sat solid blue and read as already
reached. An opacity pulse (QGraphicsOpacityEffect + QPropertyAnimation)
marks it as in progress; a stylesheet animation would repolish the
button every frame, which the guarded updates in _apply_highlight
exist to avoid.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per-window installs of the two QApplication-level filters (cursor,
wheel guard) stacked one stale copy per MainWindow; now installed once
per process, parented to the app. closeEvent overrides in the baton
dialogs replaced by finished.connect(timer.stop); keyPressEvent in
VideoGraphicsView replaced by WidgetShortcut QShortcuts; hover
enter/leave overrides in PlayPauseButton replaced by underMouse();
ValueLabel inherits ClickableLabel instead of duplicating its
mousePressEvent. Dead raster-timer branch and a PyQt5-era
event-position fallback deleted; redundant try/except and getattr
guards dropped now that class-level defaults cover pre-init reads.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The locked-banner and Beamline-tab-bar filters were installed mid
__init__, but MainWindow.eventFilter reads sample_lists_tabs, which is
created later - every event delivered in between raised AttributeError
inside the filter ('Error calling Python override of eventFilter()'
spam) and broke widget teardown, cascading errors across CI tests and
wedging the pxiii_bec job. Filters now install late, next to
installEventFilter(self), and the filter guards its attribute reads so
construction/teardown-time events can never raise.
Also fold the staff-gate assertions into test_main_window_init: every
extra MainWindow construction raises the odds of the pre-existing
PySide SystemError flake, so don't build a window just for them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diff coverage vs main now 100 percent from the gui suite alone:
non-staff locked banners and both gated-tab popups, remote-close
bookkeeping in update_daq_status, smargon staged moves, camera More
link and Alt-wheel axis fallback, number box relimits, energy row
emit, and the gui.main() banner/graceful-exit path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Promote the illumination panel's __main__ self-check to a real pytest
file so CI counts it, add busy-overlay render checks (status text
paints, video view routes through it), and cover the motor group's
incomplete-entry and below-min Enter paths. Local diff coverage from
the gui suite alone: 82 percent.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rename NumberLineEdit.validator to range_validator: the instance attr
shadowed QLineEdit.validator() and broke type checking at call sites.
Annotate the smargon _move_axes dict and cast the stand-in self in the
prediction subscriber test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
Chi/Phi boxes in the Smargon tab no longer move on Enter: edits stage
the target (orange), the Move button sends all staged axes at once
(green), and boxes return to neutral when the motor reports arrival.
Out-of-range entries stay red and are never sent; limit tips pop as
tooltips. MotorMoveGroup is opt-in per box so other panels can adopt
the same logic later.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
Sniff for '{' before JSON-parsing zmq parts: JPEG frames start with 0xff
and raised UnicodeDecodeError on every frame. Stop closing the socket
from the GUI thread in stop(): zmq sockets are not thread-safe and the
concurrent close/recv tripped the signaler.cpp POLLIN assertion (core
dump); run() closes it in its own thread via the 500ms RCVTIMEO.
uv.lock: sync version to 0.8.3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
draw_busy_badge in busy_overlay renders the title+subtext pill once;
the sample camera and axis video overlays both delegate to it instead
of keeping diverging copies. The axis panel's dot+label status pill and
its per-theme QSS go away with it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The two tabified bottom docks left their switcher tabs stranded at the
window bottom; one Information dock with proper tabs mirrors the Sample
List dock's layout. LogDock becomes the LogPanel widget with mirror
views for the pop-out and a reveal_requested signal so the owner
controls visibility (Ctrl+Shift+L, notifications).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diff coverage vs main was 77%, under the 80% CI gate; the new camera
help/error/badge code and the theme+layout main_window paths were the
uncovered bulk. Locally: 82%.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Optional _popout_view is assert-narrowed once after opening; the
unguarded accesses were the last three diff-gate violations.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New tests for what the port added: status tint priority and
context-dependent chip filters on the dewar/queue model, the
right-button wheel guard (motor protection), PopoutWindow edge maths,
manual-resize fallback, close-hides behavior and DockTitleBar, the
chip drag-drop relabeling, and the console-log pop-out mirror. The
widgets' __main__ self-checks are superseded by these and removed.
Brings PR diff coverage from 70% to 81% (gate: 80%).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The frozen #+status column shifted data columns +1, so the User-column
model tests move from index 5 to 6; ruff import-sort fixes for
main_window and log_panel ride along.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanical swap of hardcoded color literals for styles.py constants and
qcolor() across panels, models, and scan_logic. portrait_mode.py drops
its private palette block; beamline_controls and data_collection_settings
gain object names so the new $border QSS rules can target them. The
status-panel test asserts the palette hex instead of 'red'.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Availability sets (routes + menu shortcuts, Moving/unknown), signal
gating, palette and cursors per availability, red/blue active states,
adaptive label wrapping, left-click hint paths, hover-hint timer
lifecycle, and pending-target clearing. Lifts the PR diff coverage back
over the 80 percent gate (measured 88 percent locally).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A fresh GUI shows only the banners; the Beamline state panel keeps its
own expanded default. A user's saved per-title states still override.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- ruff format and import ordering (main_window, data_collection_settings,
beam_center_panel, beamline_state_panel)
- rename unused unpacked variable in test_title_label
- replace the mousePressEvent monkeypatch on the beamline state title
with a proper eventFilter so basedpyright accepts the diff
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TitleLabel gains an optional collapsible mode: whole-banner click target,
bare +/- glyph (no pill background), per-title collapsed state persisted
in QSettings, and an expand() helper. Banners are halved to 25px with
plain text + QSS font (H3 margins would clip vertically).
- convert Zoom, Light, Omega, Smargon, Sample camera, Monochromator,
ABR meas. pos., Beam mark, Beam center, Beam size, Dataset path and
Loop centering to collapsible banners
- new collapsible Exp. Config. section wrapping the scan tabs
- move Manual sample from a bottom dock into the left column between
Dataset path and Exp. Config.; Ctrl+M now expands it instead of
raising the dock
- Beamline state banner restyled to match (25px, plain font, bare
glyph, whole banner clickable)
- universal 11px banner gap via tighten_column() shared by both panel
columns and the left column stack; ABR banner spans all grid columns
and file path / manual sample drop side margins so widths align
- abort button sits under the tabs instead of pinned to the bottom
- unit tests for the collapse behavior
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>