Fix terminal IME input and mobile session persistence - #38
Closed
goxofy wants to merge 9 commits into
Closed
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
8 tasks
Member
|
The target branch has been updated to |
Member
|
Thank you for the native IME work. It has been extracted and rebased onto |
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.
Summary
This PR fixes two cross-platform mobile issues:
Terminal IME handling
The previous hidden React Native
TextInputforwarded intermediate composition updates to the terminal. With Chinese Pinyin and similar IMEs, this caused composing Latin characters to appear remotely—sometimes twice—before the selected candidate was sent as well.This PR replaces the heuristic input handling with a local Expo native view module:
markedTextRangeto distinguish marked/composing text from final committed text.InputConnectioncomposition APIs such assetComposingText,setComposingRegion,finishComposingText, andcommitText.The implementation is composition-aware rather than language-specific, so it also applies to Japanese conversion, Korean composition, and compatible third-party keyboards.
Mobile session persistence
The mobile startup flow could appear to forget both the configured server and the authenticated session. It restored local state only after network-dependent checks, and any
/users/mefailure could delete the stored JWT—even for temporary network, TLS, proxy, or server errors.This PR updates the flow to:
/users/me/tokenendpoint when necessary.401 Unauthorizedresponse.Build workflow
macos-15runner for the unsigned iOS/iPadOS workflow so forks without access to the upstream Blacksmith runner can execute it.Verification
npm run lint— completed with 0 errors (existing repository warnings remain).npx expo export --platform all— iOS, Android, and web bundles generated successfully.npx expo-modules-autolinking resolve --platform android— resolvesterminal-ime-inputandTerminalImeInputModule.npx expo-modules-autolinking verify --platform android— passed.:terminal-ime-input:compileReleaseKotlin— passed.app:assembleReleaseforarm64-v8a— passed.npx tsc --noEmitstill reports pre-existing errors inWarpgateDialog.tsxandTunnelManager.tsx; no new TypeScript errors were reported in the files changed by this PR.🤖 Generated with Claude Code