feat(views): support the send shortcut in manual issue create (MUL-4931)#5583
Open
NevilleQingNY wants to merge 2 commits into
Open
feat(views): support the send shortcut in manual issue create (MUL-4931)#5583NevilleQingNY wants to merge 2 commits into
NevilleQingNY wants to merge 2 commits into
Conversation
Agent create has had Cmd/Ctrl+Enter all along; manual create had no submit shortcut at all, in either the title or the description. Reuse the configurable `send` action rather than hardcoding the chord, so a rebound or unbound shortcut follows the user's setting and the IME guards and Shift+Enter replay come along for free: - Description: pass `onSubmit` to ContentEditor, which already carries the extension. - Title: add an opt-in `onSubmitShortcut` to the shared TitleEditor. Plain Enter stays inert there — #5532 removed that trigger a day ago because it created from half-typed titles — and a single-line title has no newline to trade Enter against, so the chord path refuses a plain-Enter `send` binding. Hosts relying on plain-Enter submit (create-project, autopilot-dialog) keep `onSubmit` and are untouched. Also fixes a real double-create: `submitting` is state, so two chord presses in one tick both read the stale value and fired two creates. A ref flips synchronously and single-flights both create panels. Accessibility: the empty-title Create button moves from native `disabled` to `aria-disabled`, so it stays focusable and keyboard/SR users can finally reach the "Enter a title to create" tooltip. Keycaps are decorative, keeping the accessible name "Create Issue". Empty-title chord submits now focus the title instead of silently no-oping. Widen the `send` setting description across all four locales — it claimed to cover only chat, comments, replies, feedback and prompts. Tests: real-ProseMirror coverage for the title chord (every other editor test mocks Tiptap, so nothing verified extension ordering), plus chord/plain-Enter/ empty-title/upload-gate/single-flight/keycaps/aria-disabled cases. The single-flight test dispatches both presses inside one act(); it fails against the old state-based guard. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… (MUL-4931) Review follow-up on #5583. The quick-create ref guard shipped without a regression test, so the claim that both create panels were covered was only true of manual create. That path files a real issue, so a double-fire is a duplicate issue rather than a glitch. Add the same-tick regression: both presses dispatch inside one act(), and it fails against the old state-based guard (expected 1 call, got 2). The Button base only styles native `disabled` (disabled:opacity-50 / disabled:pointer-events-none), so the aria-disabled empty-title button stayed a fully lit, pressable-looking primary. Add local aria-disabled opacity, cursor, and press-animation styles, with no pointer-events-none — that would break the tooltip hover and the click that focuses the title. Verified against compiled Tailwind output: aria-disabled:active:translate-y-0 and the base's active:not-aria-[haspopup]:translate-y-px have equal specificity and the override emits later, so it wins without !important. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
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 MUL-4931.
Agent create has had
Cmd/Ctrl+Enterall along. Manual create had no submit shortcut at all — neither in the title nor the description.Approach
Reuse the configurable
sendaction instead of hardcoding the chord. A rebound (or unbound) shortcut follows the user's setting, and the IME guards +Shift+Enterreplay come along for free — the IME part matters, since a hand-rolled keydown would create an issue when a CJK user hits Enter to pick a candidate.onSubmittoContentEditor; it already carriescreateSubmitShortcutExtension.onSubmitShortcutto the sharedTitleEditor.Why the title needed a new prop rather than the obvious one-liner
Passing
onSubmit={handleSubmit}would have been a one-line fix — and would have reverted #5532 (ed9adc2bb), which removed exactly that a day earlier because it created issues from half-typed titles. Plain Enter stays inert.The chord path also refuses a plain-Enter
sendbinding in the title specifically: the single-line keymap already owns Enter ("finish editing"), and unlike a prose editor a title has no newline to trade it against. The description does follow a plain-Enter binding, consistent with the comment composer.Hosts relying on plain-Enter submit (
create-project,autopilot-dialog) keeponSubmitand are untouched — covered by a test.Drive-by: a real double-create
submittingis React state, so two chord presses in one tick both read the stale value and fired two creates. A ref flips synchronously and single-flights both create panels. The regression test dispatches both presses inside a singleact()— it fails against the old state-based guard (verified:expected 1 call, got 2).Accessibility
disabledtoaria-disabled, so it stays focusable — keyboard and screen-reader users can finally reach the "Enter a title to create" tooltip a native-disabled button had been hiding from them.decorative, keeping the accessible name"Create Issue"rather than"Create Issue Command Enter".aria-keyshortcutsdeliberately skipped — zero usage in the repo, andformatShortcutemits display glyphs (⌘↵), not valid ARIA tokens.Copy
The
sendsetting description claimed to cover only "chat messages, comments, replies, feedback, and prompts". Widened across all four locales (en / zh-Hans / ja / ko).Verification
pnpm typecheck— passpnpm lint— 0 errors; changed files cleanpackages/views— 228 files / 2663 tests passNew coverage includes a real-ProseMirror test file: every other editor test mocks
@tiptap/react, so nothing verified that the submit extension actually wins over the title keymap — the one genuinely new interaction here. Plus chord-in-title, chord-in-description, plain-Enter-inert, empty-title focus, upload-gate, single-flight, keycaps, and aria-disabled cases.Not verified: no run against the live app (no e2e for this flow); behavior rests on the unit + real-editor tests above.
Not in scope
No backend changes; description stays optional; no dialog-level global listener; title plain Enter still does not jump to the description.
🤖 Generated with Claude Code