fix: grey out whole state strip while beamline is busy

Busy now empties the available-target set exactly like Moving, so no
entry looks clickable and no transition can be posted mid-operation
(same guard the status-bar menu already had). The current/pending
entry keeps its highlight as orientation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 15:42:00 +02:00
co-authored by Claude Fable 5
parent 69d552c068
commit d659f05009
+7 -1
View File
@@ -132,6 +132,7 @@ class BeamlineStatePanel(QFrame):
self._current_state: BeamlineStateEnum | None = None
self._hovered_state: BeamlineStateEnum | None = None
self._pending_target_state: BeamlineStateEnum | None = None
self._busy = False
# After 3 s of hovering an unavailable state, explain which states
# it can be reached from.
@@ -238,7 +239,9 @@ class BeamlineStatePanel(QFrame):
def _available_targets(self) -> frozenset[BeamlineStateEnum]:
current = self._current_state
if current is None or current == BeamlineStateEnum.Moving:
# Busy greys the whole strip like Moving does: a transition posted
# mid-operation would clobber it (same guard as the status-bar menu).
if self._busy or current is None or current == BeamlineStateEnum.Moving:
return frozenset()
# Reachable in one step: the route graph plus the status-bar
# shortcut transitions.
@@ -399,4 +402,7 @@ class BeamlineStatePanel(QFrame):
self._apply_highlight()
def update_daq_status(self, status: DAQStatusModel) -> None:
self._busy = bool(status.busy)
# set_current_state re-applies the highlight, so a busy flip
# restyles the strip on the same tick even if the state held.
self.set_current_state(status.state)