fix(operate): restore eight controls that were rendering and doing nothing - #160
Merged
pskeshu merged 1 commit intoSep 6, 2026
Conversation
…thing My regression, shipped in gently-project#157. Consolidating the two roster renderers into one panel, the roster's own click/keydown listeners had to go — the panel owns the markup, so it owns the handlers. I removed them by slicing text between two landmarks, and the end landmark matched too late. The slice took eight unrelated handlers with it: op-spim-toggle start/stop the light-sheet view op-calibrate run the calibration [data-gv] galvo nudges [data-pz] piezo nudges [data-backoff] the interlock banner's "Back off 100 µm" op-modes the run-mode chooser op-tl-stop the stop-condition select op-lib-list pick a saved tactic Every one still rendered and still looked enabled. `[data-backoff]` is the worst of them: a dead button on an interlock banner is pressed at exactly the moment something is already wrong. Nothing caught it. CI runs no JavaScript, and no test asserted that a control was connected to a function, so there was no signal — I found it only by noticing that clicking a run mode did not change the run mode. `tests/test_operate_controls_are_wired.py` closes that. It checks every control inside `wire()` specifically, not merely somewhere in the file: several of these ids are also read elsewhere (the SPIM toggle's label is updated in `applySpim`), so presence proves the control is mentioned, not that anything listens to it. Verified against the broken file — it flags all eight. The helper anchors on `_wired`, which only the top-level `wire()` uses. My first attempt matched "function wire() {" and found the gauge factory's inner one — landmark-matching text is the mistake this file is about, so it is not repeated in it. Verified live: the mode chooser switches panel and run verb, the stop-condition select reveals its value field, and the back-off, galvo and piezo controls are present and bound. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My regression, shipped in #157. Merge this ahead of anything else.
Consolidating the two roster renderers into one panel, the roster's own click/keydown listeners had to go — the panel owns the markup, so it owns the handlers. I removed them by slicing text between two landmarks, and the end landmark matched too late. The slice took eight unrelated handlers with it:
op-spim-toggleop-calibrate[data-gv][data-pz][data-backoff]op-modesop-tl-stopop-lib-listEvery one still rendered and still looked enabled.
[data-backoff]is the worst: a dead button on an interlock banner gets pressed at exactly the moment something is already wrong.Nothing caught it
CI runs no JavaScript, and no test asserted that a control was connected to a function. There was no signal at all — I found it by noticing that clicking a run mode did not change the run mode.
tests/test_operate_controls_are_wired.pycloses that gap. It checks every control insidewire(), not merely somewhere in the file: several of these ids are read elsewhere too (the SPIM toggle's label is updated inapplySpim), so presence proves the control is mentioned, not that anything listens to it. Verified against the broken file — it flags all eight.The helper anchors on
_wired, which only the top-levelwire()uses. My first attempt matched"function wire() {"and found the gauge factory's inner one instead — landmark-matching text is the mistake this file is about, so it isn't repeated inside it.Verified live
Mode chooser switches panel and run verb · stop-condition select reveals its value field · back-off, galvo and piezo controls present and bound.