Skip to content

feat(web): add toggle shortcut for settling threads - #7881

Open
UtkarshUsername wants to merge 8 commits into
pingdotgg:mainfrom
UtkarshUsername:feat/thread-settle-toggle-shortcut
Open

feat(web): add toggle shortcut for settling threads#7881
UtkarshUsername wants to merge 8 commits into
pingdotgg:mainfrom
UtkarshUsername:feat/thread-settle-toggle-shortcut

Conversation

@UtkarshUsername

@UtkarshUsername UtkarshUsername commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

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

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.toggle shortcut (default mod+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 calls settleThread / unsettleThread when 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.toggle keyboard shortcut bound to mod+shift+s

  • Registers the new thread.settle.toggle command in STATIC_KEYBINDING_COMMANDS and maps it to mod+shift+s (when terminal is not focused) in DEFAULT_KEYBINDINGS
  • Wires the command in ChatRouteGlobalShortcuts: it resolves the active thread PR via live git status and snapshots, checks the settled state with effectiveSettled, and calls settleThread or unsettleThread accordingly
  • The handler issues a VCS status query for the active thread's worktree (or workspace root) to inform settlement classification, and surfaces failures as stacked error toasts
  • Behavioral Change: the shortcut only fires when the environment advertises the threadSettlement capability and a route thread with an active shell is present

Macroscope summarized ed7f8e4.

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

coderabbitai Bot commented Aug 22, 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: 8bd2fce9-51cb-4775-b85b-4c4aa8f306e2

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:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026
Comment thread apps/web/src/routes/_chat.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

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

Copy link
Copy Markdown
Contributor Author

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.

@UtkarshUsername
UtkarshUsername marked this pull request as draft August 22, 2026 09:35
@UtkarshUsername
UtkarshUsername marked this pull request as ready for review August 22, 2026 15:14
Comment thread apps/web/src/routes/_chat.tsx

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

Comment thread apps/web/src/routes/_chat.tsx Outdated
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.

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

Comment thread apps/web/src/routes/_chat.tsx
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.
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026

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

Reviewed by Cursor Bugbot for commit 6742b00. Configure here.

Comment thread apps/web/src/routes/_chat.tsx Outdated
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:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant