refactor: split keymap definitions by domain #387

Closed
opened 2026-05-12 13:17:40 +00:00 by barrettruth · 0 comments
Owner

Problem

src/lib/keymap-defs.ts is now one of the largest files in the app. It mixes shortcut metadata, matching behavior, help/sidebar presentation groups, calendar traversal bindings, task-panel commands, and global/settings scopes.

The current behavior is useful and must stay, but the ownership boundary is too broad. It makes future shortcut fixes harder to review and increases the chance that changing one mode silently affects another.

Solution

  • Split keymap definitions by domain or scope while preserving the existing exported contract.
  • Keep the shortcuts help and runtime matching backed by the same declarations.
  • Preserve current calendar/week/month traversal, global settings access, and task-panel shortcuts.
  • Add focused tests that prove the split still exposes the same declared ids and scope fallback behavior.

Non-goals

  • Do not reintroduce keymap customization.
  • Do not remove existing view/navigation bindings.
  • Do not change visible shortcut copy except where required by the split.

Part of #355.

## Problem `src/lib/keymap-defs.ts` is now one of the largest files in the app. It mixes shortcut metadata, matching behavior, help/sidebar presentation groups, calendar traversal bindings, task-panel commands, and global/settings scopes. The current behavior is useful and must stay, but the ownership boundary is too broad. It makes future shortcut fixes harder to review and increases the chance that changing one mode silently affects another. ## Solution - Split keymap definitions by domain or scope while preserving the existing exported contract. - Keep the shortcuts help and runtime matching backed by the same declarations. - Preserve current calendar/week/month traversal, global settings access, and task-panel shortcuts. - Add focused tests that prove the split still exposes the same declared ids and scope fallback behavior. ## Non-goals - Do not reintroduce keymap customization. - Do not remove existing view/navigation bindings. - Do not change visible shortcut copy except where required by the split. Part of #355.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta#387
No description provided.