Repository navigation
fix: prevent IME Enter from submitting text fields across Orca - #25480
Conversation
The File Explorer's New File / New Folder / Rename input submitted on every Enter keydown, including the Enter that only confirms a CJK IME conversion, so a name typed with a Japanese, Chinese or Korean input method was created or renamed half-typed. Escape, which the IME uses to cancel a conversion, dismissed the input the same way. Route the input through the shared IME Enter gesture tracker so the marked confirm Enter and its unmarked follow-up are both ignored, and clear the tracker on blur and when the keyed input element is replaced. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared IME-aware input and textarea components and applies them to renderer fields across the application. It updates keyboard handling in selected editors, command search, worktree fields, and File Explorer inline inputs. Tests cover IME confirmation, Enter redispatch, Escape handling, and ordinary key behavior. An end-to-end test covers File Explorer file creation, folder creation, and rename. Fixed issue severity: Medium Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The IME regression tests and local helper rename present no identified merge blocker. Complete the pending CI checks before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes add input safeguards rather than new access or permissions. Broad reuse makes correct submission and cleanup important, and native input-method behavior has not been fully verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9469a407-11bd-407c-bec6-65f7aed20813
📒 Files selected for processing (60)
docs/reference/ime-regression-checklist.mdsrc/renderer/src/components/LinearIssueTextEditor.tsxsrc/renderer/src/components/TerminalSearch.tsxsrc/renderer/src/components/automations/AutomationEditorPromptSection.tsxsrc/renderer/src/components/automations/AutomationTimeField.tsxsrc/renderer/src/components/browser-pane/annotate/MarkupOverlay.tsxsrc/renderer/src/components/browser-pane/annotate/browser-page-annotation-tray.tsxsrc/renderer/src/components/browser-pane/annotate/pending-browser-annotation-card.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserFind.tsxsrc/renderer/src/components/cmd-j/PaletteFilterFieldOptions.tsxsrc/renderer/src/components/diff-comments/DiffCommentCard.tsxsrc/renderer/src/components/diff-comments/DiffCommentDraftCard.tsxsrc/renderer/src/components/diff-comments/DiffCommentPopover.tsxsrc/renderer/src/components/editor/EditorPanelHeaderPath.tsxsrc/renderer/src/components/editor/IpynbViewer.tsxsrc/renderer/src/components/editor/MarkdownPreviewAnnotationComposer.tsxsrc/renderer/src/components/editor/PdfFind.tsxsrc/renderer/src/components/editor/RichMarkdownLinkBubble.tsxsrc/renderer/src/components/editor/rich-markdown-key-handler.test.tssrc/renderer/src/components/editor/rich-markdown-key-handler.tssrc/renderer/src/components/github-project/ProjectCellValueEditors.tsxsrc/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsxsrc/renderer/src/components/linear-issue-sub-issues.tsxsrc/renderer/src/components/linear-item-drawer-comment-footer.tsxsrc/renderer/src/components/native-chat/NativeChatQuestionCard.tsxsrc/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsxsrc/renderer/src/components/new-workspace/ComposerParentWorktreePicker.tsxsrc/renderer/src/components/new-workspace/ProjectCombobox.tsxsrc/renderer/src/components/new-workspace/RunTargetField.tsxsrc/renderer/src/components/pull-request-page/mentions/textarea.tsxsrc/renderer/src/components/right-sidebar/AiVaultPanelHeader.tsxsrc/renderer/src/components/right-sidebar/SearchQueryRow.tsxsrc/renderer/src/components/right-sidebar/checks-panel/active-content.tsxsrc/renderer/src/components/right-sidebar/file-explorer-inline-input-ime-enter.test.tsxsrc/renderer/src/components/right-sidebar/file-explorer-inline-input-row.tsxsrc/renderer/src/components/right-sidebar/right-panel-comment-composer.tsxsrc/renderer/src/components/right-sidebar/source-control/panel/header-toolbar.tsxsrc/renderer/src/components/sidebar/RemoteFileBrowser.tsxsrc/renderer/src/components/sidebar/WorkspaceKanbanSettingsMenu.tsxsrc/renderer/src/components/sidebar/WorktreeDisplayNameField.tsxsrc/renderer/src/components/sidebar/WorktreeIssueLinkField.tsxsrc/renderer/src/components/sidebar/WorktreeMetaDialog.tsxsrc/renderer/src/components/sidebar/WorktreeReviewLinkField.tsxsrc/renderer/src/components/skills/SkillShareReleaseNotesField.tsxsrc/renderer/src/components/tab-bar/TabBarQuickCommandsMenu.tsxsrc/renderer/src/components/tab-bar/use-tab-bar-quick-command-search-input.test.tssrc/renderer/src/components/tab-bar/use-tab-bar-quick-command-search-input.test.tsxsrc/renderer/src/components/tab-bar/use-tab-bar-quick-command-search-input.tssrc/renderer/src/components/task-page/linear/IssueDialog.tsxsrc/renderer/src/components/task-page/linear/ProjectFields.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/ui/command.tsxsrc/renderer/src/components/ui/input.tsxsrc/renderer/src/components/ui/textarea.tsxsrc/renderer/src/lib/ime-composition-keyboard-event.tssrc/renderer/src/lib/ime-text-field.test.tsxsrc/renderer/src/lib/ime-text-field.tsxsrc/renderer/src/lib/screen-submit-shortcut.test.tssrc/renderer/src/lib/screen-submit-shortcut.tstests/e2e/file-explorer-ime-enter.spec.ts
💤 Files with no reviewable changes (3)
- src/renderer/src/components/new-workspace/ComposerParentWorktreePicker.test.tsx
- src/renderer/src/components/tab-bar/use-tab-bar-quick-command-search-input.test.ts
- src/renderer/src/components/tab-bar/TabBarQuickCommandsMenu.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
|
Addressed both actionable review comments in 5619069, with failing-before/passing-after regressions for Process/229 release ordering and tests preserving Markdown save behavior. Three independent sub-agent reviews also found and fixed IME Escape dismissal in overlay capture handlers; a separate second pass found no blocking regression. Current head incorporates main and passes 891 tests across 71 files plus the full project typecheck. CSV consumers added on main were reviewed and tested with the shared textarea guard. CI is still pending before merge. The automated docstring-coverage suggestion is intentionally not applied: AGENTS.md requires concise comments only for non-obvious behavior. The shared guard and gesture expiry have targeted explanations; adding docstrings to every mechanically migrated field would conflict with that repository rule. Native OS candidate-window behavior remains an explicit validation gap; the attached proof and Electron tests use hidden Chromium composition through CDP. |
…rward dialog (#34315) The SSH port-forward dialog renders its four fields as raw inputs inside a form with a submit button. IMEs that redispatch an unmarked Enter after compositionend therefore trigger implicit submission with the half-typed value. The pre-revert ImeEnterGuardedForm covered this form; #25480 moved the guard into shared fields but did not reach these raw inputs, and the #28609 lint rule only inspects Enter handlers, which these fields lack. Render the fields with ImeInput so the shared gesture tracker swallows the confirmation and its redispatch while ordinary Enter still submits. Co-authored-by: Seiji Kohara <[email protected]>
ELI5
Pressing Enter to confirm Japanese, Chinese, or Korean text should not also create a file, save a name, send a comment, or select a command. Keep the field open until the user finishes typing and deliberately submits.
What Changed
Input,Textarea,CommandInput, and equivalent unstyled fields. This covers settings, names, issue/review pickers, comments, annotations, searches, and Native Chat questions. Existing field-level trackers are removed where the shared component now owns them.Why
The original File Explorer fix was sound but the same omissions appeared in many other fields. Protecting shared inputs prevents another round of per-field omissions. Reusing the existing tracker preserves both confirmation event orders, blur/remount cleanup, ordinary Enter, modifier submits, and Shift+Enter; a plain
isComposingcheck misses the unmarked follow-up.Linked Issue
Fixes #25035. Incorporates and extends #25038; that narrower PR does not need to land separately.
Visual Proof
Hidden Electron renderer, macOS, disposable folder workspace, Chromium IME composition via CDP. No native OS IME or foreground window was used.
Before: confirming
議事録closes the input and creates the incomplete filename.After: the same confirmation leaves the name editable; typing
.mdand another Enter creates議事録.md.Another affected surface: Save As remains open after confirming
報告, then saves報告-final.mdafter further typing and deliberate Enter.Testing
891 tests passed across 71 files on the branch after merging current main, including the existing terminal IME suites, Native Chat keyboard handlers, workspace metadata, command search, parent pickers, comments, the new shared-field and overlay tests, and CSV editing consumers added by current main. An independent review confirmed that the merged Textarea cell variant and CSV key handling remain compatible. Another 44 tests across seven neighboring rename/field files pass, including the editor-header test updated to distinguish confirmation redispatch from a later deliberate Enter.
ORCA_BACKGROUND_LAUNCH=1 pnpm run test:e2e tests/e2e/file-explorer-ime-enter.spec.ts --workers=1: all six real Electron tests passed. Each operation covers continued typing and a Process/229 release followed by an unmarked confirmation redispatch, then deliberate Enter without additional typing. They check the Explorer and disk. The first run exposed the delayed-frame carry bug on Rename; the fixed run passes all operations. The redispatch is replayed synchronously after key release so rendering timing cannot make the test flaky.pnpm tcandpnpm run check:code-quality:changedpass. The E2E run rebuilt the Electron app in e2e mode and the CLI successfully. The fullpnpm lintpipeline also passes. Final-head CI passed all five unit-test shards, relay integration, both packaging checks (including Windows), Electron E2E, and the aggregate verification checks. The separate, explicitly non-gatingtypecheck:e2ereports existing repository-wide type debt and missing cloud dependencies; no diagnostic names the new spec.Review
Three independent sub-agent reviews and a second pass checked event ordering, consumer regressions, and coverage. Findings fixed: keyCode-only follow-up ownership, Process/229 release ordering, delayed-frame suppression after further typing, Markdown save handling, and overlay Escape capture. Regression tests cover these cases. Both actionable bot comments are addressed. Tests also exercise bubbling into command selection, lifecycle callbacks, blur, remounts, normal keys, modifier submits, and newlines. Existing command-input mocks were replaced with the real component where they would otherwise bypass the new protection.
Agent skill upstream boundary
Notes
CI exposed a false-positive localization finding in a hook-preparation function newly added on main. Renaming its local
confirmfunction toconfirmHookavoids confusing internal hook-kind keys with browser-dialog text. Independent review confirmed this is a pure identifier rename; all eight related tests and localization coverage pass.Changes are renderer event handling. Local/SSH execution routing, Git providers, file paths, and remote wire formats are unchanged. Folder workspaces are exercised by the Electron tests. Terminal and Native Chat retain their specialized input ownership. Mobile native
onSubmitEditingpaths were inspected and left unchanged. Native Windows/Linux/macOS IMEs and live SSH were not exercised. Overlay Escape protection relies on native IME markers; markerless Escape during active composition remains a preexisting overlay limitation. Hidden-renderer no-redispatch frame expiry is covered deterministically in unit tests.Checklist