Skip to content

feat(web): cmd+enter to create thread in background - #7821

Merged
maria-rcks merged 5 commits into
pingdotgg:mainfrom
extoci:t3code/cmd-enter-background-task
Aug 21, 2026
Merged

feat(web): cmd+enter to create thread in background#7821
maria-rcks merged 5 commits into
pingdotgg:mainfrom
extoci:t3code/cmd-enter-background-task

Conversation

@extoci

@extoci extoci commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What Changed

Pressing Cmd+Enter on macOS or Ctrl+Enter on 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

  • This PR is small and focused
  • I explained what changed and why
  • I included a video for animation/interaction changes

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

  • Desktop Cmd+Enter in a draft thread submits in the background and opens a fresh draft preserving the same workspace mode and base branch, instead of navigating to the started thread
  • Replaces shouldSubmitComposerOnEnter with composerSubmissionIntentForEnter, which returns foreground, background, or null based on viewport, shift, modifier, and whether the thread is a draft
  • Adds store helpers (beginBackgroundDraftSubmissionByRef, clearBackgroundDraftSubmissionByRef, finalizePromotedDraftThreadByRef, useBackgroundDraftSubmissionPending) to track per-thread background submission state
  • Draft routes skip auto-navigation to the server thread while a background submission is pending, and a success toast with an Open action lets users navigate back to it
  • Risk: useHandleNewThread now 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 logic

Macroscope 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 / background intent. 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.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72ec1376-495e-4a33-9e43-14e41f4b3289

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 21, 2026
@extoci extoci changed the title feat(web): start draft threads in background feat(web): cmd+space to create thread in background Aug 21, 2026
@extoci extoci changed the title feat(web): cmd+space to create thread in background feat(web): cmd+enter to create thread in background Aug 21, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/web/src/components/ChatView.tsx
Comment thread apps/web/src/components/ChatView.tsx Outdated
@extoci
extoci marked this pull request as ready for review August 21, 2026 15:45

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread apps/web/src/components/ChatView.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@maria-rcks
maria-rcks merged commit e0b4f46 into pingdotgg:main Aug 21, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants