Define the Mutt-like keymap and contextual help #22

Closed
opened 2026-08-09 19:10:47 +00:00 by hugo · 1 comment
Owner

Objective

Provide a coherent Mutt-like default keymap and context-sensitive help for every TUI action.

Scope

  • Define common navigation with j/k, arrows, page/home/end, Enter, Tab, Shift-Tab, q, ?, /, : and a manual-lock key.
  • Assign direct keys to every ordinary base pass workflow; Git requires direct keys only for pull and push.
  • Resolve keys by current UI mode so editing text does not accidentally trigger browser mutations.
  • Generate the help screen and compact context line from the same action registry used for dispatch.
  • Document destructive confirmations and multi-key sequences.

Acceptance criteria

  • Every reachable action has a discoverable help entry and no mode has ambiguous bindings.
  • Help and dispatch cannot drift because both consume the same registry.
  • Tests cover mode precedence, terminal escape sequences, repeated keys, unavailable actions and confirmation shortcuts.
  • No key handler performs domain work directly; it dispatches a storage-backed UI action.

Prerequisites

TUI shell; sidebar; structured viewer and editor.

## Objective Provide a coherent Mutt-like default keymap and context-sensitive help for every TUI action. ## Scope - Define common navigation with `j`/`k`, arrows, page/home/end, Enter, Tab, Shift-Tab, `q`, `?`, `/`, `:` and a manual-lock key. - Assign direct keys to every ordinary base pass workflow; Git requires direct keys only for pull and push. - Resolve keys by current UI mode so editing text does not accidentally trigger browser mutations. - Generate the help screen and compact context line from the same action registry used for dispatch. - Document destructive confirmations and multi-key sequences. ## Acceptance criteria - Every reachable action has a discoverable help entry and no mode has ambiguous bindings. - Help and dispatch cannot drift because both consume the same registry. - Tests cover mode precedence, terminal escape sequences, repeated keys, unavailable actions and confirmation shortcuts. - No key handler performs domain work directly; it dispatches a storage-backed UI action. ## Prerequisites TUI shell; sidebar; structured viewer and editor.
hugo added this to the 02 - Mutt-style terminal UI milestone 2026-08-09 19:10:47 +00:00
hugo added the enhancement label 2026-08-09 19:10:47 +00:00
Author
Owner

Implemented in commit 639ae0d. The TUI now has a single typed action registry for key resolution, compact context hints, command names, and contextual help. It covers common navigation, mode-scoped direct pass workflows, Git pull/push two-key sequences, manual locking, destructive confirmation guidance, terminal repeat events, escape cancellation, unavailable keys, and text-input precedence. Workflow keys dispatch typed UI effects only; password-store behavior remains in crates/storage. Verified with cargo fmt --all -- --check; RUSTFLAGS='-D warnings' cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace.

Implemented in commit 639ae0d. The TUI now has a single typed action registry for key resolution, compact context hints, command names, and contextual help. It covers common navigation, mode-scoped direct pass workflows, Git pull/push two-key sequences, manual locking, destructive confirmation guidance, terminal repeat events, escape cancellation, unavailable keys, and text-input precedence. Workflow keys dispatch typed UI effects only; password-store behavior remains in crates/storage. Verified with cargo fmt --all -- --check; RUSTFLAGS='-D warnings' cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace.
hugo closed this issue 2026-08-10 08:03:46 +00:00
Sign in to join this conversation.