Repository navigation
feat(ui): send new-session drafts to background sessions [AI-assisted] - #128050
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 3:01 PM ET / 19:01 UTC. ClawSweeper reviewWhat this changesThe PR lets the Control UI New Session page start a draft in a separate background session with a keyboard shortcut and later offer an Open action in a completion toast. Merge readinessKeep open for ordinary maintainer review: the exact-head implementation follows the existing session, placement, and Gateway run-wait contracts, and current main does not provide this New Session workflow. The intentional default shortcut remap has an explicit recorded maintainer decision. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI New Session composer creates a session and starts its initial agent run through the Gateway. This path stays on the New Session page, observes that exact run, and hands completion to the shared toast system. flowchart LR
A[New Session draft] --> B[Background shortcut]
B --> C[Gateway session creation]
C --> D[Initial agent run]
D --> E[Exact-run completion watcher]
E --> F[Queued completion toast]
F --> G[Open session navigation]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +254, Tests +323, Docs +1. Total +578 across 17 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only with the recorded default-chord policy, documented modifier-mode alternative, and existing completion-path coverage intact. Do we have a high-confidence way to reproduce the issue? Not applicable: this feature path has source-level coverage for direct and placed starts plus desktop/mobile browser E2E scenarios. Is this the best way to solve the issue? Yes: the implementation reuses the canonical session creation, placement startup, agent.wait, and shared toast owners instead of creating a parallel lifecycle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72dab3e75198. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (17 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Addressed the exact-head shared-toast finding in
Verification:
Repair delta: production +52/-50 (net +2); tests +21/-58 (net -37). The aggregate |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review New exact head
Post-fix proof: UI and core-test tsgo passed, focused oxlint/dead-code/assertion-safety passed, the Control UI production build stayed within performance budgets, and fresh autoreview reported no accepted/actionable findings. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer product decision: accept the shortcut remap as the intended contract for this feature. This was explicitly signed off before implementation.
The documentation, tooltip, ARIA shortcuts, focused tests, live recording, and E2E coverage all implement this chosen behavior. |
|
@clawsweeper re-review The required maintainer product decision is now explicitly recorded at #128050 (comment). Exact-head CI is green at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Re-review progress:
|
5414e6f to
c9a7d8a
Compare
|
Addressed the queued-run P1 at exact head
Worked on by: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Takhoffman <[email protected]> Worked on by: - @Takhoffman
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
Closes #128037
Related: #80901, #81946, #84827, #123247
What Problem This Solves
The Control UI New Session page could only start a draft by navigating into the created session. Operators could not launch independent work from an empty New Session draft, remain on
/new, and receive an actionable completion notice.Existing Chat behavior is intentionally unchanged: when a session already exists and a run is active, Cmd/Ctrl+Enter continues to use Steer now.
Why This Change Was Made
On the New Session page, Cmd/Ctrl+Enter now reuses the canonical
DraftSubmissionFlowfor local, cloud-profile, and paired-device placement. It preserves the selected agent, model, reasoning level, prompt, attachments, and placement owner. The draft clears after accepted creation, the page remains on/new, and the created session appears through the existing session list flow.For operators whose send preference is Modifier+Enter, Cmd/Ctrl+Enter retains ordinary submit and Cmd/Ctrl+Shift+Enter starts the background session. The composer exposes both chords through its accessibility metadata.
The completion notice waits for the exact started turn through the existing
agent.waitcontract. The shared toast host owns FIFO sequencing, so unrelated notices retain their normal replacement priority. No second Gateway event subscription, lifecycle tracker, or protocol surface is added.User Impact
/newand report completion consistently.Evidence
Exact-head desktop recording: New Session draft → background session → completion toast → Open session.
background-desktop-68b2f497.webm
Exact-head mobile recording:
background-mobile-68b2f497.webm
Validated at exact head
68b2f4972397cf3f2a5bb8c8f80614c7bd7f0142, rebased ontoe2c92fce4d8bb32ddadf1150e663013c2ad92095:Worked on by: