fix: use RenderPageWithBottomHelp in play.go list/station views; add g/G to docs#108
fix: use RenderPageWithBottomHelp in play.go list/station views; add g/G to docs#108
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
…ws; add g/G to docs - fix: use RenderPageWithBottomHelp in play.go, most_played.go; center help overlay; add g/G to docs
There was a problem hiding this comment.
🧹 Nitpick comments (1)
v3/internal/ui/most_played.go (1)
804-809: Consider usingRenderPageWithBottomHelpfor consistency.The
viewSavePromptandviewSelectListmethods still useRenderPagewhileviewList,viewPlaying, andviewTagInputnow useRenderPageWithBottomHelp. For a consistent user experience with bottom-aligned help across all views, consider updating these as well.♻️ Optional: Update viewSavePrompt to use RenderPageWithBottomHelp
- return RenderPage(PageLayout{ + return RenderPageWithBottomHelp(PageLayout{ Title: "💾 Save Station", Content: content.String(), Help: "Y: My-favorites • L: Choose list • N: Cancel", - }) + }, m.height)Similar change for
viewSelectList.Also applies to: 817-822
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@v3/internal/ui/most_played.go` around lines 804 - 809, Update viewSavePrompt and viewSelectList to use RenderPageWithBottomHelp for consistent bottom-aligned help: locate the calls that currently return RenderPage(PageLayout{Title: ..., Content: ..., Help: "..."}) in the viewSavePrompt and viewSelectList functions and replace them with RenderPageWithBottomHelp(PageLayout{Title: ..., Content: ...}, "Y: My-favorites • L: Choose list • N: Cancel") (i.e., move the help text out of the PageLayout.Help field and pass it as the bottom-help argument to RenderPageWithBottomHelp); apply the same change to the other occurrence around the 817-822 block so all views use RenderPageWithBottomHelp consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@v3/internal/ui/most_played.go`:
- Around line 804-809: Update viewSavePrompt and viewSelectList to use
RenderPageWithBottomHelp for consistent bottom-aligned help: locate the calls
that currently return RenderPage(PageLayout{Title: ..., Content: ..., Help:
"..."}) in the viewSavePrompt and viewSelectList functions and replace them with
RenderPageWithBottomHelp(PageLayout{Title: ..., Content: ...}, "Y: My-favorites
• L: Choose list • N: Cancel") (i.e., move the help text out of the
PageLayout.Help field and pass it as the bottom-help argument to
RenderPageWithBottomHelp); apply the same change to the other occurrence around
the 817-822 block so all views use RenderPageWithBottomHelp consistently.
…n ? overlay - fix: use RenderPageWithBottomHelp across all gist, lucky, play, most_played views
…st in most_played.go
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
v3/internal/ui/lucky.go (1)
1301-1301: Consider centralizing Lucky footer help strings.Lines 1301, 1407, and 1944 use hardcoded literals across views. Moving them to constants reduces copy/paste drift and keeps help text updates safer.
♻️ Refactor sketch
+const ( + luckyHelpInputFooter = "Tab: Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help" + luckyHelpPlayingFooter = "Space: Pause • f: Fav • s: List • 0: Main Menu • ?: Help" + luckyHelpShuffleFooter = "Space: Pause • n: Next • [: Prev • f: Fav • h: Stop shuffle • 0: Main Menu • ?: Help" +) ... - helpText := "Tab: Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help" + helpText := luckyHelpInputFooter ... - helpText := "Space: Pause • f: Fav • s: List • 0: Main Menu • ?: Help" + helpText := luckyHelpPlayingFooter ... - help := "Space: Pause • n: Next • [: Prev • f: Fav • h: Stop shuffle • 0: Main Menu • ?: Help" + help := luckyHelpShuffleFooterAlso applies to: 1407-1407, 1944-1944
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@v3/internal/ui/lucky.go` at line 1301, Create a central constant (e.g., const luckyFooterHelp = "Tab: Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help") in the same package and replace the hardcoded literal assigned to helpText and the other occurrences in this file (the other literals around where helpText is used) with that constant; update any references in functions or view initializations that currently duplicate the string so all views use luckyFooterHelp to avoid drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@v3/internal/ui/components/help.go`:
- Line 318: Replace the inconsistent help text entry {"f", "Save to
My-favorites"} so it uses the same terminology as runtime messages—change the
display string to "Save to Quick Favorites" (update the literal in the help
entries collection where {"f", "Save to My-favorites"} appears, and verify other
help strings use "Quick Favorites" to keep terminology consistent with save
success texts).
---
Nitpick comments:
In `@v3/internal/ui/lucky.go`:
- Line 1301: Create a central constant (e.g., const luckyFooterHelp = "Tab:
Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help") in the
same package and replace the hardcoded literal assigned to helpText and the
other occurrences in this file (the other literals around where helpText is
used) with that constant; update any references in functions or view
initializations that currently duplicate the string so all views use
luckyFooterHelp to avoid drift.
ℹ️ Review info
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
v3/internal/ui/components/help.gov3/internal/ui/gist.gov3/internal/ui/lucky.gov3/internal/ui/most_played.go
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/internal/ui/most_played.go
…ogy in CreateLuckyHelp
Closes #73
📑 Description
✅ Checks
ℹ Additional Information
Summary by CodeRabbit
New Features
g(Top) andG(End).?to toggle it.Documentation
Refactor