feat(web): cmd+enter to create thread in background - #7821
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
One consistency finding in apps/web/src/components/ChatView.tsx: the new "Started in background" success toast bypasses the shared stackedThreadToast contract that every other action toast in the app (including this feature's own failure path a few lines below) uses, so its Open CTA renders in the inline row instead of the shared stacked action row.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5b6104e. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new feature (Cmd+Enter to start threads in background) with new state management, new navigation behavior, and new UI flows (toast notifications). New user-facing capabilities and workflows warrant human review. You can add or adjust custom eligibility rules. Learn more. |

What Changed
Pressing
Cmd+Enteron macOS orCtrl+Enteron Windows and Linux now starts the thread in the background without navigating to that thread, so the user can start another thread easily.Why
This lets users queue several agent tasks without navigating away from a newly created thread.
UI Changes
Interaction recording
Screen.Recording.2026-08-21.at.5.59.37.PM.mov
Checklist
Verification
Tested thoroughly with worktrees, on remote and local environments.
Built with GPT-5.6-sol through the Codex harness in T3 Code.
Note
Add Cmd+Enter background thread creation to web composer
shouldSubmitComposerOnEnterwithcomposerSubmissionIntentForEnter, which returnsforeground,background, ornullbased on viewport, shift, modifier, and whether the thread is a draftbeginBackgroundDraftSubmissionByRef,clearBackgroundDraftSubmissionByRef,finalizePromotedDraftThreadByRef,useBackgroundDraftSubmissionPending) to track per-thread background submission stateuseHandleNewThreadnow reuses a stored draft only when it is not already promoting and has no backing thread shell; drafts already in promotion are not reused, which changes prior reuse logicMacroscope summarized cc4bec6.
Note
Medium Risk
Touches send, draft promotion, and new-thread reuse so a failed background handoff can leave the user on the wrong draft or skip navigation. Not auth or data-path critical.
Overview
Desktop Cmd/Ctrl+Enter on a new draft now starts that thread in the background and immediately opens another empty composer, so users can queue tasks without following the started thread.
Enter handling now returns a
foreground/backgroundintent. Background send only applies to local drafts: the hero composer stays undocked, the draft route does not auto-navigate after promotion, and a success toast with Open links back to the started thread. The next draft keeps the same env mode and base branch, but New worktree does not reuse the worktree just launched.Draft reuse is tightened so a draft already promoting (or backed by a thread shell) is not reused when minting the next composer. Failures to open a fresh composer still leave the background task running and warn the user.
Reviewed by Cursor Bugbot for commit cc4bec6. Bugbot is set up for automated code reviews on this repo. Configure here.