Last GUI fixes before leaving - hopefully #232

Merged
duan_j merged 9 commits from feat/gui-statusbar-pin-right into main 2026-09-17 21:22:59 +02:00
Owner
  1. file-name guard, check replicated file name before measurement, if exist already, remind user, auto increment, user just need to redo the last action
  2. dewar table aligned rows, zoom in and out have adaptive height box so no text will be cut
  3. keep queue head until unmount is done instead of throw it away immediately
  4. better wording
  5. pin status bar fix to the right so action buttons stay at the same place when window width is reduced
1. file-name guard, check replicated file name before measurement, if exist already, remind user, auto increment, user just need to redo the last action 2. dewar table aligned rows, zoom in and out have adaptive height box so no text will be cut 3. keep queue head until unmount is done instead of throw it away immediately 4. better wording 5. pin status bar fix to the right so action buttons stay at the same place when window width is reduced
duan_j force-pushed feat/gui-statusbar-pin-right from 79e5c2de04 to 07c561128d 2026-09-17 14:27:20 +02:00 Compare

Coverage report (automated)

Total line + branch coverage: 51%
Diff coverage vs main: 96% (minimum 80%)

Full report: coverage artifact on this run.

Coverage report (automated) Total line + branch coverage: 51% Diff coverage vs main: 96% (minimum 80%) Full report: coverage artifact on this run.
duan_j force-pushed feat/gui-statusbar-pin-right from 07c561128d to ee78ba7dc6 2026-09-17 15:34:39 +02:00 Compare
duan_j added 8 commits 2026-09-17 18:44:58 +02:00
- Fast Shutter / State / p-group / Session are addPermanentWidget now:
  QStatusBar itself pins them to the right corner, so wrapping of the
  other readouts never moves them
- passive readouts keep wrapping in the FlowHost on narrow windows
- grow-only min-width ratchet on every readout: changing number widths
  used to re-flow the row each DAQ tick and jitter every neighbour

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
Dewar "#" column sat 1px above the other rows at some zoom steps: the
frozen-column overlay sizes its own header from "#" alone while the main
header also sees the symbol columns, whose fallback-font glyphs have a
taller line box. The overlay header is now pinned to the main header
height on resize and (deferred, receiver-bound) on font/style change.

Zoom also left columns at their startup widths (headers truncated) and
clipped descenders in every button/combo/entry box: the 16px height pin
in both sheets was raw px while the body font grew to 18/21px. Columns
re-autosize on FontChange and the pin scales with the font ladder.

Camera "Currently mounted" HUD: black ink on a white halo in the light
themes, white on black in Sunset, instead of white-on-black everywhere.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Run guard called set_scan_kind(), which runs update_filename() and
skips to the next free run number before the existence check, so the
check never fired and the scan started under a new number without a
word. Now the check runs first, then a warning box names the existing
master file and the run number it moved to, and the run is blocked.

- Simple tab "Run rotation" had no guard at all; same guard added
- "Taken" also matches <run>_*_master.h5: X-ray Centering writes
  <run>_raster2d_master.h5, which the exact name missed
- Camera context-menu "Evaluate grid" presses the panel button, so it
  gets the guard and stays inert while the button is disabled
- Dead next_free_run_from() removed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
update_filename() still skipped to the next free run number on every
edit and refresh, so the name was always free by the time Run was
clicked and the guard never fired. The name is now exactly what the
fields say (label turns red on a clash); on Run, an existing target
pops "File already exists", bumps the run number by one and does
nothing else.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The tabs are handed parent=DataCollectionSettings but
QStackedWidget.addWidget() reparents them to the stack, so the guard's
parent() lookup never found file_path_panel and every Run (rotation,
screening, raster, X-ray centering, Simple) skipped the check. Lookup
now walks up the widget tree; regression test drives all five runs
through the real DataCollectionSettings.

The "taken" test is exact again: <run>_master.h5 plus the DAQ's
derived <run>_raster2d/_raster1d_master.h5. The directory test and the
_*_master.h5 glob are gone: neither is a file a run writes, and they
painted run numbers red that nothing would ever produce.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fix(gui): keep the file-name preview in the plain theme color
CI / lint (push) Skipped
CI / lint (pull_request) Successful in 1m18s
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 / test (3.12) (pull_request) Failing after 1m4s
CI / test (3.14) (pull_request) Successful in 1m7s
CI / test (3.13) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m17s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m17s
CI / test-with-coverage (pull_request) Successful in 1m35s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m40s
CI / coverage-analysis (pull_request) Successful in 4s
d70cac45bf
Dawn: the red "file exists" tint on the path label reads as an error
across the whole panel. The Run guard's popup already reports a clash,
so the label stays in the standard text color. The popup now also asks
the user to run the data collection again after the run number bump.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
duan_j force-pushed feat/gui-statusbar-pin-right from ee78ba7dc6 to d70cac45bf 2026-09-17 18:44:58 +02:00 Compare
duan_j added 1 commit 2026-09-17 21:15:52 +02:00
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
90f653386a
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>
duan_j merged commit 90f653386a into main 2026-09-17 21:22:59 +02:00
Sign in to join this conversation.