Skip to content

Raise the keyboard from Type in one tap - #436

Merged
powerfooI merged 1 commit into
powerfooI:mainfrom
IvoryHeart:mobile-one-tap-type
Oct 16, 2026
Merged

powerfooI merged 1 commit into
powerfooI:mainfrom
IvoryHeart:mobile-one-tap-type

Conversation

@IvoryHeart

Copy link
Copy Markdown
Contributor

Closes #434.

Summary

On phones, Type opens the input dock but leaves Composer's draft unfocused, so writing a message takes a second tap on the editor. This PR treats the Type tap itself as the request to type.

  • App.tsx: within Type's gesture, after focusing the dock (which still routes Direct to the terminal), focus .terminal-composer-input when the dock's mode is Composer. Mobile browsers only raise the keyboard for focus inside a user gesture, so this has to happen in the tap.
  • Everything else Fix unwanted Composer keyboard activation #359 fixed stays the same: sends, command picks, uploads and scrolling leave a dismissed keyboard closed, and blurDismissedKeyboard still retires residual focus on outside touches.
  • FEATURES.md: the Type line describes the one-tap behaviour.
  • scripts/check-web-assets.mjs: the initial JS budget goes from 802 to 803 KiB. main measures 802.0/802 KiB; with this change it is 802.1 KiB. If Close mobile layers with the phone's Back #433 lands first, this becomes a one-line conflict (Close mobile layers with the phone's Back #433 uses 804).

Tests

TerminalView.inputMode.test.ts:

  • typeGesture mirrors the new click (dock, then the draft in Composer mode).
  • "Type keeps Composer neutral…" becomes "Type focuses Composer's draft in one tap, and later work stays neutral". It expects the draft focused after Type, and keeps the dismissal, swipe and output checks.
  • The Composer touch-scroll cases set keyboard-open after Type, modelling the keyboard that the tap raised, as App.tsx does on a phone. A scroll while typing keeps focus; the closed-keyboard path is still covered by the test above.

Validation

  • bun run format:check, bun run lint, bun run typecheck and bun run typecheck:bun pass. bun run test:quick: 3719 pass, 0 fail.
  • The same one-tap behaviour ships in a Roamgate-derived app and was tried on a physical phone there. This Roamgate branch itself has not been tried on a device.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AWodzpMyqdBcX25EE9HhDG

On phones, Type opened the input dock and left Composer's draft unfocused,
so writing a message took a second tap on the editor. Type's tap is the
request to type: within the same gesture, after focusing the dock (which
still routes Direct to the terminal), focus Composer's draft so mobile
browsers raise the keyboard at once. Everything else from powerfooI#359 stays:
sends, command picks, uploads and scrolling leave a dismissed keyboard
closed, and a touch outside the editor still retires residual focus.

The input-mode test mirrors the new gesture, expects the draft focused
after Type, and models the open keyboard in the Composer scroll case.
The initial JS budget rises from 802 to 803 KiB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWodzpMyqdBcX25EE9HhDG
@github-actions github-actions Bot added the enhancement New feature or request label Oct 16, 2026
@powerfooI
powerfooI merged commit bbdc044 into powerfooI:main Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile: let Type raise the keyboard in Composer in one tap

2 participants