Skip to content

feat(ui): start New Session in the background with Cmd/Ctrl+Enter - #197481

Merged
vyctorbrzezowski merged 4 commits into
mainfrom
openclaw/brisk-barnacle-3
Nov 12, 2026
Merged

vyctorbrzezowski merged 4 commits into
mainfrom
openclaw/brisk-barnacle-3

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

New session needs the command palette’s Cmd/Ctrl+Enter background-start workflow without leaving a partial transcript above the next prompt.

User Impact

User impact: Cmd/Ctrl+Enter starts a session in the background while keeping the normal /new screen. The prompt stays in the composer until creation is accepted, then clears and regains focus. The session appears in the sidebar, with the same start, completion, and recovery notices as the command palette.

  • With the default Enter send shortcut, plain Enter still starts and opens the session; Cmd/Ctrl+Enter stays on New session.
  • With Cmd/Ctrl+Enter configured as Send, that chord remains the normal start; add Shift for a background start. The old shifted background chord keeps working.
  • Draft sessions, native coding CLI starts, and mobile Return behavior are unchanged.

Why This Change Was Made

The existing draft submission owner still owns creation, reconnects, attachments, and recovery. Background starts no longer populate the source page’s foreground transcript preview. The created session retains its own prompt and attachments. The palette and New session now share one acceptance/recovery notice; foreground navigation-failure recovery remains intact.

The shortcut dialog and docs describe the chord. The duplicate shifted-modifier catalog entry found in the original PR was removed in favor of the existing definition.

Evidence

  • Behavior: desktop and narrow-width browser checks cover admission without a transcript, cleared/refocused input, typing the next prompt, sidebar admission, and opening the completion notice. Palette creation, preview, and rejected-first-turn recovery checks pass.
  • Real Gateway proof: two successive background tasks completed successfully; their results were opened through the UI, and returning to New session left a clean composer. No intercepted Gateway RPCs or held responses. The model replies are scripted locally.
  • Focused checks: 117 owner-regression tests passed (4.14 s wall time); the final keyboard-catalog/dialog/composer/navigation run passed 114 tests (2.98 s). These runs overlap and are not a summed test count. UI/test typechecks, scoped lint, format, and diff checks pass.
  • CI repairs: the duplicate-chord regression passes. Overlapping foreground recovery tests were consolidated without dropping their assertions; the test-line ratchet now passes with no ceiling or allocation increase. Fresh CI for the pushed head remains the broad verification.
  • Review: fresh local autoreview (Codex engine, P0–P2) found no actionable issues in the correction against 8f4952190535ff131f035b0555821f4ff186c117, with full submission-owner context supplied. The subsequent identical-chord deduplication and test consolidation were checked with the focused run above.

Proof qualification: the real-Gateway captures use installed runtime 4947e40db109a28c1fbdcf692eb431db19d46720 serving the task-built Control UI from an explicit root, not external-model inference. A local runtime rebuild was refused by the managed-service publication guard. The UI build succeeds with startup/CSS bundle-budget warnings and an additional approximately 0.9 KiB new-route warning; no limits were raised. The final descriptor deduplication does not change the rendered chord or captured behavior.

Before / after

Isolated real Gateway, synthetic content, macOS key labels, light theme, 1280×800. Before is the original base UI after Cmd+Enter; after is the corrected flow after successful completion.

Before: opens the created conversation After: keeps the normal New session screen
Before: Cmd+Enter opens the completed session After: clean New session composer after background completion

Full lifecycle video · 2×

Attached below: prompt → Cmd+Enter → clean New session → completion → open the result → repeat with a second task.

Keyboard shortcuts dialog
Before After
Before: keyboard shortcuts dialog After: keyboard shortcuts dialog with New session background chord

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

full-lifecycle-2x.mp4

Maintainer verification

165 focused tests, both background-start browser scenarios and an additional native Mac Cmd+Enter run passed. The captures show the started session and the next draft on the unchanged launcher. Inspected captures and proof limits.

Maintainer integration

Background New Session passed 165 focused tests, both existing browser scenarios, and a separate Cmd+Enter run on macOS. The new session starts while the launcher and next draft remain in place. Inspected Mac browser captures.

The remaining CI failure is the new-page boot JavaScript gzip budget: 787.3 KiB versus 787.0 KiB (run 43158439523, job 130984280920). The maintainer explicitly authorized the budget exception. Other applicable CI and security checks passed; no feature or fix was removed to fit the limit.

roboclaw-bot and others added 2 commits November 12, 2026 02:41
On the New session page, Cmd/Ctrl+Enter now starts the draft in the
background through the same submission path the command palette uses,
instead of duplicating plain Enter. New session stays open for the next
prompt and the started session appears in the sidebar.

With the Cmd/Ctrl+Enter send shortcut selected, that chord remains the
normal start and Cmd/Ctrl+Shift+Enter starts in the background. Draft
sessions and native coding CLI starts have no background start, so
modified Enter keeps starting them normally.

The keyboard shortcuts dialog and docs list the chord.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 50f2c000-bc69-415a-9707-ba3c633d2313
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Nov 12, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR makes Cmd/Ctrl+Enter start New Session drafts in the background under the default send preference and documents the shortcut.

Example: On desktop with Enter selected as the send shortcut, type “Draft a planting plan” and press Cmd+Enter.

  • Before: The created conversation opens.
  • After: New Session stays open with a Session created acknowledgment and an Open session action.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused, and visibly demonstrated, with one confirmed diff-caused CI failure and an additional unattributed baseline failure.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser screenshots show the changed composer navigation and shortcut dialog through the rendered Control UI using a mocked Gateway; they establish the UI behavior without claiming real provider execution.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Starting work in the background requires a less discoverable shortcut that differs from the command palette.
Reason: Maintainer authorship supplies the direction decision, and the small change aligns the two entry points while preserving the selected send preference and existing exceptions.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: the shortcut change is coherent, but a duplicate chord definition introduces a confirmed CI failure.

Priority: P3
Reviewed head: 8f4952190535ff131f035b0555821f4ff186c117

Before merge

  • Reuse the existing shifted modifier chord definition (P2) - The new modifiedShiftEnter entry has exactly the same modifiers and key as approveAlways. Consequently, keyboard-shortcut-catalog.test.ts:118 now sees 35 unique chords among 36 entries, and checks-ui (3/3) fails on the reviewed head. Reuse the existing definition, or rename it and migrate its consumers together, instead of adding a duplicate catalog entry.

Findings

  • [P2] Reuse the existing shifted modifier chord definition — ui/src/lib/keyboard-shortcut-contract.ts:26
Agent review details

How this fits together

The Control UI composer translates keyboard events and the existing send preference into foreground or background submission through DraftSubmissionFlow; the shortcut dialog displays the corresponding chords.

flowchart LR
  A[Keyboard event] --> B[New Session composer]
  C[Send preference] --> B
  B --> D[DraftSubmissionFlow]
  D --> E[Existing session creation]
  E --> F[Foreground chat or background acknowledgment]
  C --> G[Shortcut dialog]
Loading

Technical review

Best possible solution:

Keep the existing submission flow and use one canonical definition of the shifted modifier chord.

Do we have a high-confidence way to reproduce the issue?

Main's foreground behavior is source-verifiable, the supplied browser screenshots show the proposed navigation change, and exact-head CI independently reports the duplicate-chord failure.

Is this the best way to solve the issue?

Changing the existing composer decision is the smallest implementation; the additional duplicate catalog entry is unnecessary.

Full review comments:

  • [P2] Reuse the existing shifted modifier chord definition — ui/src/lib/keyboard-shortcut-contract.ts:26
    The new modifiedShiftEnter entry has exactly the same modifiers and key as approveAlways. Consequently, keyboard-shortcut-catalog.test.ts:118 now sees 35 unique chords among 36 entries, and checks-ui (3/3) fails on the reviewed head. Reuse the existing definition, or rename it and migrate its consumers together, instead of adding a duplicate catalog entry.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4092d358a35a.

Provenance checked

  • New Session keyboard navigation changes intended behavior with a stated reason (fix(ui): open new sessions on modified Enter #167019: Ordinary modified Enter was intentionally made to open the conversation, matching Chat; shifted modified Enter retained explicit background creation.)
  • Mobile submission guards keeps the original intent (52dbc2f: Mobile Return and hardware modifiers must preserve editing rather than submit unfinished drafts.)
  • Shortcut dialog ownership keeps the original intent (a9ff0f7: Keep the single-consumer shortcut presentation implementation beside its owner while preserving its guards and output.)
  • Foreground transition and Details tests keeps the original intent (92d2dfc: Exercise foreground admission and the first Details reveal without abrupt layout movement; switching the trigger to plain Enter retains that scenario.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/lib/keyboard-shortcut-catalog.test.ts ui/src/components/keyboard-shortcuts-dialog.test.ts ui/src/pages/new-session/composer.test.tsx --maxWorkers=1
  • git diff --check
  • Verify exact-head checks-ui and baseline-ratchet results; do not attribute the latter without its failure details.

What I checked:

PR surface

Source +10, Tests +7, Docs +2. Total +19 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 12 2 +10
Tests 4 23 16 +7
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 37 18 +19

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a desktop shortcut and discoverability improvement with existing foreground and background alternatives.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 11, 2026, 9:59 PM ET / November 12, 2026, 02:59 UTC.

roboclaw-bot and others added 2 commits November 12, 2026 04:59
Keep /new on its normal composer while a background start is admitted.
Consume the accepted draft without retaining a source-page transcript,
restore focus, and reuse the command palette acceptance and recovery notice.
Foreground navigation recovery and destination previews remain intact.

Reuse the existing shifted modifier chord instead of defining a duplicate.
Consolidate foreground recovery regressions to keep the test budget green
without increasing its ceiling or dropping the scope-recovery assertions.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29ea3aad-cf6b-4b39-b4c5-e578a20496dc
@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 12, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Maintainer verification on 3926a9d65aadb562b59f0f37ab134e4dcb6887e9: all 165 focused tests and both existing background-start browser scenarios passed. I also repeated the desktop scenario with Cmd+Enter on macOS.

The first capture is the draft before the shortcut. The second shows the newly started session in the sidebar, the confirmation, and a new draft typed without clicking back into the composer. New session stays open, and the next draft survives completion.

These captures use the production Control UI with synthetic Gateway responses. This proves the browser interaction and handoff, not a live model run. The temporary test edit was restored.

Before Cmd+Enter: existing draft on New session

After Cmd+Enter: started session and next draft on the same screen

@vyctorbrzezowski
vyctorbrzezowski merged commit fe46c39 into main Nov 12, 2026
105 of 108 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/brisk-barnacle-3 branch November 12, 2026 09:34
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged as fe46c394a5a76065d255b2586d98a3fc1e664f4a. The background-start shortcut leaves New session open and the next draft ready.

Validation and CI exceptions are documented in the PR body. Human coauthorship was verified in the final squash commit.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
…enclaw#197481)

Start a new session in the background from the launcher with the appropriate modifier shortcut, preserving the next draft and configured send gesture.

Focused and browser checks, including Cmd+Enter on macOS, passed. The approved boot-JavaScript budget exception is documented in the PR.

Co-authored-by: vyctorbrzezowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants