feat(web): add configurable settle shortcut - #5940
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 |
ApprovabilityVerdict: Approved 8cb3344 This PR exposes an existing thread settle action through a configurable keyboard shortcut. The changes are additive, well-tested, and follow existing patterns - the underlying functionality already exists and this simply adds a new keybinding command to trigger it. You can customize Macroscope's approvability policy. Learn more. |
Problem
Settling the open thread is only available through pointer-driven thread actions. The keybinding schema does not recognize a settle command, so users cannot add their own shortcut in Settings or
keybindings.json.Change
thread.settleas a supported keybinding commandThis intentionally adds no default chord, so existing keymaps do not change and users can choose a conflict-free shortcut.
Related: #4277 and #4876. Both currently conflict with
main; this draft is a smaller, freshly rebased configurable-only alternative.Impact
Users can select Thread: Settle from Settings → Keybindings or add
thread.settletokeybindings.json. The existing lifecycle rules still prevent settling threads that need attention, and failures use the existing toast path.Validation
vp test run packages/contracts/src/keybindings.test.ts apps/web/src/keybindings.test.ts apps/web/src/components/settings/KeybindingsSettings.logic.test.ts— 66 tests passedCreated with Codex in T3 Code.
Note
Add configurable
thread.settlekeyboard shortcut to global chat shortcuts'thread.settle'toTHREAD_KEYBINDING_COMMANDSand exportsSTATIC_KEYBINDING_COMMANDSfrom keybindings.ts so consumers can reference static commands.thread.settlecommand in _chat.tsx, callingsettleThreadon the active thread and showing an error toast on failure (unless interrupted).buildKeybindingCommandOptionsin KeybindingsSettings.logic.ts to seed the command list withSTATIC_KEYBINDING_COMMANDS, sothread.settleappears in the keybindings settings UI with no default shortcut assigned.Macroscope summarized 8cb3344.
Note
Low Risk
Reuses existing thread settlement APIs and UI toasts; no default binding means no behavior change until users configure a shortcut.
Overview
Adds
thread.settleas a first-class keybinding command so users can settle the open thread from the keyboard without changing anyone’s default keymap.The contracts layer registers the command and exports
STATIC_KEYBINDING_COMMANDS, and the Settings command picker is seeded from that list so commands like settle show up even when they have no built-in chord. On the chat route, a resolvedthread.settleshortcut calls the samesettleThreadpath as the thread menu, with existing failure toasts; repeats and missing route thread are ignored.User docs note that settle has no default shortcut—users add one in Settings or
keybindings.json. Tests cover schema acceptance, picker options, and shortcut resolution withwhencontext.Reviewed by Cursor Bugbot for commit 8cb3344. Bugbot is set up for automated code reviews on this repo. Configure here.