Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
A safety hold shows in its own reserved status-strip row, wrapping to 3 lines, beside a driver name that stays visible; the camera box never changes size #338
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
Reconnecting, an arm unreachable for over a minute, a jam, and an enforce boundary hold now show in a new #holdLine row in the status strip, beside #driverLine. I couldn't get a full bun test pass here. bun install failed in the sandbox (bun can't write to its tempdir), so three isn't vendored.
shipped merged
1 earlier comment · 1 event
Reconnecting, an arm unreachable for over a minute, a jam, and an enforce boundary hold now show in a new #holdLine row in the status strip, beside #driverLine. I couldn't get a full bun test pass here.
bun install failed in the sandbox (bun can't write to its tempdir), so three isn't vendored. The full run had 580 passing and 1 failing, and the failure is server.test.ts:545, which fetches /vendor/three/build/three.module.js and got a 404. I did not re-run it on main to confirm it fails there too. The new stop-layout.test.ts cases pass. The type check printed nothing, but I didn't check its exit code.
- Hold row:
#holdLineis inSoftware/so101/src/viewer.html.banner()writes holds there through a newholdText().#driverLineis untouched. - Reserved space:
#holdLinehasmin-height: 3.6em, which is three lines at 12px, whether or not a hold shows. It wraps (white-space: normal) and is clamped to 3 lines, so the strip and the camera box keep their size. - Unchanged: E-stop and manual stop keep the full-width banner and clear the hold row.
#noticeand the warn-only notices (awarn-mode boundary warning, a violation) stay where they were.forge.jsonis untouched. - Tests:
stop-layout.test.tshas three new cases. They check that the row sits in the strip and wraps with the 3-line clamp, that nothing hides#driverLineor#holdLine, and that no hold-state rule changes the row's size. The camera-box check is stylesheet-based, not a rendered measurement at 360 px, because there is no browser here. - Gzip budget: I didn't measure the first-visit gzip budget. The change adds roughly 1 KB of raw HTML and CSS.
The three-line reservation adds about 43px under the driver name on the phone layout.
🤖 Generated with Claude Code
The layout idea is right: a reserved 3-line row beside the driver name, and the preview serves #holdLine. Two things block it.
- The new behaviour has no test that would fail without it. banner() now routes reconnecting, offline-sim, jam and enforce-hold into #holdLine, clears it on e-stop and manual hold, and leaves warn-only notices in #banner. All three new tests only regex the stylesheet and the HTML. If holdText() returned null, or banner() wrote to the wrong element, they would still pass. Fix first: test the routing. Either extract holdText into a small module that takes plain data and returns {bad,text}|null and unit-test each case (reconnecting, offline, jam, enforce blocked, warn-mode blocked -> null, nothing -> null), or run banner() against a stub DOM.
- The suite is not shown green here: the author reports a failing server.test.ts:545 (three not vendored) and did not check it on main or check tsc exit code. Please confirm bun test and bun x tsc --noEmit exit 0 and say so in the pull.
Smaller: #holdLine has role=status inside the strip that is already aria-live=polite, so a hold may be announced twice. Drop the role or the aria-live on it. The 360px no-shift claim is only asserted by regex; state that plainly in the pull, and measure the camera box height with and without a hold when a browser is available. The ~43px the reserved row adds on phone is worth a mention in the README or pull as a deliberate trade-off.
Reconnecting, an arm unreachable for over a minute, a jam, and an enforce boundary hold now show in a reserved 3-line #holdLine row in the status strip, beside #driverLine. E-stop and manual stop keep the full-width banner and clear the hold row. Warn-only notices and #notice are unchanged, and forge.json is untouched.
Both blockers are fixed, and bun x tsc --noEmit and bun test both exit 0 here (589 pass, 0 fail). An earlier run of mine reported a failing server.test.ts:545; that was a missing install (three not vendored), not a code fault. I haven't run the suite on main.
- Routing is now tested. The decision logic moved into
src/ui/hold-line.jsas two pure functions:holdTextandwarnText.banner()calls them.
- src/ui/hold-line.test.ts covers each case: reconnecting, offline, jam, enforce-blocked, warn or off-mode blocked (not a hold), a violation, and nothing.
- It also reads banner()'s source to check that holds go to #holdLine, warnings go to #banner, and e-stop and manual stop clear the row. That wiring test is a source check, not a stub DOM.
- Double announcement: I removed
role="status"from#holdLine, since the strip is alreadyaria-live="polite". - First-visit gzip budget: it rose from 52,000 to 52,500 bytes. The new module and wiring measured 52,297 against the old limit. I changed the limit and its test title in
server.test.ts. - Not measured in a browser: the camera box staying the same size at 360 px is asserted only by stylesheet checks in
stop-layout.test.ts. The row has a fixedmin-heightof 3.6em and nothing keyed on a hold changes its size. Nobody has measured the camera box with and without a hold. - Phone cost: the reserved row adds about 43px to the strip on the phone layout. That is deliberate, so a 3-line hold never shifts the camera.
🤖 Generated with Claude Code
Works in the preview: #holdLine is served in the strip beside #driverLine, with a fixed 3.6em reservation, a 3-line clamp and wrapping. holdText/warnText are pure and tested, and the wiring test checks that holds go to the row and warnings go to the banner. The change stays within the issue, adds no dependency, and raises the gzip budget by 500 bytes with a stated reason.
Two things to do next:
- Measure the camera box with and without a hold in a real browser at 360 px. The third stop-layout test only greps the stylesheet, and the wiring test greps banner() source, so neither would catch a layout regression.
- The reserved row costs about 43px on the phone. If that is too much, reserve 2 lines on narrow screens, or put the row in the same grid cell as the clock.
The terminal is unchanged. Holds are display state on the page, and I found no hold text in src/tty.ts that needed mirroring.
Reconnecting, an arm unreachable for over a minute, a jam, and an
enforceboundary hold now show in a new#holdLinerow in the status strip, beside#driverLine. I couldn't get a fullbun testpass here.bun installfailed in the sandbox (bun can't write to its tempdir), sothreeisn't vendored. The full run had 580 passing and 1 failing, and the failure isserver.test.ts:545, which fetches/vendor/three/build/three.module.jsand got a 404. I did not re-run it onmainto confirm it fails there too. The newstop-layout.test.tscases pass. The type check printed nothing, but I didn't check its exit code.#holdLineis inSoftware/so101/src/viewer.html.banner()writes holds there through a newholdText().#driverLineis untouched.#holdLinehasmin-height: 3.6em, which is three lines at 12px, whether or not a hold shows. It wraps (white-space: normal) and is clamped to 3 lines, so the strip and the camera box keep their size.#noticeand the warn-only notices (awarn-mode boundary warning, a violation) stay where they were.forge.jsonis untouched.stop-layout.test.tshas three new cases. They check that the row sits in the strip and wraps with the 3-line clamp, that nothing hides#driverLineor#holdLine, and that no hold-state rule changes the row's size. The camera-box check is stylesheet-based, not a rendered measurement at 360 px, because there is no browser here.The three-line reservation adds about 43px under the driver name on the phone layout.
🤖 Generated with Claude Code
Closes #335