Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

The status strip shows '12 here · 4 signed in · 8 watching' from the /live presence frame, with its space reserved so nothing shifts #376

Merged opened this

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

The status strip now shows "12 here · 4 signed in · 8 watching" from the /live presence frame. The full bun test run ended with 608 passing and 1 failing, and I didn't type-check: bun x tsc --noEmit stopped with "unable to write files to tempdir".

Notes

shipped merged

opened this

The status strip now shows "12 here · 4 signed in · 8 watching" from the /live presence frame. The full bun test run ended with 608 passing and 1 failing, and I didn't type-check: bun x tsc --noEmit stopped with "unable to write files to tempdir". I didn't run the first-visit gzip budget test separately; it was part of that full run.

  • What changed: Software/so101/src/ui/lobby-panel.js has a new presenceText(m). It returns the line only when here, signedIn and watching are all non-negative integers, and null otherwise. The /live message handler sets #presenceLine's textContent only when the text isn't null, so a bad frame is ignored and the previous line stays.
  • Reserved row: viewer.html adds a #presenceLine row in the strip's .who block, above #capLine. It has min-height: 1.2em from the first paint, so the strip and the camera box don't change height when the first frame arrives.
  • Tests: lobby-panel.test.ts covers a valid frame, and a frame with a missing, string, NaN or negative number, or null.
  • Failing test: server.test.ts:545, the model-routes test, got a 404 for /vendor/three/build/three.module.js. That test checks vendored files and none of my change touches them. I didn't check whether it also fails on main.
  • Not checked: I didn't try the page in a browser, so the layout is untested beyond the CSS.

forge.json is untouched.

🤖 Generated with Claude Code

Closes #359

1 earlier comment · 1 event
commented

The status strip now shows "12 here · 4 signed in · 8 watching" from the /live presence frame. The full bun test run ended with 608 passing and 1 failing, and I didn't type-check: bun x tsc --noEmit stopped with "unable to write files to tempdir". I didn't run the first-visit gzip budget test separately; it was part of that full run.

  • What changed: Software/so101/src/ui/lobby-panel.js has a new presenceText(m). It returns the line only when here, signedIn and watching are all non-negative integers, and null otherwise. The /live message handler sets #presenceLine's textContent only when the text isn't null, so a bad frame is ignored and the previous line stays.
  • Reserved row: viewer.html adds a #presenceLine row in the strip's .who block, above #capLine. It has min-height: 1.2em from the first paint, so the strip and the camera box don't change height when the first frame arrives.
  • Tests: lobby-panel.test.ts covers a valid frame, and a frame with a missing, string, NaN or negative number, or null.
  • Failing test: server.test.ts:545, the model-routes test, got a 404 for /vendor/three/build/three.module.js. That test checks vendored files and none of my change touches them. I didn't check whether it also fails on main.
  • Not checked: I didn't try the page in a browser, so the layout is untested beyond the CSS.

forge.json is untouched.

🤖 Generated with Claude Code

Changes requested — before the latest push

The line is reserved from first paint and the parser is well tested, but four things block it. (1) Screen readers: #presenceLine sits inside #strip, which is aria-live=polite, so every join or leave is announced as the strip changes. Fix first: put aria-live=off on #presenceLine, as #clock does. (2) Both doors: src/tty.ts shows no presence counts, and the README does not mention the line. Add the same text to the terminal and a README sentence. (3) The pull says bun test ended 1 failing (server.test.ts:545, 404 on the vendored three.module.js) and that tsc was not run. Check whether it fails on main, and run tsc. (4) Nothing shows the 360px layout: the row is 12px nowrap with ellipsis, so confirm on a phone that the strip and the camera box do not shift, including the keyboard-open mini player in mobile.css. Also add a test that the /live handler writes #presenceLine and ignores a bad frame.

commented

The strip now shows "12 here · 4 signed in · 8 watching" from the /live presence frame, and the terminal prints the same text after /who. I could not run tsc here, and I have not looked at the 360px phone layout.

  • Screen readers: #presenceLine now has aria-live="off", as #clock does, so joins and leaves aren't announced.
  • Terminal door:

- src/terminal.ts keeps the latest good presence frame, and /who ends with it. A bad frame leaves the last line in place. - The line is not printed on every frame, to avoid noise. - src/tty.ts is unchanged, because it only wires up terminal.ts. - The README now has a sentence on the line and on the terminal's /who.

  • Tests:

- lobby-panel.test.ts runs a good and a bad presence frame through createRoom and checks #presenceLine. - terminal.test.ts checks /who with and without a presence frame. - Both files pass.

  • server.test.ts:545 failure: the same test fails with my changes stashed, on the branch as it stood before this round, so it is not caused by this pull. It is the 404 on /vendor/three/build/three.module.js.
  • tsc: bun x tsc --noEmit and bun install both stop with "bun is unable to write files to tempdir: ReadOnlyFileSystem", even with TMPDIR set. The forge's check will be the first type check of this change.
  • Layout (360px, keyboard-open mini player): this needs a person with a phone. By reading the CSS, #presenceLine has a constant min-height: 1.2em and a 12px/1.2 line, so the row is the same height empty or filled. The strip is an auto grid row in both layouts, including the #shell.typing row layout that holds the 120px mini player in mobile.css. So nothing should shift, but I haven't seen it.

🤖 Generated with Claude Code

Approved

Does what the issue asks and no more. The preview serves #presenceLine inside the strip with aria-live=off. A reserved min-height row holds the space from the first paint. presenceText validates all three counts as non-negative integers, and the line is written with textContent, so nothing is injected. The terminal gets the same text after /who, and the README says so. Tests cover good and bad frames on both doors. Two things I would do next: (1) look at the row once on a real 360px phone, including the keyboard-open mini player, since the no-shift claim rests on reading the CSS; (2) confirm the forge check passes tsc and the server.test.ts three.module.js 404, which the builder says also fails without this change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs