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: mx:main
mx:main
mx:gitea-pages
mx:feat/use_aare_config
mx:fix/lint
mx:fix/sticky_filters
mx:docs/configurable_values_inventory
mx:fix/create_devices
mx:feat/put_current_zoom_in_redis
mx:fix/10s-dtz
mx:fix/reload_macros
mx:fix/sleep_solution_2
mx:fix/grid_rotation_automation_sleep
mx:fix/gui-auto-center-after-mount-idle-tick
mx:fix/add_beam_center_offset
mx:fix/rasters-20kev-0.1T
mx:fix/x10sa-raster-transmission-release
mx:feat/rasters-20kev-1T
mx:fix/debug_rotation_file_path
mx:feat/blower-off-before-chi
mx:release/trigger-auto-raster
mx:feat/auto-raster-fixed-params
mx:fix/repeated_mount_failuers
mx:fix/dont_wait_for_jfjoch_cancel_on_cleanup
mx:feat/gui-panel-resize
mx:fix/exclude_pin
mx:fix/better_error_on_no_sample_for_raster
mx:feat/smart-rotation-dose-strategy-2
mx:fix/wvl-dtz
mx:fix/jfjoch-transmission
mx:fix/raster-name
mx:feat/update_aarescan_api
mx:feat/gui-accessibility
mx:fix/clean_up_after_experiments_are_done
mx:feat/server_side_queue
mx:style/fix_lint
mx:fix/resolution_selection_logic
mx:feat/default_params_per_beamline
mx:fix/transmission-set-condition
mx:update-10s-energy-range
mx:feat/smart-rotation-dose-strategy
mx:feat/add_pxiii_flux
mx:fix/clear_last_grid_res
mx:feat/select_meitians_gridscan_analysis
mx:fix/general_fixes
mx:fix/xraycenter_linescan_y
mx:fix/screening_validation
mx:fix/unmount_sample_at_end_of_automation
mx:fix/automation_errors
mx:fix/spreadsheetupdate_config
mx:fix/automation_jfjoch_aarescan_failures
mx:feat/busy_state_lock
mx:fix/aaregui-zmq
mx:fix/scan-panel-user-values
mx:fix/errors_from_transmission_update
mx:feat/update_transmission
mx:fix/add_more_debug_to_aarescan
mx:fix/add_automation_logging
mx:fix/floor_chi_for_jfjoch
mx:feat/add_phi_chi_to_jfjoch_metadata
mx:fix/zoom_before_xraycenter
mx:fix/remove_pvs
mx:fix/detector_tilt
mx:fix/change_gap_with_energy
mx:fix/beam_center_structure
mx:fix/improve-overwrite-error-message
mx:feat/1d_beam_center
mx:fix/use_bec_client_detz_values
mx:fix/beamline_debugging_260827
mx:feat/integrate_fluo
mx:style/cosmetics
mx:fix/new_macro_signatures
mx:fix/updated_10s_macros
mx:fix/init_shutdown
mx:feat/setup_around_beam_steering
mx:feat/beam_centre_from_det_2
mx:fix/dont_unmount_on_park_and_dry
mx:feat/beam_centre_from_det
mx:fix/actually_truncate_dtz
mx:fix/param_calculation
mx:fix/baton-message-box
mx:feat/user-gui-optimizations
mx:fix/pxii_commissioning_260820
mx:fix/pitch_scan_message
mx:fix/screening_request
mx:fix/save_coll_positions
mx:improve_wording
mx:fix/save_bs_positions
mx:feat/add_beam_steering_routine
mx:fix/read_state_on_startup
mx:fix/moving_state
mx:perl_d-patch-1
mx:feat/lazy_jfj
mx:fix/remove_disabled_current_log
mx:refactor/remove_direct_pvs
mx:fix/gui_startup
mx:docs/update_cs
mx:docs/redo_docs
mx:fix/add_x06da_bec_macros
mx:ci/lock_in_ci
mx:fix/update_uvicorn_dep
mx:fix/handle_no_ring_current
mx:fix/update_deps
mx:fix/workflow_fetch_auth_2
mx:fix/workflow_fetch_auth
mx:feat/release_workflow
mx:pxiii-live-changes
mx:fix/exception_typo
mx:live_260715
mx:fix/validate_detector_speed
mx:live_260713
mx:live_260710
mx:feat/cached_status
mx:fix/reduce_inner_workers
mx:fix/no_none_operation
mx:fix/suppress_baton_error
mx:fix/remove_logs
mx:gui_default_parameters
mx:fix/reverted_import
mx:end_operation_after_error
mx:live_260709
mx:feat/server_about
mx:live_260708
mx:fix/live_tests
mx:fix/crash_on_no_bec
mx:feat/display_path_env
mx:fix/logging_improvements
mx:refactor/use_aarecommon
mx:chore/better_gitignore
mx:chore/add_uv_dep
mx:feature/beam-marker-daq
mx:new-gui-redesign
mx:ml_zoom
mx:raster_score
mx:operation_standardisation
mx:apache-auth
mx:find_crystal_from_gridscan
mx:x10sa
mx:x10sa-tutorial
mx:TellSampleHandling
mx:CheckedLineEdit
mx:monday_1st_december
mx:progressbar
mx:master-unstable
mx:ReferenceToolSort
mx:ParseSampleParamsFromDB
mx:daq_raster_predicition
mx:reference-tools
mx:zoom_manager
mx:prediction
mx:tellupdater
mx: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