Repository navigation
fix(ui): open new sessions on modified Enter - #167019
Conversation
Treat Cmd/Ctrl+Enter as ordinary submission with either send preference. Reserve Cmd/Ctrl+Shift+Enter for explicit background creation so a normal send opens the new conversation automatically.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 8, 2026, 3:46 AM ET / 07:46 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch makes Cmd/Ctrl+Enter open a newly created conversation and reserves Cmd/Ctrl+Shift+Enter for background creation under either send preference. Example: Submit “verify another default mock” with Ctrl+Enter using the default send preference
Review scores
ProductKind: Preference · Worth it: Yes Merge readiness⛔ Blocked before merge - 2 items remain This PR needs real behavior proof before merge. No concrete patch defect was found, but the prior browser-proof gap remains; maintainer-authored work also stays open. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI’s New Session composer turns a draft and keyboard gesture into a session-creation request. The existing submission flow then either opens the conversation or keeps New Session visible with background completion feedback. flowchart TD
A[Draft and saved send preference] --> B[New Session keyboard handling]
B --> C{Shifted modified Enter?}
C -->|No| D[Ordinary submission]
C -->|Yes| E[Background submission]
D --> F[Existing session creation flow]
E --> F
F --> G[Open conversation or show completion feedback]
Technical reviewBest possible solution: Keep the existing creation owner and the area owner’s uniform shortcut mapping, with browser-boundary evidence for fresh and saved preferences. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: source and the introducing PR establish that remaining on New Session was designed behavior. The changed browser scenarios have not been executed. Is this the best way to solve the issue? Yes, for the recorded area-owner direction: changing keyboard dispatch reuses the existing foreground and background submission paths without adding another creation or navigation owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a06612710e67. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: unit tests only. Added test files: 2. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -2, Tests +3, Docs 0. Total +1 across 4 files. View PR surface stats
Mantis proof suggestionWeb UI chat proof could directly demonstrate shortcut-driven conversation opening and retained background completion. A maintainer can ask Mantis to capture proof by posting this exact PR comment: LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment History |
|
Merged via squash auto-merge.
|
* fix(ui): open new sessions on modified Enter Treat Cmd/Ctrl+Enter as ordinary submission with either send preference. Reserve Cmd/Ctrl+Shift+Enter for explicit background creation so a normal send opens the new conversation automatically. * test(ui): align emoji background shortcut with shifted Enter
What Problem This Solves
Fixes New Session leaving users at a “Session created” card when they submit with Cmd/Ctrl+Enter under the default Enter-send preference.
User Impact
Cmd/Ctrl+Enter now opens the created conversation automatically with either send preference. Explicit background starts use Cmd/Ctrl+Shift+Enter; they retain the completion card and notification behavior. Selected repositories, devices, attachments, and first-turn delivery use the existing creation flow unchanged.
Why This Change Was Made
New Session treated the ordinary modified-Enter send gesture as a background request, unlike Chat. Reserve the shifted shortcut for intentional background creation instead of changing navigation after the session has already been created.
Evidence
Composer keydown regression: both Ctrl+Enter and Meta+Enter failed before the fix because ordinary submission was not invoked; the three unaffected cases passed.
After the fix, 118 focused tests passed across the composer, draft submission, background completion, and confirmed-session navigation (8.73s wrapper wall; 7.27s Vitest wall, one worker).
Existing coverage verifies attachments, selected project/device placement, first-turn handoff, reconnects, and explicit background creation. The browser transition scenario now exercises modified Enter and the shifted background shortcut.
Local static checks passed: UI production typecheck; ui-pages, ui-e2e, gateway-root, ui-other, gateway-methods, ui-chat, ui-app, and ui-components consumer typechecks; coercion-helper guard; script, production, and full-tree dead-code scans; targeted lint and style checks. The interrupted consumer checks were resumed after verifying and releasing their dead build-artifact owner.
Rendered browser proof passed on macOS arm64 using existing Chrome 151.0.7922.170, Playwright 1.63.0 and the exact signed source snapshot with the frozen lockfile. The original bundled transition suite passed all four selected foreground/background/reconnect cases (17 unrelated cases intentionally unselected; 18.69s).
A disposable browser proof harness exercised Ctrl+Enter, Cmd+Enter, Ctrl+Shift+Enter and Cmd+Shift+Enter under both send preferences. All eight combinations passed: each issued exactly one sessions.create and zero extra chat.send requests; ordinary modified Enter opened the created conversation, while shifted modified Enter retained New Session and its Open session button. Sixteen before/after PNGs and per-case receipts are retained for review.
The first disposable harness attempt passed four foreground cases but failed its four background cases before page navigation because the mock was not installed yet. After correcting only that fixture ordering, only those four background cases were rerun and passed (15.06s). No product-source changes or passing-suite reruns were needed.
This is rendered, bundled-UI proof with a deterministic mocked Gateway, not authenticated Gateway/provider proof. No real session, model run, deployment, OS-library install, or personal browser-profile change was performed.
GitHub UI shard 2/3 exposed two stale emoji-background fixture inputs on the initial head. The follow-up changes only those two
shiftKeybooleans to match the shifted background gesture; all 92 emoji interaction tests then passed. Runtime code and all earlier browser-proof inputs are byte-identical on the final signed head39ba9a3a91d3749f1dd11ddc1e133f47d5bccf32.Shortcut transition
This intentionally changes the previously documented default-mode Cmd/Ctrl+Enter background gesture to ordinary submit, matching the requested automatic-open behavior. Background creation remains available with Cmd/Ctrl+Shift+Enter under both preferences. The documentation and accessibility shortcuts are updated together.