Skip to content

feat(ui): reveal the laser's settings once a line is routed - #163

Merged
pskeshu merged 1 commit into
gently-project:developmentfrom
pskeshu:feat/light-panel-disclosure
Sep 6, 2026
Merged

feat(ui): reveal the laser's settings once a line is routed#163
pskeshu merged 1 commit into
gently-project:developmentfrom
pskeshu:feat/light-panel-disclosure

Conversation

@pskeshu

@pskeshu pskeshu commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Also fixes a regression I shipped in #162, unrelated to the disclosure — see the bottom. The device-layer Start/Stop/Log buttons have been rendering unstyled.


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 BeamEnabled follows from the config, because it doesn't — emission is conjunctive:

emitting = armed AND routed AND power > 0

#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 BeamEnabled at No.

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.

state revealed
config unknown nothing — 0 sliders, was 4
ALL OFF, beam armed nothing, plus the note
routed, beam off detail + the contradiction stated
routed, armed, powered detail + EMITTING

routedLines() is for display. wavelengthsOf() is unchanged and still returns every line for an unknown config — right for emitting(), 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-btn from 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.

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>
@pskeshu
pskeshu merged commit 5f8ef0f into gently-project:development Sep 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant