23 Commits
Author SHA1 Message Date
duan_jandClaude Fable 5.1 90f653386a fix(gui): app-level event filters tolerate PySide's stray QWidgetItem
CI / lint (pull_request) Successful in 1m9s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test (3.14) (pull_request) Successful in 1m11s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m16s
CI / test-with-coverage (pull_request) Successful in 1m40s
CI / coverage-analysis (pull_request) Successful in 3s
CI / test (3.13) (pull_request) Successful in 58s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m14s
Docs build and publish / docker (push) Successful in 14s
CI / lint (push) Successful in 35s
CI / test (3.12) (push) Canceled after 42s
CI / test (3.13) (push) Canceled after 37s
CI / test (3.14) (push) Canceled after 37s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 27s
CI / test-with-coverage (push) Canceled after 27s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 26s
CI (3.12, PR 232) failed test_font_zoom_keeps_frozen_column_aligned_and_reautosizes
with a pytest-qt CALL ERROR: PySide 6.9 handed both app-level filters a
QWidgetItem instead of a QEvent during layout teardown, and event.type()
raised. The wheel guard now keys on isinstance(event, QWheelEvent) and
returns False itself instead of super().eventFilter() (which type-checks
its arguments and would raise the same way); the cursor filter ignores
anything that is not a QEvent. Regression test for each.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 21:12:55 +02:00
duan_jandClaude Fable 5.1 1ea607ba56 fix(gui): keep queue head until /status confirms unmount on Mount next
Mount next popped the mounted head before posting the exchange, so a
failed unmount dropped a sample that was still on the gonio. Now the head
stays queued and is removed only when /status shows a different (or no)
sample mounted; a failed exchange leaves the queue intact for a retry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 18:44:56 +02:00
duan_jandClaude Fable 5 33239bf51f refactor: drop the camera-region splitter, side columns fixed again
User decision: the drag-resize bars beside the Sample camera view are
not wanted - the side panels don't need resizing. Back to the plain
HBox with zoom-scaled fixed column widths; the View-menu collapse
toggles and the camera minimum-width clamp stay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 14:37:19 +02:00
duan_jandClaude Fable 5 e31b0e9a6f fix: cast the mocked daq.unmount for basedpyright on CI
CI's basedpyright (latest from the index, newer than the local venv)
types win.daq as the real DAQWorker, so assert_not_called on the
patched-in MagicMock flagged the two new gate-test lines.

Note: the pytest job segfaults are NOT from this branch — plain
origin/main crashes 2/4 runs under PySide6 6.11.2 (what CI installs;
uv.lock pins 6.9.0 which is stable). Needs a separate dependency fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 13:28:16 +02:00
duan_jandClaude Fable 5 809959df33 feat!: remove Playlist Mode and Automation View, unpin window minimum
Why the width shrink only worked after a Playlist Mode round-trip:
Qt auto-pins a top-level window's minimum size to its layout minimum,
and returning from Playlist Mode hid the Information dock (and every
side dock), which happened to drop that layout minimum. The main view
now gets an explicit small minimum (320x240) which disables the
auto-pin outright, so the window shrinks directly and the dock
contents clip or scroll instead.

The Playlist Mode (Ctrl+6) and Automation View (Ctrl+5) prototypes
are deleted per user decision: panels, pages, the content stack (the
standard page is the only page left), menu actions, camera fan-out to
their view copies, portrait alert interceptors (now plain runtime
notification routers), and their styles (portraitRoot, compact*
cards, COMPACT_* and FONT_HERO knobs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 13:28:16 +02:00
duan_jandClaude Fable 5 fd0edffdc9 WIP: resizable camera region, menu panel collapse, zoom ladder
- center splitter: left controls | camera tabs | beamline column;
  drag resizes the camera width, View menu check actions collapse
  the fixed-width side panels (no on-screen buttons)
- font zoom restricted to a 100/125/150 percent ladder; the
  fixed-width side boxes scale with it so zoomed text does not clip
- camera tab widget min width clamped to 1/3 of its natural minimum
- resize bars: short centered grip PNGs shared by QMainWindow
  separators and QSplitter handles, single style source in styles.py
- window min width 1244 -> ~376: automation row and sample-list
  chip row stop propagating their natural minimums (Ignored-width
  hosts), portrait page fixed width removed (portrait mode pins the
  window width itself)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 13:28:16 +02:00
duan_jandClaude Fable 5 1fc72649b0 feat: text zoom shortcuts and high-contrast resize lines
- Ctrl+plus / Ctrl+minus / Ctrl+0 (and View menu entries) scale the QSS
  FONT_* ladder and the application default font together; the scale is
  clamped to 0.8-1.6 and persisted in QSettings appearance/font_scale.
- Resize gutters keep a 5px hover/drag region but paint only a 2px line
  with a 1px shadow (hard-stop gradients per orientation).
- WCAG contrast fixes: separators were 1.0-1.2:1 against every theme
  background, now >=3.25:1 (dark theme gold @70%); scrollbar handle
  1.17:1 -> 3.38:1; unselected tab text on the sky gradient 2.07:1 ->
  4.71:1 via TAB_IDLE_TEXT.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-14 13:23:32 +02:00
duan_jandClaude Fable 5.1 ccb71bf43f test: format the mocked token and cast the tell-state stand-in for basedpyright
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
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
CI / lint (pull_request) Canceled after 33s
CI / test (3.12) (pull_request) Canceled after 33s
CI / test (3.13) (pull_request) Canceled after 28s
CI / test (3.14) (pull_request) Canceled after 28s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 18s
CI / test-with-coverage (pull_request) Canceled after 18s
CI / coverage-analysis (pull_request) Canceled after 0s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 14:56:55 +02:00
duan_jandClaude Fable 5.1 c3e7b9a2cc test: cover the sample camera pacing, the newest-frame drain and the frame slot
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
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
CI / lint (pull_request) Failing after 35s
CI / test (3.12) (pull_request) Canceled after 36s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 21s
CI / test (3.13) (pull_request) Canceled after 31s
CI / test (3.14) (pull_request) Canceled after 31s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 26s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 26s
CI / test-with-coverage (pull_request) Canceled after 21s
CI / coverage-analysis (pull_request) Canceled after 0s
CI's diff-coverage gate sat at 29% because the ZMQ fixes live in code no
test reached: the subscriber's socket setup, _emit_image/notify_frame_
displayed, _recv_latest and the run() frame path, plus the main window's
frame slot. The subscriber now runs against a real inproc socket (the
drain and the in-flight cap are the fix, so a mock would prove nothing);
run() is driven with a stubbed _recv_latest that hands over one JPEG and
then stops. The busy overlay gets a check that cooling is the only blue
busy state.

The subscriber fixture takes qapp so no QImage is built before the
QApplication exists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 14:56:16 +02:00
duan_jandClaude Fable 5 1a9f4d8709 test: Moving state no longer flips to combined view
CI / lint (pull_request) Successful in 38s
CI / test (3.11) (pull_request) Successful in 1m1s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m1s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m20s
CI / test-with-coverage (pull_request) Successful in 1m31s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 31s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.11) (push) Canceled after 38s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 24s
CI / test (3.12) (push) Canceled after 34s
CI / test (3.13) (push) Canceled after 33s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 29s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 28s
CI / test-with-coverage (push) Canceled after 23s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 25s
The fix removed Moving from the motion-watch trigger but the unit test and code comment still described the old behavior, so pre-push failed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 13:30:20 +02:00
duan_j d5c66afba9 fix: combined view only when state is moving or when in robotsampleexchange 2026-08-20 19:54:50 +02:00
duan_jandClaude Fable 5 569b024456 feat: admin-gate beam diagnostics states, warn via passive red tip
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>
2026-08-20 19:54:50 +02:00
duan_jandClaude Fable 5 e9428ca64d test: pin the Sample-alignment motion-watch exception
CI / test (3.11) (pull_request) Successful in 1m12s
CI / test (3.12) (pull_request) Successful in 1m13s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m12s
CI / lint (pull_request) Successful in 1m30s
CI / test (3.13) (pull_request) Successful in 1m25s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m27s
CI / test-with-coverage (pull_request) Successful in 1m43s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 28s
Docs build and publish / docker (push) Successful in 8s
CI / test (3.11) (push) Canceled after 35s
CI / test (3.12) (push) Canceled after 31s
CI / test (3.13) (push) Canceled after 30s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 26s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 25s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 21s
CI / test-with-coverage (push) Canceled after 20s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 24s
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>
2026-08-17 17:00:26 +02:00
duan_jandClaude Fable 5 190e728734 fix: install gate event filters after eventFilter's targets exist
CI / lint (pull_request) Successful in 1m13s
CI / test (3.12) (pull_request) Successful in 1m30s
CI / test (3.11) (pull_request) Successful in 1m38s
CI / test (3.13) (pull_request) Successful in 1m40s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m38s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m41s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m51s
CI / test-with-coverage (pull_request) Successful in 2m6s
CI / coverage-analysis (pull_request) Successful in 3s
CI / lint (push) Successful in 31s
Docs build and publish / docker (push) Successful in 15s
CI / test (3.11) (push) Canceled after 37s
CI / test (3.12) (push) Canceled after 33s
CI / test (3.13) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 28s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 23s
CI / test-with-coverage (push) Canceled after 22s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 21s
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>
2026-08-14 10:54:20 +02:00
duan_jandClaude Fable 5 aa6c226103 test: cover every changed line in the branch diff
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
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
CI / lint (pull_request) Successful in 1m17s
CI / test (3.11) (pull_request) Successful in 1m44s
CI / test (3.12) (pull_request) Successful in 1m41s
CI / test (3.13) (pull_request) Successful in 2m1s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m57s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 2m0s
CI / test-with-coverage (pull_request) Successful in 2m26s
CI / coverage-analysis (pull_request) Successful in 3s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 18m13s
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>
2026-08-14 09:20:44 +02:00
duan_jandClaude Fable 5 7b4764e7ca test: cover the camera overlays, theme migration, layout heal, and splash
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>
2026-08-11 10:35:55 +02:00
perl_d 99326614ae style: ruff check fix 2026-07-06 15:39:02 +02:00
perl_d 13bddd43c7 refactor: use aarecommon and remove common 2026-07-06 11:53:49 +02:00
appleb_m c1edacc9c3 Added style sheet options - protrait style needs to be added to more places. 2026-06-24 15:30:05 +02:00
appleb_m 0a47294244 gui_tests: removed irrelevant import/mocking that was causing tests to fail 2026-06-09 11:16:09 +02:00
appleb_m 856c2ba34b DAQ/GUI: removed automation workflow manager runner, workflow, models and tidied up GUI/DAQ as it is not in use at the moment. 2026-05-01 16:53:03 +02:00
appleb_m 947e142f6e DAQ/GUI updated: gui session handling in daq and gui so staff can now close erroneous GUIs and see who has the baton. Added tests
Build and Publish / test (push) Successful in 1m26s
Build and Publish / build (push) Successful in 15s
Build and Publish / Build and Deploy Docs (push) Successful in 38s
2026-04-30 14:03:10 +02:00
appleb_m 7168f5512d tests: added gui tests and furtehr tests in daq and common 2026-04-24 14:52:00 +02:00