Skip to content

feat(views): support the send shortcut in manual issue create (MUL-4931)#5583

Open
NevilleQingNY wants to merge 2 commits into
mainfrom
agent/walt/cc4551fb
Open

feat(views): support the send shortcut in manual issue create (MUL-4931)#5583
NevilleQingNY wants to merge 2 commits into
mainfrom
agent/walt/cc4551fb

Conversation

@NevilleQingNY

Copy link
Copy Markdown
Collaborator

Closes MUL-4931.

Agent create has had Cmd/Ctrl+Enter all along. Manual create had no submit shortcut at all — neither in the title nor the description.

Approach

Reuse the configurable send action instead of hardcoding the chord. A rebound (or unbound) shortcut follows the user's setting, and the IME guards + Shift+Enter replay 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.

  • Description — pass onSubmit to ContentEditor; it already carries createSubmitShortcutExtension.
  • Title — add an opt-in onSubmitShortcut to the shared TitleEditor.

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 send binding 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) keep onSubmit and are untouched — covered by a test.

Drive-by: a real double-create

submitting is 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 single act() — it fails against the old state-based guard (verified: expected 1 call, got 2).

Accessibility

  • Empty-title Create moves from native disabled to aria-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.
  • Keycaps are decorative, keeping the accessible name "Create Issue" rather than "Create Issue Command Enter".
  • An empty-title chord submit now focuses the title instead of silently no-oping.
  • aria-keyshortcuts deliberately skipped — zero usage in the repo, and formatShortcut emits display glyphs (⌘↵), not valid ARIA tokens.

Copy

The send setting 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 — pass
  • pnpm lint — 0 errors; changed files clean
  • packages/views — 228 files / 2663 tests pass

New 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

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>
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multica-docs Ready Ready Preview, Comment Jul 17, 2026 10:04am

Request Review

… (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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant