Skip to content

fix(ui): open new sessions on modified Enter - #167019

Merged
vincentkoc merged 2 commits into
mainfrom
fix/new-session-auto-open-20261008
Oct 8, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/new-session-auto-open-20261008

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

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 shiftKey booleans 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 head 39ba9a3a91d3749f1dd11ddc1e133f47d5bccf32.

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.

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.
@clawsweeper

clawsweeper Bot commented Oct 8, 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: XS labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 8, 2026, 3:46 AM ET / 07:46 UTC (Revision 3).

ClawSweeper review

What this changes

The 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

  • Before: The session starts in the background and the user remains on New Session.
  • After: The created conversation opens automatically.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation is coherent and has no identified defect, but confidence remains limited by unexecuted browser behavior.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes
User problem: A user pressing Cmd/Ctrl+Enter from New Session stays at a “Session created” card instead of entering the conversation.
Reason: The previous shortcut was intentional, so this is a preference change rather than a broken contract. The author’s established New Session maintenance history and explicit direction support the small normalization while retaining deliberate background creation.

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
Reviewed head: c0b3270c0018853b5a13e21b110fdd6f5df87412

Before merge

  • Resolve merge risk (P1) - Browser behavior with an existing saved send preference remains unverified; demonstrate that ordinary modified Enter opens the conversation and the shifted chord retains background completion without changing the saved preference.
  • Complete next step (P2) - Add browser evidence for both shortcut chords and send preferences, including an existing saved preference. Screenshots or a recording with interaction results are suitable; redact private endpoints and credentials. Updating the PR body triggers a fresh review, or a maintainer can comment @clawsweeper re-review.

Findings

None.

Tests

  • Missing end-to-end proof: The changed browser scenarios remain unexecuted: ordinary modified Enter must open the created conversation, and shifted modified Enter must retain New Session and completion feedback under both send preferences, including a saved preference. The reported base/head failure applies only to composer-level tests.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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 options

Maintainer options:

  1. Verify saved-preference behavior (recommended)
    Provide browser results for both shortcut chords under both send preferences, including an existing saved preference.

Provenance checked

  • ui/src/pages/new-session/composer.ts keyboard dispatch and shortcut metadata changes intended behavior with a stated reason (0f0ae34: Allow operators to start independent work from New Session without navigating away, with a preference-dependent background chord.)
  • ui/src/pages/new-session/composer.test.ts shortcut expectations changes intended behavior with a stated reason (0f0ae34: Protect ordinary submission and the intentionally preference-dependent background shortcut.)
  • ui/src/e2e/new-session-page.transition.e2e.test.ts background creation scenario keeps the original intent (0f0ae34: Exercise background creation, retained New Session navigation, completion feedback, and opening the created conversation.)
  • ui/src/e2e/new-session-page.transition.e2e.test.ts default mock creation scenario keeps the original intent (c520e66: Prove that the default mock Gateway supports real browser session creation and subsequent roster reconciliation.)
  • docs/web/control-ui/chat.md New Session shortcut contract changes intended behavior with a stated reason (feat(ui): send new-session drafts to background sessions [AI-assisted] #128050: Document background creation and its preference-dependent shortcut; the later documentation split carried this contract into the chat page.)

Testing

Proof path: unit tests only. Added test files: 2.

Security

None.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Source -2, Tests +3, Docs 0. Total +1 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 7 -2
Tests 2 8 5 +3
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 14 13 +1

Mantis proof suggestion

Web 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:

@openclaw-mantis verify in OpenClaw web UI chat that New Session Cmd/Ctrl+Enter opens the created conversation and Cmd/Ctrl+Shift+Enter retains New Session with completion feedback under both send preferences, including an existing saved preference; return redacted screenshots, interaction results, and logs.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a bounded keyboard-navigation preference change with existing alternative submission controls.
  • merge-risk: 🚨 compatibility: The area owner deliberately changes the documented background shortcut for default-preference users; browser verification of saved-preference behavior remains outstanding.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide browser-boundary results for ordinary and shifted modified Enter under both send preferences, including an existing saved preference.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-08T07:16:51.696Z sha c0b3270 :: blocked before merge. :: none
  • reviewed 2026-10-08T07:40:19.617Z sha c0b3270 :: blocked before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review October 8, 2026 07:41
@vincentkoc
vincentkoc enabled auto-merge (squash) October 8, 2026 08:00
@vincentkoc
vincentkoc merged commit 4c44ca1 into main Oct 8, 2026
84 checks passed
@vincentkoc
vincentkoc deleted the fix/new-session-auto-open-20261008 branch October 8, 2026 08:05
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
* 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
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant