feat(hint): H2 Phase D — coverage gate, F1 strip, status flips (ADR-0053)
Completes H2: - comprehensiveness coverage tests: every REGISTRY command form has a hint_id resolving to a hint.cmd.* block, and every runtime error class resolves to a hint.err.* block (enforces ADR-0053 D6) - ADR-0051 keybinding strip advertises F1 in the editing (leads) and default states; +shortcut.hint label; 12 full-panel snapshots re-accepted (status-bar line only) - flip ADR-0053 -> implemented, requirements H2 + A1 -> [x], README 2498 pass / 1 ignored, clippy clean.
This commit is contained in:
@@ -1894,22 +1894,25 @@ fn status_bar_bindings(app: &App) -> Vec<(&'static str, String)> {
|
||||
("Enter", crate::t!("shortcut.run")),
|
||||
];
|
||||
}
|
||||
// 4. Editing — the input has text: surface the readline edit keys
|
||||
// (ADR-0049). The highest-value subset stays within the width
|
||||
// budget; Ctrl-K/U remain unadvertised muscle memory.
|
||||
// 4. Editing — the input has text: F1 (the contextual hint for what
|
||||
// you're typing, ADR-0053) leads, then the readline edit keys
|
||||
// (ADR-0049). Ctrl-K/U remain unadvertised muscle memory.
|
||||
if !app.input.is_empty() {
|
||||
return vec![
|
||||
("F1", crate::t!("shortcut.hint")),
|
||||
("Esc", crate::t!("shortcut.clear")),
|
||||
("Ctrl-A/E", crate::t!("shortcut.home_end")),
|
||||
("Ctrl-W", crate::t!("shortcut.del_word")),
|
||||
("Enter", crate::t!("shortcut.run")),
|
||||
];
|
||||
}
|
||||
// 5. Default — empty input, Input focus.
|
||||
// 5. Default — empty input, Input focus. F1 here expands on the most
|
||||
// recent error, or points the user at getting started (ADR-0053).
|
||||
vec![
|
||||
("Ctrl-O", crate::t!("shortcut.nav")),
|
||||
("Tab", crate::t!("shortcut.complete")),
|
||||
("↑", crate::t!("shortcut.history")),
|
||||
("F1", crate::t!("shortcut.hint")),
|
||||
("Enter", crate::t!("shortcut.run")),
|
||||
]
|
||||
}
|
||||
@@ -2664,7 +2667,7 @@ mod tests {
|
||||
#[test]
|
||||
fn strip_default_state_is_nav_complete_history_run() {
|
||||
let app = App::new();
|
||||
assert_eq!(strip_keys(&app), vec!["Ctrl-O", "Tab", "↑", "Enter"]);
|
||||
assert_eq!(strip_keys(&app), vec!["Ctrl-O", "Tab", "↑", "F1", "Enter"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2675,7 +2678,7 @@ mod tests {
|
||||
app.input.push_str("create ta");
|
||||
assert_eq!(
|
||||
strip_keys(&app),
|
||||
vec!["Esc", "Ctrl-A/E", "Ctrl-W", "Enter"],
|
||||
vec!["F1", "Esc", "Ctrl-A/E", "Ctrl-W", "Enter"],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user