feat: add keyboard shortcuts help panel and context-sensitive hints#41
feat: add keyboard shortcuts help panel and context-sensitive hints#41
Conversation
Co-authored-by: Copilot <copilot@github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds a help panel overlay to the TUI displaying keyboard shortcuts, controlled via Changes
Sequence DiagramsequenceDiagram
actor User
participant Update as Update Handler
participant Model as Model State
participant View as View Renderer
participant HelpPanel as Help Panel View
User->>Update: Press f1 or type /help
Update->>Model: Check key & toggle showingHelp
Model->>Model: Set showingHelp = true<br/>Reset helpScroll = 0
User->>Update: Press arrow keys (while help open)
Update->>Model: Update helpScroll based on key
Model->>Model: Clamp scroll to valid bounds
View->>Model: Check if showingHelp
alt Help Panel Active
View->>HelpPanel: Render helpPanelView()
HelpPanel->>HelpPanel: Build shortcuts in columns<br/>Calculate available height<br/>Slice lines for current scroll
HelpPanel->>View: Return formatted panel
View->>User: Display centered help panel overlay
else Help Panel Inactive
View->>User: Render normal TUI
end
User->>Update: Press Escape or f1 again
Update->>Model: Set showingHelp = false
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
/helpcommand orf1key.