Skip to content

fix(command-palette): make useKeybindingRegistry reactive#54

Merged
zion-off merged 1 commit intomainfrom
fix-command-palette-reactivity
Feb 26, 2026
Merged

fix(command-palette): make useKeybindingRegistry reactive#54
zion-off merged 1 commit intomainfrom
fix-command-palette-reactivity

Conversation

@zion-off
Copy link
Copy Markdown
Owner

Summary

  • Add version counter to FocusStore with getVersion() method, incremented in notify()
  • Subscribe useKeybindingRegistry to store mutations via useSyncExternalStore so HintsBar re-renders on focus/node changes
  • Deduplicate available bindings by key (innermost binding wins), preventing duplicate hints from ancestor scopes

Test plan

  • npx tsc --noEmit passes
  • pnpm play playground/examples/nested-boxes.tsx — HintsBar updates as you navigate (h/l) and drill in/out (enter/esc), no duplicate entries
  • pnpm play playground/examples/command-palette.tsx — existing CommandPalette behavior unchanged

Add version counter to FocusStore and subscribe via useSyncExternalStore
so HintsBar updates on focus/node changes. Deduplicate available bindings
by key to prevent duplicates from ancestor scopes.
@zion-off zion-off merged commit 581214f into main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant