Skip to content

feat: keyboard-first navigation & shortcuts with customization (#106)#753

Open
alexchenai wants to merge 1 commit intorohitdash08:mainfrom
alexchenai:feat/keyboard-navigation-106
Open

feat: keyboard-first navigation & shortcuts with customization (#106)#753
alexchenai wants to merge 1 commit intorohitdash08:mainfrom
alexchenai:feat/keyboard-navigation-106

Conversation

@alexchenai
Copy link
Copy Markdown

/claim #106

Summary

Implements keyboard-first navigation with 16 default shortcuts, user customization, and conflict detection.

Shortcuts Included

Navigation (g+key): dashboard, expenses, bills, insights, categories
Actions: new expense, new bill, search (/), import (ctrl+i), export (ctrl+e)
UI: toggle sidebar, toggle dark mode, help (?), close modal (Esc), next/prev item (j/k)

Features

  • UserShortcutPreference model for per-user key binding customization
  • Conflict detection: prevents two actions from sharing the same key
  • Shortcut enable/disable without deleting the binding
  • Reset individual or all shortcuts to defaults
  • Grouped view by category (navigation/actions/ui)

REST API

  • GET /keyboard-shortcuts (public, no auth) - all shortcuts
  • GET /keyboard-shortcuts?by_category=true - grouped by category
  • GET /keyboard-shortcuts/user - user-resolved config
  • PUT /keyboard-shortcuts/user/{action} - set custom key
  • DELETE /keyboard-shortcuts/user/{action} - reset to default
  • POST /keyboard-shortcuts/user/reset-all - reset all

Tests

23 tests: 15 pass, 8 skip (Redis/JWT)

…ohitdash08#106)

- 16 default shortcuts across 3 categories: navigation, actions, ui
- Vim-style j/k navigation, g+<key> navigation, search with /
- UserShortcutPreference model for per-user customization
- Conflict detection: prevents duplicate key assignments
- update_shortcut, reset_shortcut, reset_all_shortcuts functions
- get_user_shortcut_config: merges defaults with user preferences
- REST API: GET /keyboard-shortcuts (public), GET/PUT/DELETE /keyboard-shortcuts/user/{action}
- by_category query param for grouped view
- enable/disable individual shortcuts
- 23 tests (15 pass, 8 skip Redis)

Closes rohitdash08#106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant