feat(ui): reveal the laser's settings once a line is routed - #163
Merged
pskeshu merged 1 commit intoSep 6, 2026
Merged
Conversation
The Light panel showed everything at once, and with no device layer that meant
four disabled power sliders reading an em dash — maximum clutter for zero
information.
Beam and power are now revealed under the Laser row when the config routes
something, and hidden when it does not.
## Scope, not dependency
The nesting groups the laser's own settings. It deliberately does NOT imply
`BeamEnabled` follows from the config, because it does not — emission is
conjunctive:
emitting = armed AND routed AND power > 0
gently-project#106 is exactly what happens when someone assumes otherwise: a correctly
configured laser that emits nothing because the beam is off. So the indent
carries the grouping and the contradiction gets a line of its own rather than
being softened by it. Routed lines with the beam off now reads "this
configuration will not emit", and names the cause — every volume acquisition
leaves BeamEnabled at No.
The mirror case is handled too: an armed beam with nothing routed is safe,
surprising, and the state the rig is left in, so a note on the Laser row keeps
that fact visible. Hiding the detail must not hide the fact, or the disclosure
would have made the panel less honest than the flat version it replaced.
`routedLines()` is for display and answers "which lines do we KNOW are routed".
`wavelengthsOf()` is unchanged and still answers "which could be involved",
returning every line for an unknown config — right for `emitting()`, because an
unread config with unread power must come out unknown rather than safe.
The config select now always includes what is actually set. The preset list
comes from an endpoint that 503s with the device layer down, so the select read
an em dash while the detail below it showed routed lines and live power — two
halves of one panel contradicting each other.
## A regression fixed on the way, unrelated to the above
The device-layer strip's Start/Stop/Log buttons had been borrowing
`.marking-action-btn` from the old marking surface. Deleting that surface
(gently-project#162) took their styling with them, and they have been rendering unstyled
since.
My liveness check behind that deletion used a regex requiring a character
before "marking", so class names STARTING with it were never recognised as
live. `.marking-action-btn` was in use by markup that had nothing to do with
marking, and its rules went anyway. Second over-deletion this session with the
same root cause: bulk removal on an imperfect liveness test.
Re-homed onto `.devices-layer-btn`, which the buttons already carried, so the
name now says what it styles. The borrowed class names are gone from the
markup, and a test pins both.
Verified live across all four states: unknown reveals nothing (0 sliders, was
4), ALL OFF with an armed beam reveals nothing but shows the note, routed with
the beam off reveals the detail and states the contradiction, routed and armed
reveals it and reads EMITTING. Start is blue again.
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.
The Light panel showed everything at once, and with no device layer that meant four disabled power sliders reading an em dash — maximum clutter for zero information.
Beam and power are revealed under the Laser row when the config routes something, hidden when it doesn't.
Scope, not dependency
The nesting groups the laser's own settings. It deliberately does not imply
BeamEnabledfollows from the config, because it doesn't — emission is conjunctive:#106 is exactly what happens when someone assumes otherwise: a correctly-configured laser emitting nothing because the beam is off. So the indent carries the grouping, and the contradiction gets a line of its own rather than being softened by it. Routed lines with the beam off now reads "this configuration will not emit" and names the cause — every volume acquisition leaves
BeamEnabledatNo.The mirror case matters as much: an armed beam with nothing routed is safe, surprising, and the state the rig is left in. A note on the Laser row keeps that visible. Hiding the detail must not hide the fact, or the disclosure would have made the panel less honest than the flat version.
ALL OFF, beam armedEMITTINGroutedLines()is for display.wavelengthsOf()is unchanged and still returns every line for an unknown config — right foremitting(), because an unread config with unread power must come out unknown, not safe.The config select now always includes what's actually set: the preset endpoint 503s with the device layer down, so the select read
—while the detail below showed routed lines and live power.The regression
The device-layer Start/Stop/Log buttons were borrowing
.marking-action-btnfrom the old marking surface. Deleting that surface took their styling with it.My liveness check used a regex requiring a character before
"marking", so class names starting with it were never recognised as live. Second over-deletion this session with the same root cause — bulk removal on an imperfect liveness test.Re-homed onto
.devices-layer-btn, which the buttons already carried, so the name says what it styles. Test pins both.Verified live
All four states behave as tabled above; Start is blue again with its 6px radius.