Repository navigation
Conversation
…position Enter Pressing Enter to confirm an IME candidate in the publish wizard's repository path published the repository mid-typing. The keydown handler now ignores composition Enter (isComposing or keyCode 229), matching the other inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The repository-path field now ignores Enter during IME composition while preserving normal Enter-to-publish behavior. Existing publishing safeguards and visibility defaults remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentverified as-is at
before: composing enter prematurely published. after: the same text stays editable during composition. Not verifiednative desktop/mobile, macos/windows, safari and an operating-system ime candidate picker. the chromium composition event was trusted and browser-generated; the safari-style |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. @maria-rcks thanks for the thorough run; we covered your macOS, Safari and OS candidate-picker items on a real Mac with Apple's Japanese (Romaji) input source and real key presses through the OS, in Brave, Safari, Firefox and the desktop app. On main, the Return that confirms the candidate publishes in Brave, Safari and the desktop app; on this head it does not, a plain Return still publishes, and Pinyin behaves the same (Safari sends that Return after |




Problem
On macOS, pressing Return to confirm a Japanese or Chinese IME candidate in the Publish repository path publishes right away with a half-typed name. Safari, Chromium and the desktop app report that Return as
key: "Enter", and the path input submits on every Enter. The pull request thread dialog and the sidebar rename (#6280, fixed in #6281) already ignore it.Change
The path input's Enter handler returns early when
event.nativeEvent.isComposingis true orkeyCodeis 229, the guardPullRequestThreadDialogand the sidebar rename use. Plain Enter still publishes.PublishRepositoryDialogis exported so the test can render it alone.Scope and approval
A very small fix for an obvious bug, under the CONTRIBUTING exception for focused bug fixes. Nothing changes outside composition input.
Real run on a Mac
macOS 27.0.1 (Apple silicon), Apple's Japanese (Romaji) input source, real key presses through the OS. I typed
nihonin the path and pressed Return once while the kanji candidate showed. A stubghlogs calls and refuses credentials, so a publish attempt shows "Publish failed" and nothing reaches GitHub. Main is the base15fe283272; head is8b3dba13fa.Enter, 229,isComposing: true, beforecompositionenddemo-user/にほndemo-user/にほnEnter, 229,isComposing: false, aftercompositionenddemo-user/にほんProcess, 229,isComposing: truecompositionend, so only thekeyCode === 229half catches it.demo-user/ni hao; the head did not.demo-user/한.Verification
vp test run src/components/GitActionsControl.composition.browser.test.tsx: fails onmain(publish.runcalled on the composing Enter), passes with the fix.isComposinghalf, thekeyCode: 229row fails.vp run check:changedpasses.Main, Safari, before Return:
にほnis still composing.Main, after one Return: Safari, Brave and the desktop app each publish and show "Publish failed".
Head, after the same Return: the text commits and the dialog stays on the Repository step.
Event order for the same keys on a plain input, in Safari, Brave and Firefox:
Not checked:
onSubmitEditing), so this guard has no mobile counterpart.Prior PRs
Generated with Claude Opus 5.5 and GPT-6.1 Terra in T3 Code Nightly