feat: implement help menu with key bindings display (? to toggle)#2
Open
cmpadden wants to merge 1 commit intoPedramNavid:mainfrom
Open
feat: implement help menu with key bindings display (? to toggle)#2cmpadden wants to merge 1 commit intoPedramNavid:mainfrom
cmpadden wants to merge 1 commit intoPedramNavid:mainfrom
Conversation
Add comprehensive help menu similar to lazygit's ? menu system: - Toggle help menu with ? key (press ? again or Esc to close) - Two-column layout showing key bindings organized by context - Sections: Global, Navigation, Menu Bar, Main Pane, Detail Pane, Create/Edit Modal - Proper overlay system integrated with existing modal architecture - Updated existing help text to mention ? for help Key bindings documented: - Global: q/Ctrl+C (quit), c (create), e (edit), r (refresh), Ctrl+D (toggle detail) - Navigation: Tab/Shift+Tab (pane focus), ↑↓/k/j (navigate), Enter (select) - Context-specific bindings for each pane and modal
Author
|
@PedramNavid feel free to ignore / close this, was just seeing how Claude handled it! |
There was a problem hiding this comment.
Pull Request Overview
A new help menu is introduced to display key bindings in a two-column layout and can be toggled with the ? key.
- Added
? for helpindicator to existing menu and main pane footers - Integrated a
HelpMenucomponent into the application layout (struct, Update, View) - Created
help_menu.gofor building and rendering the full help overlay
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/ui/components/menubar.go | Appended • ? for help to the menu bar help text |
| internal/ui/components/mainpane.go | Added • ? for help in the main pane footer |
| internal/ui/components/layout.go | Integrated HelpMenu into Layout (struct, Update, View) |
| internal/ui/components/help_menu.go | New component for rendering the help menu overlay |
Comments suppressed due to low confidence (3)
internal/ui/components/help_menu.go:1
- The new
HelpMenucomponent and its behaviors (Toggle,Update,View) lack unit tests. Consider adding tests for visibility toggling, input handling, and rendering output to ensure reliability.
package components
internal/ui/components/help_menu.go:6
- The 'bubbletea' package is imported without an alias but the code references 'tea.Msg' and 'tea.KeyMsg'. Add an import alias:
tea "github.com/charmbracelet/bubbletea"to match usage.
"github.com/charmbracelet/bubbletea"
internal/ui/components/help_menu.go:278
- The helper function
maxis defined but never used in this file. Consider removing it or leveraging it to eliminate dead code.
func max(a, b int) int {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
Add comprehensive help menu similar to lazygit's ? menu system:
Key bindings documented: