Feat/style input box #162

Merged
duan_j merged 13 commits from feat/style-input-box into main 2026-08-24 19:26:49 +02:00
13 Commits
Author SHA1 Message Date
duan_j a19cbf1081 test: no need to test energy 0 and update tolerance
CI / lint (pull_request) Successful in 53s
CI / test (3.11) (pull_request) Successful in 58s
CI / test (3.13) (pull_request) Successful in 59s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m12s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m18s
CI / test-with-coverage (pull_request) Successful in 1m29s
CI / coverage-analysis (pull_request) Successful in 3s
CI / lint (push) Successful in 34s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.11) (push) Canceled after 37s
CI / test (3.12) (push) Canceled after 36s
CI / test (3.13) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 31s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 26s
CI / test-with-coverage (push) Canceled after 22s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 20s
test: update test...
2026-08-24 19:24:29 +02:00
duan_j 855632d5b5 fix: wheel include png and svg 2026-08-24 19:24:29 +02:00
duan_j c71676a29c test: log panel 2026-08-24 19:24:29 +02:00
duan_j bdafc03963 feat: allow dismissing notification. Trial. If not good, revert this. 2026-08-24 19:24:29 +02:00
duan_j 09f81c8392 chore: cleanup repeating code 2026-08-24 19:24:29 +02:00
duan_j 789b2ae6e2 fix: energy tolerance to 0.001 instead of 0.01 2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 a7bd46c14b test: sample padding pixel so movestate colors survive Linux fonts
x=20 sits on a digit glyph with CI's Linux fonts, so the assert compared
an antialiased glyph blend against the pure background. The padding area
(border 1px + padding 6px) can never contain text on any font.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147jE48bQUTm9AqNQApT6b2
2026-08-24 19:24:29 +02:00
duan_j 3192fd2388 style: make the banner text colored
so it shows on white/black background
2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 b984a36f7c fix: energy spin movestate colors never rendered
The movestate property sat on the spinbox's inner QLineEdit, which both
themes deliberately paint transparent (QAbstractSpinBox QLineEdit rule)
- the state machine worked but no color ever showed, and the tests only
asserted the property, not the paint. The property now lives on the
spinbox itself with QAbstractSpinBox[movestate=...] added to both
themes' rules, verified by a pixel-sampling regression test that grabs
the rendered widget through the real stylesheet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 e1d11aa949 feat: MotorMoveGroup semantics for both Set Energy rows
The energy setpoint applies via the Change Energy button, not Enter, so
it gets the full motor state machine instead of the typing-pending
color: neutral tracks the readback, a user edit stages pending (and is
the only thing that enables the button), the click turns moving, and
readback arrival within tol returns to neutral. New SpinMoveState in
motor_move_group.py adapts the pattern to a QDoubleSpinBox+button pair
(colors ride the movestate QSS via the spin's internal QLineEdit);
replaces the hand-rolled pending-until-click in the exp-config row and
covers the Beamline setup row that had no color at all. The server's
0.0 detector-unavailable energy is kept out of the readback feed so it
cannot clamp the spin to the range minimum.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 225d7064c4 feat: bound Set Energy to a 4-20 keV placeholder range
Both Set Energy rows allowed 1-30 keV, an arbitrary spinbox default;
nothing downstream validates the request (daq.change_energy forwards
straight to bec). Shared ENERGY_MIN/MAX_KEV constants now bound both
spins to 4-20 keV with a tooltip flagging the range as pending
Beamline Scientist confirmation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 3e7c334abb feat: pending color while typing in Experiment configuration values
Values inside the Experiment configuration banner now show the same
pending color as the motor move boxes while the typed text differs from
the applied value; Enter (or focus-out) commits as before and clears it.
Opt-in via NumberLineEdit(track_pending=True) because MotorMoveGroup
owns the movestate property on its registered boxes; reuses the existing
movestate QSS, so no new styling. The Set Energy spinbox marks pending
until Change Energy is clicked, since its apply gate is the button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:24:29 +02:00
duan_jandClaude Fable 5 d65ff27b3a chore: sync uv.lock with 0.13.4 version bump
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:24:29 +02:00