feat(tui): redesign chrome with unified key hints and help overlay
Introduce one key-hint grammar across every view: bold key, dim label, priority-ordered hints that drop from the end instead of ellipsizing. The month footer becomes a single split status bar with a friendly selected date, the '?' mega-line becomes a real keyboard shortcut panel, and the editor, agenda, search, picker, detail, and delete frames share the same chips. Notifications carry check/warning marks. Adds a live PTY smoke test covering view interaction and terminal state restoration on q and Ctrl-C exits.
This commit is contained in:
@@ -47,6 +47,10 @@ void test_create_and_validation()
|
||||
check(editor.handle_key("\x13") == nocal::tui::EditorOutcome::active &&
|
||||
editor.focused_field() == nocal::tui::EditorField::title && !editor.error().empty(),
|
||||
"blank title blocks submission and focuses the invalid field");
|
||||
check(editor.render(72, 18, true).find("\x1b[1;31m") != std::string::npos,
|
||||
"validation errors render in the error style");
|
||||
check(editor.render(72, 18, false).find("\x1b[") == std::string::npos,
|
||||
"error frame stays plain with ANSI disabled");
|
||||
|
||||
(void)editor.handle_key("Design review");
|
||||
focus(editor, nocal::tui::EditorField::end_time);
|
||||
@@ -179,6 +183,8 @@ void test_rendering()
|
||||
"render fills requested height exactly");
|
||||
check(plain.find("NEW APPOINTMENT") != std::string::npos &&
|
||||
plain.find("Ctrl-S save") != std::string::npos &&
|
||||
plain.find("Tab next field") != std::string::npos &&
|
||||
plain.find("Esc cancel") != std::string::npos &&
|
||||
plain.find("[ ] timed appointment") != std::string::npos,
|
||||
"render exposes form identity and controls");
|
||||
check(plain.find("\x1b[") == std::string::npos, "ANSI can be disabled");
|
||||
|
||||
Reference in New Issue
Block a user