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

Migrated from github.com/Trevato/SO-ARM100

Phone portrait: a bottom tab bar Drive / Queue / Chat (/ Mod for admins) shows one panel at a time #146

Parked opened this
Closed without merging

Tab bar for phone portrait: Drive, Queue and Chat, plus Mod for admins and moderators. It shows one panel at a time. The only failing test here is the vendored-library check, and I think that's this sandbox, not the code.

Notes

stopped parked by the crew deploy 0156e44

opened this

Tab bar for phone portrait: Drive, Queue and Chat, plus Mod for admins and moderators. It shows one panel at a time. The only failing test here is the vendored-library check, and I think that's this sandbox, not the code. I made no new commits this run and pushed nothing, so the pull is unchanged.

Tests. bun test ran 396 tests: 395 pass and 1 fails. The failure is the "serves the model, its meshes and the vendored libraries" test, which gets a 404 for /vendor/three/build/three.module.js. bun install failed in this sandbox (read-only temp dir), so node_modules is missing. I didn't confirm this against main. The tab tests, the manifest test and the type check show no failures. The type check ran without types, so it isn't a real check.

Why the earlier tries went red. My best explanation is the health probe, not the tab code. forge.json pointed health at /status, which returns 503 until the arm has answered once, so every preview the Pi couldn't reach failed. The branch now has health at /, and a manifest test fails if it goes back to /status. I haven't seen a green check on this branch, so that is the thing to watch on this push.

What the pull contains

  • src/ui/tabs.js is a pure function from hash to visible panel. Unknown hashes fall back to Drive, and Mod is absent for a plain viewer.
  • src/ui/tabs.css styles the bar. It is 56 px plus the bottom safe-area inset, with targets of at least 44 px. It is hidden on desktop and in landscape, and it leaves padding so the forge pill is not covered.
  • viewer.html wires the tabs. The chosen tab is kept in location.hash, so a reload keeps it. STOP sits outside every tab, so it is never hidden.
  • server.ts now serves .css modules from /ui/<hash>/ as text/css, with the same strict name pattern as the .js ones.
  • tabs.test.ts covers the fallback to Drive and the missing Mod tab for a plain viewer.

Closes #113

🤖 Generated with Claude Code

Closes #113

3 earlier comments
commented

Tab bar for phone portrait: Drive, Queue and Chat, plus Mod for admins and moderators. It shows one panel at a time. The only failing test here is the vendored-library check, and I think that's this sandbox, not the code. I made no new commits this run and pushed nothing, so the pull is unchanged.

Tests. bun test ran 396 tests: 395 pass and 1 fails. The failure is the "serves the model, its meshes and the vendored libraries" test, which gets a 404 for /vendor/three/build/three.module.js. bun install failed in this sandbox (read-only temp dir), so node_modules is missing. I didn't confirm this against main. The tab tests, the manifest test and the type check show no failures. The type check ran without types, so it isn't a real check.

Why the earlier tries went red. My best explanation is the health probe, not the tab code. forge.json pointed health at /status, which returns 503 until the arm has answered once, so every preview the Pi couldn't reach failed. The branch now has health at /, and a manifest test fails if it goes back to /status. I haven't seen a green check on this branch, so that is the thing to watch on this push.

What the pull contains

  • src/ui/tabs.js is a pure function from hash to visible panel. Unknown hashes fall back to Drive, and Mod is absent for a plain viewer.
  • src/ui/tabs.css styles the bar. It is 56 px plus the bottom safe-area inset, with targets of at least 44 px. It is hidden on desktop and in landscape, and it leaves padding so the forge pill is not covered.
  • viewer.html wires the tabs. The chosen tab is kept in location.hash, so a reload keeps it. STOP sits outside every tab, so it is never hidden.
  • server.ts now serves .css modules from /ui/<hash>/ as text/css, with the same strict name pattern as the .js ones.
  • tabs.test.ts covers the fallback to Drive and the missing Mod tab for a plain viewer.

Closes #113

🤖 Generated with Claude Code

commented

The check failed because forge.json had a check block with only limits and no run. I added check.run: install, bun x tsc --noEmit, then bun test, all under Software/so101. I've pushed it, but I haven't seen the forge's check run on this push.

Locally I ran only src/manifest.test.ts and src/ui: 61 tests pass. I didn't run the full suite or the new check.run command, and I couldn't run bun install in this sandbox. The type check ran earlier without types, so it isn't a real check either.

The branch adds the phone-portrait bottom tab bar (Drive / Queue / Chat, plus Mod for admins and moderators), which shows one panel at a time and keeps the chosen tab in location.hash. Its logic is in src/ui/tabs.js, its styles in src/ui/tabs.css, and server.ts now serves .css UI modules. STOP stays outside every tab. The health probe is / instead of /status, which returns 503 until the arm answers.

Closes #113

🤖 Generated with Claude Code

commented

The type check was failing in src/ui/tabs.js: untyped parameters and a possibly-undefined TABS[0]. I added JSDoc types, and bun x tsc --noEmit is now clean. The full bun test run passes, 396 of 396, with node_modules installed this time. The earlier check.run fix made the type check part of the forge's check, so these errors became visible. The forge gave me no log for this failure, so I'm inferring this was the cause; I haven't seen the forge's check run on this push.

The pull adds the phone-portrait bottom tab bar (Drive / Queue / Chat, plus Mod for admins and moderators). Tab logic is in src/ui/tabs.js and styles are in src/ui/tabs.css. The chosen tab is kept in location.hash, and STOP stays outside every tab. server.ts now serves .css UI modules. forge.json has the health probe at / and a check.run of install, type check, then tests.

Closes #113

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs