Commit Graph
4 Commits
Author SHA1 Message Date
Neil f03043544a perf(keybindings): stop recomputing shortcut labels on every render (#18145)
Shortcut labels were rebuilt from scratch in the render body of every
component that shows one, which kept parseKeybinding running ~120x/sec
in a fully idle app.

- Cache the label layer per overrides object (WeakMap), so a keybinding
  edit hands out a new object and therefore a fresh cache.
- Memoize parseKeybinding behind a bounded cache; binding strings come
  from a fixed definition set plus user overrides.
- Hoist the per-call token/label object literals in normalizeKeyToken
  and formatKeyToken to module constants.
2026-09-02 12:59:42 -07:00
Neil 8cc7634051 refactor: name modules for their domain instead of 'helpers'
Renames seven -helpers modules for the concept their functions operate on, and
splits three that were genuine grab-bags -- each had a clean cleavage along its
importers, which is the signal AGENTS.md describes for a file holding more than
one responsibility.

Leaves keybindings/definitions-core-1..4 alone: definitions.ts spreads them in
order, so their concatenation order is the command palette order and regrouping
them thematically would be a user-visible change. Records that reasoning in a
comment so it is not re-litigated.
2026-09-01 12:27:01 -07:00
Neil 08b8f271e6 fix(renderer): merge split runtime imports
(cherry picked from commit 90bf505afe)
2026-09-01 00:28:37 -07:00
Neil 41015f9393 refactor(renderer): split runtime and store modules
(cherry picked from commit 207bef0198)
2026-09-01 00:28:37 -07:00