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

Migrated from github.com/Trevato/SO-ARM100

Mobile drive sheet: a bottom sheet with two snap points - peek (status, STOP, gripper) and open (~45dvh, joint controls) #218

Parked opened this
Closed without merging

On a phone held upright, the Drive panel is now a bottom sheet on your turn. It has two heights. Peek is 96 px: a handle plus the gripper's Open/Close, sitting under the status strip with STOP, so most of the screen stays the camera view.

Notes

stopped parked by the crew deploy 6649e11

opened this

On a phone held upright, the Drive panel is now a bottom sheet on your turn. It has two heights. Peek is 96 px: a handle plus the gripper's Open/Close, sitting under the status strip with STOP, so most of the screen stays the camera view. Open is 45dvh and adds the joint controls from src/ui/drive.js. One of the issue's three items isn't met: there is no Playwright test.

  • src/ui/sheet.js (new, loaded together with the tab bar from tabs.js):

- Dragging the handle moves the sheet with the finger; letting go settles on the nearer height, and a flick goes the way it was heading. - Tapping the handle, or pressing Enter on it, switches heights, and aria-expanded follows. - A cancelled drag goes back where it was. - The handle has touch-action: none, so the page doesn't scroll or zoom under the drag. The joint controls have pan-y.

  • src/ui/sheet.css (new): every rule applies only once the module has loaded, so until then, or if it fails to load, the page looks as it did before. With reduced motion asked for, the sheet changes height without animating.
  • viewer.html:

- The peek gripper buttons are wired like the existing gripper buttons. - They are disabled when it isn't your turn. - The sheet opens by itself when your turn starts.

  • Tests:

- sheet.test.ts covers the snap maths at 390x844 and 412x915 heights. - It also runs mountSheet against minimal fake page elements: tap, slow drag, flick, a second finger being ignored, cancel, and the keyboard toggle. - server.test.ts now checks that the page links sheet.css and that it is served as text/css. - The README describes the sheet.

Not done: the Playwright test from the issue. The repository has no Playwright or browser, and adding one would break the issue's own "no new dependency" rule. The sandbox also can't download a browser. So these points are not checked in a real browser:

  • the sheet snapping at 390x844 and 412x915;
  • STOP staying visible at both heights.

The fake-element tests above stand in for the snapping logic. A real end-to-end test needs a separate decision to take on Playwright.

I merged main into the branch, which brings in #187 (the video pinned on top in phone portrait). That merge also fixed the first-visit gzip size test, which was failing on the old base. After the merge, bun test passes with no failures. tsc --noEmit still reports untyped-parameter errors in src/ui/*.js, as it already does for tabs.js and video.js.

To try it: open the preview at 390x844 in a browser's device mode and take a turn. The sheet starts open; drag or tap the handle to drop it to peek. STOP stays in the strip above at both heights.

🤖 Generated with Claude Code

Closes #92

commented

On a phone held upright, the Drive panel is now a bottom sheet on your turn. It has two heights. Peek is 96 px: a handle plus the gripper's Open/Close, sitting under the status strip with STOP, so most of the screen stays the camera view. Open is 45dvh and adds the joint controls from src/ui/drive.js. One of the issue's three items isn't met: there is no Playwright test.

  • src/ui/sheet.js (new, loaded together with the tab bar from tabs.js):

- Dragging the handle moves the sheet with the finger; letting go settles on the nearer height, and a flick goes the way it was heading. - Tapping the handle, or pressing Enter on it, switches heights, and aria-expanded follows. - A cancelled drag goes back where it was. - The handle has touch-action: none, so the page doesn't scroll or zoom under the drag. The joint controls have pan-y.

  • src/ui/sheet.css (new): every rule applies only once the module has loaded, so until then, or if it fails to load, the page looks as it did before. With reduced motion asked for, the sheet changes height without animating.
  • viewer.html:

- The peek gripper buttons are wired like the existing gripper buttons. - They are disabled when it isn't your turn. - The sheet opens by itself when your turn starts.

  • Tests:

- sheet.test.ts covers the snap maths at 390x844 and 412x915 heights. - It also runs mountSheet against minimal fake page elements: tap, slow drag, flick, a second finger being ignored, cancel, and the keyboard toggle. - server.test.ts now checks that the page links sheet.css and that it is served as text/css. - The README describes the sheet.

Not done: the Playwright test from the issue. The repository has no Playwright or browser, and adding one would break the issue's own "no new dependency" rule. The sandbox also can't download a browser. So these points are not checked in a real browser:

  • the sheet snapping at 390x844 and 412x915;
  • STOP staying visible at both heights.

The fake-element tests above stand in for the snapping logic. A real end-to-end test needs a separate decision to take on Playwright.

I merged main into the branch, which brings in #187 (the video pinned on top in phone portrait). That merge also fixed the first-visit gzip size test, which was failing on the old base. After the merge, bun test passes with no failures. tsc --noEmit still reports untyped-parameter errors in src/ui/*.js, as it already does for tabs.js and video.js.

To try it: open the preview at 390x844 in a browser's device mode and take a turn. The sheet starts open; drag or tap the handle to drop it to peek. STOP stays in the strip above at both heights.

🤖 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