feat(web): add toggle shortcut for settling threads - #7881
feat(web): add toggle shortcut for settling threads#7881UtkarshUsername wants to merge 8 commits into
Conversation
Settling a thread had no keyboard shortcut. Add thread.settle.toggle (command ID thread.settle.toggle) with default mod+shift+s (when: !terminalFocus) and dispatch in ChatRouteGlobalShortcuts. The handler toggles the active thread via effectiveSettled classification (mirroring Sidebar partition) and calls settleThread/unsettleThread. No mobile changes; desktop inherits via web.
|
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 |
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
Sidebar partitions snoozed threads before settled ones, but the toggle only excluded pinned threads. A snoozed thread that also satisfies effectiveSettled was treated as settled and would be unsettle-d instead of settled. Mirror the partition ordering by checking effectiveSnoozed first.
|
Fixed: exclude snoozed threads from isSettled to match Sidebar partition ordering (snoozed outranks settled). Now checks effectiveSnoozed before effectiveSettled - a snoozed thread that also satisfies effectiveSettled will correctly settle instead of being incorrectly unsettled. See 6fe4f8a. |
There was a problem hiding this comment.
One finding: the new thread.settle.toggle shortcut classifies the open thread's settled state differently from the two surfaces that display that state for the same thread, so the shortcut can do the opposite of the visible affordance. Details inline on apps/web/src/routes/_chat.tsx.
No styling, primitive, or Tailwind/CSS ownership issues in this diff.
Posted via Macroscope — UI Consistency
The snoozed/pinned exclusions mirrored the sidebar list partition, but the surfaces the user sees on the open thread (parked-thread banner, header menu) classify with effectiveSettled alone. Classify the same way so the shortcut never disagrees with the visible Un-settle button.
There was a problem hiding this comment.
One finding: the settle toggle resolves its changeRequest input from a different source than the two surfaces it is documented to match, so the toggle direction can invert relative to what the user sees.
Posted via Macroscope — UI Consistency
The snapshot map is only written by sidebar v2 rows, so on the legacy sidebar (or before a row mounts) the shortcut classified with no PR while the banner and menu used the live one. Resolve through resolveDisplayedThreadPr over the same vcsEnvironment.status query ChatView uses, so all three surfaces agree.
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.
Reviewed by Cursor Bugbot for commit 6742b00. Configure here.

What Changed
Add shortcut to settle the active thread with default mod+shift+s (when: !terminalFocus). Dispatch in ChatRouteGlobalShortcuts (apps/web/src/routes/_chat.tsx) toggles the active thread using effectiveSettled classification (mirroring Sidebar partition) and calls settleThread/unsettleThread.
Why
Settling a thread had no keyboard shortcut. It was only available via sidebar hover, action menu, and header menu.
Video
settle.mp4
Checklist
Note
Medium Risk
Touches thread settlement mutations and VCS-based classification, so a mismatch could settle or un-settle the wrong thread. Scope is a single shortcut path with existing action helpers.
Overview
Adds a
thread.settle.toggleshortcut (defaultmod+shift+s, when the terminal is not focused) so the active thread can be settled or un-settled from the keyboard instead of only via sidebar/header menus.The chat-route global key handler classifies the active thread with the same
effectiveSettled+ live VCS PR resolution used by ChatView, then callssettleThread/unsettleThreadwhen the environment supports settlement. Failures surface as stacked error toasts.Reviewed by Cursor Bugbot for commit ed7f8e4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
thread.settle.togglekeyboard shortcut bound tomod+shift+sthread.settle.togglecommand inSTATIC_KEYBINDING_COMMANDSand maps it tomod+shift+s(when terminal is not focused) inDEFAULT_KEYBINDINGSChatRouteGlobalShortcuts: it resolves the active thread PR via live git status and snapshots, checks the settled state witheffectiveSettled, and callssettleThreadorunsettleThreadaccordinglythreadSettlementcapability and a route thread with an active shell is presentMacroscope summarized ed7f8e4.