Repository navigation
Description
Found while reviewing #331, which bound shift+d to the theme toggle without noticing that issue-properties.tsx already binds it to the due date menu.
What happens
selectMatch in apps/web/src/lib/keyboard/registry.ts resolves a pressed binding by walking every registered entry and keeping the best one, where beats() compares step count, then priority, then shift specificity. When two entries tie on all three, beats() returns false and the winner is simply whichever entry the registry happened to see first.
That is a silent resolution, not an error. Nothing warns, nothing fails, and the losing shortcut just stops working. In #331's case the command palette registers on shell mount, before any issue page, so the global theme toggle would have shadowed a surface shortcut that the UI actively advertises through <PropertyRow shortcut="shift+d">.
It is also invisible to review. The PR was small, well tested and correctly documented, and the collision was still only caught by reading every other useHotkey call in the app.
What to build
A duplicate detection that fails rather than resolves. Two reasonable shapes, either is fine:
- A test that builds the full registry the way the app does and asserts no two advertised entries share a binding within a scope that can be active at the same time.
- A development mode warning from
HotkeyRegistry.registerwhen an incoming entry ties an existing one on all three tiebreakers, since a genuine tie means neither author knew about the other.
The test is probably the better first step because it runs in CI and cannot be ignored.
Also worth doing
docs/keyboard-shortcuts.md uses useHotkey('shift+d', duplicateIssue, ...) as its worked example in the "Adding one" section, while shift+d is really the due date menu. Pick a key for that example that is not bound to anything, so the documentation cannot drift into describing a real conflict.
Activity
Alwaz1143 commentedon Aug 18, 2026
Hi! I'd like to work on this issue. I can take the test-first approach mentioned in the description, including adding collision detection for conflicting shortcuts and updating the documentation example. Is it okay if I take this one?
feat(web): add development collision detection for hotkeys
feat(web): add development collision detection for hotkeys
feat(web): add development collision detection for hotkeys (Noveum#334)