Files
logseq/src/main/frontend/modules
scheinriese 33dcefaa06 Decompose customize dialog, fix reset conflict race, and auto-close popup
Extract key handler and conflict resolution logic from the ~390-line
customize-shortcut-dialog-inner into testable top-level defn- functions:
- customize-key-handler: key event state machine (~70 lines)
- compute-override-plan: pure conflict resolution for reassign
- compute-reset-plan: pure conflict resolution for reset-to-default
- matches-default-binding?: canonical default-binding comparison

Add persist-user-shortcuts-batch! to core.cljs to atomically persist
multiple binding changes in a single config read-modify-write cycle,
fixing a race condition where sequential persist-user-shortcut! calls
clobbered each other (config-handler/set-config! updates state async
via save-file! promise chain, so the second call reads stale data).

Fix reset-fn! to strip conflicting bindings before restoring defaults,
preventing error notifications from goog.ui.KeyboardShortcutHandler
duplicate key registration. Auto-close the customize popup 300ms after
reset so it doesn't float over a now-empty filtered list.

Clear user overrides (persist nil) when conflict stripping leaves a
binding that matches the action's default, so actions correctly
disappear from the "Custom" filter tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
..
2023-10-27 14:33:10 +08:00
2026-02-01 21:45:31 +08:00