Files
SubMiner/backlog/tasks/task-358 - Show-and-verify-default-keybindings-in-example-config.md
T
sudacode d48d880ba3 feat(config): show default keybindings in generated example config (#64)
- Expand `keybindings` array in `config.example.jsonc` to list all built-in defaults instead of `[]`
- Inject `DEFAULT_KEYBINDINGS` into template when resolved config has an empty keybindings array
- Add regression tests for template parity, default binding compile/action mapping, overlay keyboard dispatch, and mpv plugin registration/dispatch
- Add fullscreen binding to docs shortcut tables and clarify keybindings can target mpv commands or session actions
2026-05-12 23:11:51 -07:00

3.3 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
id title status assignee created_date updated_date labels dependencies priority
TASK-358 Show and verify default keybindings in example config Done
@Codex
2026-05-13 03:33 2026-05-13 03:45
config
keybindings
overlay
mpv
medium

Description

Keep the shipped example configuration, overlay runtime, and mpv plugin aligned with the built-in default keybindings. The example keybindings array should show the same defaults that are active by default, and focused tests should catch drift between documented defaults and actual overlay/mpv wiring.

Acceptance Criteria

  • #1 config.example.jsonc and the docs-site copy show all default keybindings in the keybindings array.
  • #2 Default keybindings are registered without conflicts in the overlay session-binding path.
  • #3 Default keybindings are registered and dispatched correctly inside the mpv plugin.
  • #4 Focused regression tests cover default keybinding/config-example parity and mpv/plugin dispatch.

Implementation Plan

  1. Inspect default keybinding definitions, config-example generation, overlay shortcut/session-binding tests, and mpv plugin binding tests.
  2. Add failing tests for config-example keybinding parity and any missing default overlay/mpv wiring.
  3. Update generated/example config and source wiring only where tests show drift.
  4. Run focused Bun/Lua tests, regenerate examples if needed, update task AC/final notes.

Implementation Notes

Implemented the config-template path by injecting DEFAULT_KEYBINDINGS into generated examples when the resolved config has an empty keybindings array, preserving runtime merge semantics. Added coverage for template parity, default binding compile/action mapping, overlay keyboard dispatch, and mpv plugin registration/dispatch. Regenerated both config.example.jsonc artifacts and added changelog fragment changes/358-default-keybindings-config-example.md.

Final Summary

Updated generated example configuration so config.example.jsonc and docs-site/public/config.example.jsonc now show every built-in default keybinding in the keybindings array instead of []. The template copy now describes the array as default plus custom keybindings, while runtime default merge behavior remains unchanged.

Added regression coverage that the generated template parses back to DEFAULT_KEYBINDINGS, that every default binding compiles to the expected mpv command or session action, that the overlay keyboard handler dispatches all compiled defaults, and that the mpv plugin registers and invokes default mpv/session-action bindings. Also updated docs tables to include the default fullscreen binding and clarified that keybindings can target mpv commands or SubMiner session actions.

Verification passed: bun run format:check:src, bun run changelog:lint, bun run docs:test, bun run docs:build, bun run verify:config-example, focused config/session/renderer/plugin tests, bun run typecheck, bun run test:env, bun run test:fast, bun run build, and bun run test:smoke:dist.