Repository navigation
Raise the keyboard from Type in one tap - #436
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-inputwhen 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.blurDismissedKeyboardstill 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.mainmeasures 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:typeGesturemirrors the new click (dock, then the draft in Composer mode).keyboard-openafter Type, modelling the keyboard that the tap raised, asApp.tsxdoes 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 typecheckandbun run typecheck:bunpass.bun run test:quick: 3719 pass, 0 fail.🤖 Generated with Claude Code
https://claude.ai/code/session_01AWodzpMyqdBcX25EE9HhDG