Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized keybinding-settings bug fix that stabilizes row identity and preserves unsaved drafts while leaving server contracts and runtime shortcut execution unchanged. The behavior change is small, self-contained, and covered by focused regression tests. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe keybinding row builder now groups bindings by command, shortcut, and condition. Duplicate bindings share one row, and the last matching binding supplies its data. Tests cover stable row IDs, normalized grouping, filtering, and conflict handling. ChangesKeybinding row identity
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable regression remains identified for this change; it is ready to merge after normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
74c36c8 to
368324c
Compare
Dismissing prior approval to re-evaluate 75c739e
75c739e to
e08271b
Compare
|
Note Written by Hi! We are cleaning up open PRs, and this one appears to have been created with an older model ( |
|
Note Written by Reopening, this was closed by mistake. Sorry for the noise! |
What Changed
Saving one keybinding currently changes the array positions used in other rows' React keys, causing those rows to remount and discard their unsaved edits.
Use the saved command, normalized shortcut, and When expression as each row's stable identity. Show identical resolved bindings as one editable row. Different commands, shortcuts, and conditions remain separate, and the runtime binding list and shortcut precedence are unchanged.
Why
Fixes #11108.
PR #4366 addressed the same bug but was closed without merging. No reason for the closure was stated. It proposed occurrence counters for duplicate bindings, but its review noted that those counters can shift when an earlier duplicate changes or disappears. A single editor per resolved binding avoids that identity reassignment without adding persistent binding IDs or changing the API.
Display grouping does not fix the existing alias-matching limitation: the editor sends normalized shortcut/condition values, while the server matches raw strings for save and remove.
Validation
The shared editor covers web and desktop, including remote connections. No mobile editor, provider adapter, wire contract, or documentation changes are required.
UI Changes
Identical resolved bindings now appear as one editable row. Saving another binding preserves unsaved sibling edits.
Verified in Chrome against an isolated checkout and disposable keybindings data. Both clips start with custom Thread: Jump: 1 and 2 bindings whose saved When condition is
!modelPickerOpen, with the list filtered tocustom. They change both conditions toterminalFocus, then save only the first binding. Before the fix, the second condition resets to!modelPickerOpen; after the fix, it retainsterminalFocusand its Save button.Before
keybindings-before.mp4
After
keybindings-after.mp4
Checklist
Implemented with GPT-6 in Codex. Reviewed with Fable 5.1 in Claude Code and GPT-6 Astra through a Codex subagent.