Skip to content

Add shortcut to settle the open thread#4277

Open
colonelpanic8 wants to merge 14 commits into
pingdotgg:mainfrom
colonelpanic8:feat/settle-thread-keybinding
Open

Add shortcut to settle the open thread#4277
colonelpanic8 wants to merge 14 commits into
pingdotgg:mainfrom
colonelpanic8:feat/settle-thread-keybinding

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown

What Changed

  • add thread.settle as a configurable keybinding command with Mod+Shift+X as the default
  • show a confirmation dialog for the open thread before settling
  • focus the primary action so Enter confirms, while Escape cancels
  • preserve Sidebar V2's existing move-to-next-thread behavior after a successful settle
  • document the command and cover default/resolution behavior with tests

Why

Settling the thread currently requires targeting a hover-only sidebar action. A global shortcut makes this frequent lifecycle action available without leaving the keyboard, while the focused confirmation prevents accidental settles and makes the confirmation keystroke explicit.

UI Changes

The shortcut opens an in-app alert dialog naming the thread and explaining that it moves out of active work. The Settle thread button is the initial focus target and displays an Enter key hint; Escape cancels.

Exact-head browser verification completed in an isolated environment against a disposable thread; the focused confirmation state is shown below.

Checklist

  • vp check
  • vp run typecheck
  • vp test apps/web/src/keybindings.test.ts apps/server/src/keybindings.test.ts
  • vp run --filter @t3tools/web build

Exact-head evidence

Revalidated at 2d4990a: focused tests, vp check, and vp run typecheck passed. Integrated browser verification confirmed Mod+Shift+X opens the settle dialog from the focused composer while preserving draft text, and Mod+Shift+Enter no longer triggers settlement. The capture uses only disposable local projects.

Settle-thread confirmation with focused primary action


Note

Medium Risk
Touches shared sidebar keyboard routing and post-settle navigation across v1/v2; incorrect eligibility or PR-state reporting could mis-settle threads or navigate to the wrong route.

Overview
Adds thread.settle (mod+shift+x, disabled when the terminal has focus) as a configurable command in defaults, contracts, and docs.

Both Sidebar and SidebarV2 route thread keyboard handling through resolveThreadSidebarShortcutAction, which opens a confirmation dialog for settle, blocks prev/next/jump while that dialog is open, and consumes settle when the route thread cannot be settled or is already settling.

After a confirmed settle, navigation uses resolveNextActiveThreadIdAfterSettle to pick the next non–effectively-settled thread (visible list first, then full unarchived fallback), or starts a new thread when none remain.

Hidden PR/change-request reporters keep settlement state accurate for collapsed, preview-hidden, and off-screen threads via isSidebarThreadEffectivelySettled and shared resolveSidebarThreadGitCwd.

Reviewed by Cursor Bugbot for commit 60ff41d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add thread.settle keyboard shortcut with confirmation dialog to sidebar

  • Adds mod+shift+x as the default keybinding for thread.settle in both sidebar V1 and V2, triggering a confirmation AlertDialog before settling the current thread.
  • After settling, the sidebar navigates to the next active thread (skipping effectively settled ones) using resolveNextActiveThreadIdAfterSettle, preferring visible order with a fallback to full logical order, or starts a new thread if none remain.
  • Adds isSidebarThreadEffectivelySettled to classify threads as settled based on server capability, inactivity timing, and PR/change-request state; hidden threads get background PR-state reporters to keep this classification current.
  • Adds resolveThreadSidebarShortcutAction to uniformly interpret thread keybinding commands into typed actions (navigate, confirm-settle, consume, none), shared across both sidebars.
  • Shortcuts are suppressed while the command palette or model picker is open; the confirmation dialog consumes all thread shortcuts and can be confirmed with Enter.

Macroscope summarized 60ff41d.

@coderabbitai

coderabbitai Bot commented Jul 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: aba91b88-e8ec-44cc-bd74-31bec2ab3b6a

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 22, 2026
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread packages/shared/src/keybindings.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature: a keyboard shortcut (mod+shift+x) to settle threads with a confirmation dialog and auto-navigation to the next active thread. New features with user-facing workflows warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@colonelpanic8
colonelpanic8 force-pushed the feat/settle-thread-keybinding branch from 4ac33ed to a3cb697 Compare July 22, 2026 14:52
@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 Jul 22, 2026
Comment thread apps/web/src/components/Sidebar.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.logic.ts
@colonelpanic8
colonelpanic8 force-pushed the feat/settle-thread-keybinding branch 2 times, most recently from 7e1eb9e to e6e9e4a Compare July 22, 2026 16:10
Comment thread apps/web/src/components/Sidebar.tsx
@colonelpanic8
colonelpanic8 force-pushed the feat/settle-thread-keybinding branch from e6e9e4a to f065547 Compare July 22, 2026 16:16
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx Outdated
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx
@colonelpanic8
colonelpanic8 force-pushed the feat/settle-thread-keybinding branch from 2d4990a to a6d2a79 Compare July 22, 2026 23:43

@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 a6d2a79. Configure here.

Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 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.

1 participant