From 23253219a3f95cfcb3d6d655d81df1fb5ea7a57a Mon Sep 17 00:00:00 2001 From: vikingowl Date: Mon, 13 Oct 2025 22:09:52 +0200 Subject: [PATCH] feat(tui): add help overlay shortcuts (F1/?) and update help UI and status messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Introduced a new “HELP & QUICK COMMANDS” section with bold header and shortcuts for toggling the help overlay and opening the files panel. - Updated command help text to “Open the help overlay”. - Extended onboarding and tutorial status lines to display the help shortcut. - Modified help command handling to set the status to “Help” and clear errors. --- crates/owlen-tui/src/chat_app.rs | 7 +++++-- crates/owlen-tui/src/commands/mod.rs | 2 +- crates/owlen-tui/src/ui.rs | 10 ++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/crates/owlen-tui/src/chat_app.rs b/crates/owlen-tui/src/chat_app.rs index f246260..d45dd78 100644 --- a/crates/owlen-tui/src/chat_app.rs +++ b/crates/owlen-tui/src/chat_app.rs @@ -57,10 +57,11 @@ use serde_json::{Value, json}; const ONBOARDING_STATUS_LINE: &str = "Welcome to Owlen! Press F1 for help or type :tutorial for keybinding tips."; -const ONBOARDING_SYSTEM_STATUS: &str = "Normal ▸ h/j/k/l • Insert ▸ i,a • Visual ▸ v • Command ▸ :"; +const ONBOARDING_SYSTEM_STATUS: &str = + "Normal ▸ h/j/k/l • Insert ▸ i,a • Visual ▸ v • Command ▸ : • Help ▸ F1/?"; const TUTORIAL_STATUS: &str = "Tutorial loaded. Review quick tips in the footer."; const TUTORIAL_SYSTEM_STATUS: &str = - "Normal ▸ h/j/k/l • Insert ▸ i,a • Visual ▸ v • Command ▸ : • Send ▸ Enter"; + "Normal ▸ h/j/k/l • Insert ▸ i,a • Visual ▸ v • Command ▸ : • Help ▸ F1/? • Send ▸ Enter"; const FOCUS_CHORD_TIMEOUT: Duration = Duration::from_millis(1200); const RESIZE_DOUBLE_TAP_WINDOW: Duration = Duration::from_millis(450); @@ -5575,6 +5576,8 @@ impl ChatApp { } "h" | "help" => { self.set_input_mode(InputMode::Help); + self.status = "Help".to_string(); + self.error = None; self.command_palette.clear(); return Ok(AppState::Running); } diff --git a/crates/owlen-tui/src/commands/mod.rs b/crates/owlen-tui/src/commands/mod.rs index 42e268e..43e79c9 100644 --- a/crates/owlen-tui/src/commands/mod.rs +++ b/crates/owlen-tui/src/commands/mod.rs @@ -90,7 +90,7 @@ const COMMANDS: &[CommandSpec] = &[ }, CommandSpec { keyword: "help", - description: "Show help documentation", + description: "Open the help overlay", }, CommandSpec { keyword: "h", diff --git a/crates/owlen-tui/src/ui.rs b/crates/owlen-tui/src/ui.rs index 20d603a..06e778f 100644 --- a/crates/owlen-tui/src/ui.rs +++ b/crates/owlen-tui/src/ui.rs @@ -3061,6 +3061,14 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) { Line::from(" Ctrl+d/u → scroll half page down/up"), Line::from(" Ctrl+f/b → scroll full page down/up"), Line::from(" PageUp/Down → scroll full page"), + Line::from(""), + Line::from(vec![Span::styled( + "HELP & QUICK COMMANDS", + Style::default().add_modifier(Modifier::BOLD).fg(theme.info), + )]), + Line::from(" F1 / ? → toggle help overlay"), + Line::from(" :h, :help → open help from command mode"), + Line::from(" :files, :explorer → toggle files panel"), ], 1 => vec![ // Editing @@ -3171,6 +3179,8 @@ fn render_help(frame: &mut Frame<'_>, app: &ChatApp) { .fg(theme.user_message_role), )]), Line::from(" :h, :help → show this help"), + Line::from(" F1 or ? → toggle help overlay"), + Line::from(" :files, :explorer → toggle files panel"), Line::from(" :quit → quit application"), Line::from(" Ctrl+C twice → quit application"), Line::from(" :reload → reload configuration and themes"),