Add help panel with keyboard shortcuts to SilentGuard TUI - #45
Conversation
Press H to toggle a help panel listing the main keyboard shortcuts. The overlay hides the active table/details and restores the previous view when closed. Works from connections, memory, and rules views.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f787aad86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.connections_table.display = prev.get("connections", not (self.memory_mode or self.rules_mode)) | ||
| self.memory_table.display = prev.get("memory", self.memory_mode) | ||
| self.rules_table.display = prev.get("rules", self.rules_mode) |
There was a problem hiding this comment.
Restore panels from active mode when exiting help
Closing help unconditionally reapplies the stale self._pre_help_view visibility snapshot, even if the user changed modes while help was open (for example, H then M/L then H). In that flow, memory_mode/rules_mode can remain True while the corresponding table is hidden and the connections table is shown, leaving UI state and command routing inconsistent (status/actions follow mode flags, but visible panel follows old snapshot). Consider deriving panel visibility from current mode flags on exit, or blocking mode-changing actions while help_mode is active.
Useful? React with 👍 / 👎.
Summary
This PR adds an interactive help panel to the SilentGuard TUI that displays all available keyboard shortcuts. Users can toggle the help view by pressing 'H', which temporarily hides other UI elements and displays the help text.
Key Changes
HELP_TEXTconstant containing formatted keyboard shortcut documentationaction_toggle_help()action_toggle_help()method that:Implementation Details
self.help_modeboolean flagself._pre_help_viewdictionary to ensure accurate restorationhttps://claude.ai/code/session_01BkB17o94siSkFWDdQru9ar