Skip to content

Help registry drift: 8 normal-mode keybindings missing from :help #74

Description

@garritfra

Problem

AGENTS.md states every keybinding MUST have a HelpEntry in crates/cell-sheet-core/src/help/entries.rs:help lies to users when this drifts. There is no automated check enforcing it; eight implemented Normal-mode keys currently have no help entry:

Key Implementation Action
* mode/normal.rs:498–500 Search current cell value forward
# mode/normal.rs:502–504 Search current cell value backward
{ mode/normal.rs:418–420 Block jump up
} mode/normal.rs:422–424 Block jump down
Ctrl+O mode/normal.rs:160 Jump back
Tab mode/normal.rs:506–508 Jump forward
V mode/normal.rs:438–440 Enter Visual Line mode
c (Normal) + c (Visual at mode/visual.rs:83–86) Change

Proposed fix

Two PRs:

  1. Add the missing HelpEntry rows to NORMAL_ENTRIES (and Visual c to VISUAL_ENTRIES) in entries.rs.
  2. Add an automated drift check so this can never silently regress. Sketch:
// crates/cell-sheet-tui/src/mode/normal.rs
#[cfg(test)]
pub(crate) const IMPLEMENTED_KEYS: &[&str] = &[/* every dispatched key */];

// help/entries.rs test mod
#[test]
fn every_normal_key_is_documented() {
    for k in IMPLEMENTED_KEYS {
        assert!(NORMAL_ENTRIES.iter().any(|e| e.key == *k), "missing help: {k}");
    }
}

Repeat for Insert / Visual / Command / Formula categories.

Priority

HIGH — explicitly flagged in AGENTS.md as a regression-prone seam.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationtech-debtTechnical debt — code health, refactor, test coveragevimVim modal editing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions