Skip to content

fix(ui): restore playlist expansion layout - #285

Merged
bjarneo merged 2 commits into
mainfrom
fix/playlist-expand-layout
Jul 25, 2026
Merged

fix(ui): restore playlist expansion layout#285
bjarneo merged 2 commits into
mainfrom
fix/playlist-expand-layout

Conversation

@bjarneo

@bjarneo bjarneo commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Fixes #283.

  • Vertically center collapsed playback frames.
  • Let Ctrl+X expand the playlist to all available body rows.
  • Add layout regressions for centering and expanded height.

Tests: make check

Summary by CodeRabbit

  • Bug Fixes
    • Improved playlist layout sizing when expanded, allowing it to use the available screen height.
    • Vertically centered collapsed playlist content within the terminal window.
    • Refined layout behavior for content-first views.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7a3f5b54-5438-4913-84be-b63f3c64fab9

📥 Commits

Reviewing files that changed from the base of the PR and between 7e74525 and e6c019e.

📒 Files selected for processing (1)
  • ui/model/layout_test.go

📝 Walkthrough

Walkthrough

Playlist layout calculation now allows expanded playlists to use available body rows. Frame rendering vertically centers collapsed content, with tests covering expanded sizing and centering behavior.

Changes

Playlist layout behavior

Layer / File(s) Summary
Expanded playlist sizing
ui/model/layout.go, ui/model/model.go, ui/model/layout_test.go
Expanded playlists use bodyRows instead of the expanded visibility cap, while content-first layouts retain the alternate limit path. Tests verify the resulting row count.
Vertical frame centering
ui/model/view.go, ui/model/layout_test.go
centerFrame adds top padding based on terminal and frame heights while preserving horizontal indentation. A test verifies collapsed-frame centering.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • bjarneo/cliamp#217: Addresses expanded-playlist viewport height and scroll recalculation around view toggling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: restoring playlist expansion layout.
Linked Issues check ✅ Passed The changes restore centered collapsed playback frames and let the expanded playlist use all available body rows, matching #283.
Out of Scope Changes check ✅ Passed The diff stays focused on playlist layout behavior and regression tests, with no unrelated scope added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AI_REVIEW_REQUIRED.txt`:
- Line 1: Complete the self-review and delete the AI_REVIEW_REQUIRED.txt marker
file before merging.

In `@ui/model/layout_test.go`:
- Around line 120-135: The test’s expected frame height bypasses the sizing
applied by View(). Update the expected-content setup around renderMainBody and
mainSections to first apply the same ui.FitRect call using m.layout.panelWidth
and m.layout.bodyRows, then build the expected frame through the same pipeline
as View().
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ef9558b0-23f8-4d31-85f7-ad7c8708d88e

📥 Commits

Reviewing files that changed from the base of the PR and between 40fb54e and 7e74525.

📒 Files selected for processing (5)
  • AI_REVIEW_REQUIRED.txt
  • ui/model/layout.go
  • ui/model/layout_test.go
  • ui/model/model.go
  • ui/model/view.go

Comment thread AI_REVIEW_REQUIRED.txt Outdated
Comment thread ui/model/layout_test.go Outdated
@bjarneo
bjarneo merged commit adc26e9 into main Jul 25, 2026
7 checks passed
@bjarneo
bjarneo deleted the fix/playlist-expand-layout branch July 25, 2026 08:49
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.

The Expand/collapse view function is malfunctioning.

1 participant