WIP: show busy state in GUI while energy change is in flight #216
Closed
duan_j
wants to merge 1 commits from
show-busy-when-changing-energy into main
pull from: show-busy-when-changing-energy
merge into: :main
:main
:feat/server_side_queue
:gitea-pages
:style/fix_lint
:fix/resolution_selection_logic
:feat/default_params_per_beamline
:fix/transmission-set-condition
:update-10s-energy-range
:feat/smart-rotation-dose-strategy
:show-busy-when-changing-energy
:feat/add_pxiii_flux
:fix/clear_last_grid_res
:feat/select_meitians_gridscan_analysis
:fix/general_fixes
:fix/xraycenter_linescan_y
:fix/screening_validation
:fix/unmount_sample_at_end_of_automation
:fix/automation_errors
:fix/spreadsheetupdate_config
:fix/automation_jfjoch_aarescan_failures
:feat/busy_state_lock
:fix/aaregui-zmq
:fix/scan-panel-user-values
:fix/errors_from_transmission_update
:feat/update_transmission
:fix/add_more_debug_to_aarescan
:fix/add_automation_logging
:fix/floor_chi_for_jfjoch
:feat/add_phi_chi_to_jfjoch_metadata
:fix/zoom_before_xraycenter
:fix/remove_pvs
:fix/detector_tilt
:fix/change_gap_with_energy
:fix/beam_center_structure
:fix/improve-overwrite-error-message
:feat/1d_beam_center
:fix/use_bec_client_detz_values
:fix/beamline_debugging_260827
:feat/integrate_fluo
:style/cosmetics
:fix/new_macro_signatures
:fix/updated_10s_macros
:fix/init_shutdown
:feat/setup_around_beam_steering
:feat/beam_centre_from_det_2
:fix/dont_unmount_on_park_and_dry
:feat/beam_centre_from_det
:fix/actually_truncate_dtz
:fix/param_calculation
:fix/baton-message-box
:feat/user-gui-optimizations
:fix/pxii_commissioning_260820
:fix/pitch_scan_message
:fix/screening_request
:fix/save_coll_positions
:improve_wording
:fix/save_bs_positions
:feat/add_beam_steering_routine
:fix/read_state_on_startup
:fix/moving_state
:perl_d-patch-1
:feat/lazy_jfj
:fix/remove_disabled_current_log
:refactor/remove_direct_pvs
:fix/gui_startup
:docs/update_cs
:docs/redo_docs
:fix/add_x06da_bec_macros
:ci/lock_in_ci
:fix/update_uvicorn_dep
:fix/handle_no_ring_current
:fix/update_deps
:fix/workflow_fetch_auth_2
:fix/workflow_fetch_auth
:feat/release_workflow
:pxiii-live-changes
:fix/exception_typo
:live_260715
:fix/validate_detector_speed
:live_260713
:live_260710
:feat/cached_status
:fix/reduce_inner_workers
:fix/no_none_operation
:fix/suppress_baton_error
:fix/remove_logs
:gui_default_parameters
:fix/reverted_import
:end_operation_after_error
:live_260709
:feat/server_about
:live_260708
:fix/live_tests
:fix/crash_on_no_bec
:feat/display_path_env
:fix/logging_improvements
:refactor/use_aarecommon
:chore/better_gitignore
:chore/add_uv_dep
:feature/beam-marker-daq
:new-gui-redesign
:ml_zoom
:raster_score
:operation_standardisation
:apache-auth
:find_crystal_from_gridscan
:x10sa
:x10sa-tutorial
:TellSampleHandling
:CheckedLineEdit
:monday_1st_december
:progressbar
:master-unstable
:ReferenceToolSort
:ParseSampleParamsFromDB
:daq_raster_predicition
:reference-tools
:zoom_manager
:prediction
:tellupdater
:beamcenter_fit
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
WIP - GUI-only. Not yet tested against a real mono move on X10SA.
Why
PUT /beamline/change_energynever takes the hw lock, so/status.busystays False for the whole mono move (minutes). The GUI only had a readback
heuristic: spin green until within 1 eV of target, or green forever if the
mono missed (the case bec_worker itself warns about). Two Set Energy rows
kept independent state, so a click in one showed nothing in the other.
What
The endpoint blocks server-side until the move ends, so the PUT reply edge
is the "done" signal - same trick as
center_loop/ AUTO CENTERING.daq_worker: newenergy_changing(bool)signal, True on send, False onreply.finished(fires on error too, flag always clears)SpinMoveState.set_changing: forces moving + read-only spin (blocks asecond request racing the first), clears to neutral without waiting for
arrival
"Changing..." during the move
AUTO CENTERING
Not in this PR
server to take the hw lock (
@needs_hw_lockonchange_energy, asmono_pitch_scanalready does). Separate PR, changes server semantics(concurrent hw ops would get BeamlineBusyException).
To verify before un-WIP
when the move ends
Generated with Claude Code
Coverage report (automated)
Total line + branch coverage: 51%
Diff coverage vs main: 100% (minimum 80%)
Full report: coverage artifact on this run.
9a56795720to6c95727532Pull request closed