Skip to content

Add help panel with keyboard shortcuts to SilentGuard TUI - #45

Merged
TheZupZup merged 1 commit into
mainfrom
claude/add-help-overlay-aJcRm
May 1, 2026
Merged

Add help panel with keyboard shortcuts to SilentGuard TUI#45
TheZupZup merged 1 commit into
mainfrom
claude/add-help-overlay-aJcRm

Conversation

@TheZupZup

Copy link
Copy Markdown
Owner

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

  • Added HELP_TEXT constant containing formatted keyboard shortcut documentation
  • Added "H" key binding to toggle the help panel via action_toggle_help()
  • Added help panel Static widget to the UI composition
  • Implemented action_toggle_help() method that:
    • Saves the current view state before entering help mode
    • Hides all data tables and details panel when help is displayed
    • Restores the previous view state when exiting help mode
    • Updates status bar to indicate help mode is active
    • Properly restores status messages based on the previous mode (Rules, Memory, or Connections)

Implementation Details

  • Help mode state is tracked via self.help_mode boolean flag
  • Previous view state is stored in self._pre_help_view dictionary to ensure accurate restoration
  • Help panel is initially hidden and only displayed when toggled
  • Status bar provides clear feedback about current mode and how to exit help
  • Help text includes all keyboard shortcuts with bold formatting for keys and dimmed text for instructions

https://claude.ai/code/session_01BkB17o94siSkFWDdQru9ar

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.
@TheZupZup
TheZupZup merged commit d405913 into main May 1, 2026
1 check passed
@TheZupZup
TheZupZup deleted the claude/add-help-overlay-aJcRm branch May 1, 2026 14:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/silentguard/tui.py
Comment on lines +340 to +342
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants