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

Migrated from github.com/Trevato/SO-ARM100

While the keyboard is open on a phone, the camera shrinks to a 120 px mini player and returns when it closes #351

Merged opened this

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

Merged

While the chat input has focus (the keyboard is open), the camera now shrinks to a 120 px mini player. When the input loses focus, it returns to full size. I didn't run the Playwright check at 390x844, so the 120 px height and the visible composer are untested in a browser.

Notes

shipped merged

opened this

While the chat input has focus (the keyboard is open), the camera now shrinks to a 120 px mini player. When the input loses focus, it returns to full size. I didn't run the Playwright check at 390x844, so the 120 px height and the visible composer are untested in a browser.

  • How it works: the page already added a typing class to the shell on focus and removed it on blur, and gave the camera 24% of the viewport height while that class was on. I changed that to a fixed 120 px in viewer.html for the base layout and in ui/mobile.css for the phone-portrait layout.
  • Triggered by focus, not the visual viewport: it follows focus on the chat input, not the visual viewport shrinking. I didn't add a viewport-resize trigger.
  • Chat-list jump: I did not check whether the chat list jumps when the keyboard closes.
  • Tests: I added a test in composer-viewport.test.ts that checks both CSS rules say 120 px. It passes, along with the portrait and landscape layout tests. I did not run the full bun --cwd Software/so101 test suite. bun x tsc --noEmit failed here ("bun is unable to write files to tempdir: ReadOnlyFileSystem"), so there is no type check result.
  • Config: forge.json is untouched.

🤖 Generated with Claude Code

Closes #287

commented

While the chat input has focus (the keyboard is open), the camera now shrinks to a 120 px mini player. When the input loses focus, it returns to full size. I didn't run the Playwright check at 390x844, so the 120 px height and the visible composer are untested in a browser.

  • How it works: the page already added a typing class to the shell on focus and removed it on blur, and gave the camera 24% of the viewport height while that class was on. I changed that to a fixed 120 px in viewer.html for the base layout and in ui/mobile.css for the phone-portrait layout.
  • Triggered by focus, not the visual viewport: it follows focus on the chat input, not the visual viewport shrinking. I didn't add a viewport-resize trigger.
  • Chat-list jump: I did not check whether the chat list jumps when the keyboard closes.
  • Tests: I added a test in composer-viewport.test.ts that checks both CSS rules say 120 px. It passes, along with the portrait and landscape layout tests. I did not run the full bun --cwd Software/so101 test suite. bun x tsc --noEmit failed here ("bun is unable to write files to tempdir: ReadOnlyFileSystem"), so there is no type check result.
  • Config: forge.json is untouched.

🤖 Generated with Claude Code

Approved

Does what the issue asks: while the chat input has focus the camera row is a fixed 120px in both the base layout (viewer.html:60) and the phone-portrait grid (mobile.css:25), and the existing blur handler returns it. The preview serves the new rule. Landscape keeps its own typing rule. The change is small, adds no dependency and touches no security surface. Next two things: (1) check the 120px row and the visible composer in a real 390x844 browser, since the author did not; (2) the trigger is focus, not the visual viewport, so a hardware keyboard or a dismissed keyboard with focus kept leaves the mini player. Consider also checking the chat list does not jump when the keyboard closes. The test only greps the CSS text, which is acceptable here but will not catch layout regressions.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs