feat: user GUI optimizations #146

Merged
duan_j merged 16 commits from feat/user-gui-optimizations into main 2026-08-20 20:01:10 +02:00
Owner

GUI usability batch for the user-facing daily-operation panels.

Access control

  • Admin-gate the beam diagnostics states (Beam location, Beamstop
    alignment, Flux measurement) in the state strip and the status-bar
    transitions menu; denials show as an auto-dismissing tooltip on a
    red wash instead of a click-to-close message box.
  • Allow non-staff to change energy, and refresh the staff linux group.

Sample camera

  • Hover HUD with pixel coordinates and a grey-scale bar.
  • Combined view only while the state is moving or during robot
    sample exchange.

Data collection panel

  • Auto Centering moves out of the experiment tabs to its own row
    between Manual sample and Experiment configuration, with an
    "apply after mount" checkbox that re-runs it after every detected
    sample mount (guarded so a GUI restart with a sample already
    mounted does not move hardware).
  • Draw a Grid now only shows on the Raster scan tab.

Misc

  • Baton request dialog closes properly after receiving the baton;
    bigger accept/cancel buttons.
  • Help cheatsheet folds when the mouse leaves the box; wording,
    tooltip-consistency and button-naming cleanups.
  • uv.lock synced with the 0.12.5 version bump.

Generated with Claude Code

GUI usability batch for the user-facing daily-operation panels. Access control - Admin-gate the beam diagnostics states (Beam location, Beamstop alignment, Flux measurement) in the state strip and the status-bar transitions menu; denials show as an auto-dismissing tooltip on a red wash instead of a click-to-close message box. - Allow non-staff to change energy, and refresh the staff linux group. Sample camera - Hover HUD with pixel coordinates and a grey-scale bar. - Combined view only while the state is moving or during robot sample exchange. Data collection panel - Auto Centering moves out of the experiment tabs to its own row between Manual sample and Experiment configuration, with an "apply after mount" checkbox that re-runs it after every detected sample mount (guarded so a GUI restart with a sample already mounted does not move hardware). - Draw a Grid now only shows on the Raster scan tab. Misc - Baton request dialog closes properly after receiving the baton; bigger accept/cancel buttons. - Help cheatsheet folds when the mouse leaves the box; wording, tooltip-consistency and button-naming cleanups. - uv.lock synced with the 0.12.5 version bump. Generated with [Claude Code](https://claude.com/claude-code)

Coverage report (automated)

Total line + branch coverage: 49%
Diff coverage vs main: 97% (minimum 80%)

Full report: coverage artifact on this run.

Coverage report (automated) Total line + branch coverage: 49% Diff coverage vs main: 97% (minimum 80%) Full report: coverage artifact on this run.
duan_j marked the pull request as work in progress 2026-08-19 13:09:29 +02:00
duan_j force-pushed feat/user-gui-optimizations from 099ea2297b to a81c51c6ea 2026-08-20 09:55:55 +02:00 Compare
duan_j force-pushed feat/user-gui-optimizations from a81c51c6ea to 620877391c 2026-08-20 10:05:25 +02:00 Compare
duan_j force-pushed feat/user-gui-optimizations from a6ef1710b0 to 071daa0315 2026-08-20 16:20:00 +02:00 Compare
duan_j force-pushed feat/user-gui-optimizations from 071daa0315 to f165055ffc 2026-08-20 16:23:21 +02:00 Compare
duan_j added 16 commits 2026-08-20 19:56:10 +02:00
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>
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>
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>
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>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
chore: sync uv.lock with 0.12.5 version bump
CI / lint (pull_request) Successful in 1m0s
CI / test (3.12) (pull_request) Successful in 1m4s
CI / test (3.11) (pull_request) Successful in 1m8s
CI / test (3.13) (pull_request) Successful in 1m6s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m7s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m19s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m20s
CI / test-with-coverage (pull_request) Successful in 1m38s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 36s
Docs build and publish / docker (push) Successful in 19s
CI / test (3.11) (push) Canceled after 41s
CI / test (3.12) (push) Canceled after 39s
CI / test (3.13) (push) Canceled after 36s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 34s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 31s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 29s
CI / test-with-coverage (push) Canceled after 26s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 29s
3df3683b75
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
duan_j force-pushed feat/user-gui-optimizations from f165055ffc to 3df3683b75 2026-08-20 19:56:10 +02:00 Compare
duan_j changed title from WIP: feat: admin-gate beam diagnostics states, warn via passive red tip to WIP: feat: user GUI optimizations 2026-08-20 19:58:23 +02:00
duan_j marked the pull request as ready for review 2026-08-20 20:00:13 +02:00
duan_j merged commit 3df3683b75 into main 2026-08-20 20:01:10 +02:00
Sign in to join this conversation.