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

Migrated from github.com/Trevato/SO-ARM100

Mobile portrait shell: video pinned on top with no layout shift, one status strip, a bottom tab bar Drive / Queue / Chat #108

Parked opened this
Closed without merging

On a phone held upright, the camera now sits on top at 16:9, edge to edge, and its box is set aside before the first frame so nothing moves when the video starts. There is one status strip under it, and the tab bar at the bottom reads Drive · Queue · Chat, plus Mod for the owner.

Notes

stopped parked by the crew deploy db2fe4c

opened this

On a phone held upright, the camera now sits on top at 16:9, edge to edge, and its box is set aside before the first frame so nothing moves when the video starts. There is one status strip under it, and the tab bar at the bottom reads Drive · Queue · Chat, plus Mod for the owner. The new browser test has never run and there are no screenshots: Chromium can't start in the sandbox this was built in, so that suite was skipped. Its first real run is the forge check on this push. The type check is clean, and the server, relay, fake-serve, src/ui and new connection-word tests pass.

What changed (Software/so101)

  • src/ui/mobile.css: a new stylesheet with all the phone rules. The page links it after its own styles, only for (orientation: portrait) and (max-width: 640px). Wider screens and phones on their side keep their current layout. The only change there is two hidden elements: the strip's connection line and the tabs' short names.
  • Picture: aspect-ratio: 16 / 9. While the keyboard is up for chat, it still shrinks to give the chat room.
  • Status strip:

- It shows the driver and time left, your place in line, and the arm's connection: Live, Reconnecting…, Simulation, Offline · simulation or No arm. - The connection word comes from src/ui/link-state.js, a small plain-data module with its own tests. - The connection readout and the driver's name that sat over the video are hidden at this size, so the strip is the only place they appear. - The time-left line keeps its height before it has any text, so the strip doesn't grow.

  • Tab bar:

- Drive is first and is there from the first paint, so the bar never reflows. Before your turn its controls are locked and it says why. - Machine is hidden at this size. - Left/right arrow keys follow the order on screen. - The bar's height (56 px + env(safe-area-inset-bottom)), the 44 px minimum tap size, viewport-fit=cover and the right padding that keeps the forge pill's corner free were already in place.

  • src/server.ts: serves .css from src/ui the same way as the page's scripts: the path changes with the content, the file is cached for good, as text/css.
  • The 50 KB first-visit limit: to stay under it, link-state.js loads lazily.

Tests

  • src/phone-shell.test.ts: Playwright on the system Chromium, at 390x844 and 412x915, against bench/fake-serve.ts. It checks:

- the picture's box (0, 0, full width, width × 9/16), and that it doesn't move while the page loads or when you switch tabs; - exactly one strip, directly under the picture, and exactly one visible [data-stop]; - the tab names in order, each tab at least 44 px, the bar 56 px at the bottom, and nothing in the forge pill's corner; - layout shift under 0.01; - a real turn: one person joins and takes control and sees "Your turn" with the time left, and a second sees "you're 1st in line" with the Drive tab locked. - With PHONE_SHOTS=<dir> it saves dark and light screenshots of each state, but nothing has collected them yet. Where no Chromium starts, it skips and prints why.

  • src/server.test.ts: checks how the stylesheet is linked and served.

New dev dependency: playwright-core, because the issue asks for Playwright and layout can only be measured in a real browser. It downloads no browser and has no dependencies of its own. The README explains this.

Not done: On an upright phone, the round-trip time and the arm's activity word (idle, recording, teleop) no longer show, because they were in the readout that's now hidden. The rest of #49 (the Drive bottom sheet with snap points, and landscape) is not in this pull. The pill's corner is taken as the bar's existing 68 px right padding by 56 px, because the forge adds the pill outside the app.

To try it: open the preview in a phone-sized portrait window. To run the browser test with screenshots: cd Software/so101 && PHONE_SHOTS=shots bun test src/phone-shell.test.ts.

Closes #90

🤖 Generated with Claude Code

Closes #90

commented

On a phone held upright, the camera now sits on top at 16:9, edge to edge, and its box is set aside before the first frame so nothing moves when the video starts. There is one status strip under it, and the tab bar at the bottom reads Drive · Queue · Chat, plus Mod for the owner. The new browser test has never run and there are no screenshots: Chromium can't start in the sandbox this was built in, so that suite was skipped. Its first real run is the forge check on this push. The type check is clean, and the server, relay, fake-serve, src/ui and new connection-word tests pass.

What changed (Software/so101)

  • src/ui/mobile.css: a new stylesheet with all the phone rules. The page links it after its own styles, only for (orientation: portrait) and (max-width: 640px). Wider screens and phones on their side keep their current layout. The only change there is two hidden elements: the strip's connection line and the tabs' short names.
  • Picture: aspect-ratio: 16 / 9. While the keyboard is up for chat, it still shrinks to give the chat room.
  • Status strip:

- It shows the driver and time left, your place in line, and the arm's connection: Live, Reconnecting…, Simulation, Offline · simulation or No arm. - The connection word comes from src/ui/link-state.js, a small plain-data module with its own tests. - The connection readout and the driver's name that sat over the video are hidden at this size, so the strip is the only place they appear. - The time-left line keeps its height before it has any text, so the strip doesn't grow.

  • Tab bar:

- Drive is first and is there from the first paint, so the bar never reflows. Before your turn its controls are locked and it says why. - Machine is hidden at this size. - Left/right arrow keys follow the order on screen. - The bar's height (56 px + env(safe-area-inset-bottom)), the 44 px minimum tap size, viewport-fit=cover and the right padding that keeps the forge pill's corner free were already in place.

  • src/server.ts: serves .css from src/ui the same way as the page's scripts: the path changes with the content, the file is cached for good, as text/css.
  • The 50 KB first-visit limit: to stay under it, link-state.js loads lazily.

Tests

  • src/phone-shell.test.ts: Playwright on the system Chromium, at 390x844 and 412x915, against bench/fake-serve.ts. It checks:

- the picture's box (0, 0, full width, width × 9/16), and that it doesn't move while the page loads or when you switch tabs; - exactly one strip, directly under the picture, and exactly one visible [data-stop]; - the tab names in order, each tab at least 44 px, the bar 56 px at the bottom, and nothing in the forge pill's corner; - layout shift under 0.01; - a real turn: one person joins and takes control and sees "Your turn" with the time left, and a second sees "you're 1st in line" with the Drive tab locked. - With PHONE_SHOTS=<dir> it saves dark and light screenshots of each state, but nothing has collected them yet. Where no Chromium starts, it skips and prints why.

  • src/server.test.ts: checks how the stylesheet is linked and served.

New dev dependency: playwright-core, because the issue asks for Playwright and layout can only be measured in a real browser. It downloads no browser and has no dependencies of its own. The README explains this.

Not done: On an upright phone, the round-trip time and the arm's activity word (idle, recording, teleop) no longer show, because they were in the readout that's now hidden. The rest of #49 (the Drive bottom sheet with snap points, and landscape) is not in this pull. The pill's corner is taken as the bar's existing 68 px right padding by 56 px, because the forge adds the pill outside the app.

To try it: open the preview in a phone-sized portrait window. To run the browser test with screenshots: cd Software/so101 && PHONE_SHOTS=shots bun test src/phone-shell.test.ts.

Closes #90

🤖 Generated with Claude Code

commented

Parked by the crew: the preview's deploy failed in the place it ran, not in the change, and it could not be run again

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs