fix: align the album detail header with the AI Tagging collection page - #1470
fix: align the album detail header with the AI Tagging collection page#1470inland-taipen wants to merge 2 commits into
Conversation
The album detail page was the only media detail page with an icon-only ghost back button inline with its title. PersonImages and SearchResults both put a labelled outline Back button on its own row with the title as an h1 underneath, so follow that. Fixes AOSSIE-Org#1455 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
WalkthroughThe album detail header now separates navigation, actions, and album metadata. Selection and add-image behavior remain unchanged. An integration test verifies that the Back button navigates to the albums list. ChangesAlbum detail header
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@frontend/src/pages/Album/AlbumDetail.tsx`:
- Around line 234-244: Update the outer header container around the Back button
and selection actions to stack vertically by default and use the existing
side-by-side layout from the sm breakpoint upward. Update the action group
container to allow wrapping so Cancel and Remove Selected remain within narrow
viewports, while preserving its current alignment and spacing at sm and larger
widths.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3a6a0d35-a3c7-496e-ac88-bc77a04e1673
📒 Files selected for processing (2)
frontend/src/pages/Album/AlbumDetail.tsxfrontend/src/pages/__tests__/AlbumDetail.test.tsx
The issue asks for the count in the right-side action area; it was left under the album description. Also stack the header below sm: the two flex rows did not wrap, so Cancel + Remove Selected could push the header wider than a mobile viewport (raised in review).
|
Thanks — both addressed in Header overflow: applied the suggested approach. The outer header is now Also in the same commit: the photo/selected count moved from under the description into the right-side action area, which is what the issue asks for ("Move the image count to the right-side action area") — I had it in the wrong place in the first commit. Gates re-run after the change: |
|
PRs opened without assignments are not appreciated. |
Link your account with GitcordThanks for opening this PR, @inland-taipen! To receive Discord notifications and contributor tracking for this organization:
Once linked, Gitcord can notify you about reviews, merges, and more. — Posted by Gitcord |
|
@rohan-pandeyy |
Fixes #1455
What
Restructures the header on the Albums detail page (
/albums/:albumId) so it matches the layout every other media detail page in the app already uses.Before: an icon-only ghost back button sat inline with the album title on the first row, and the photo count shared the second row with the action buttons.
After, mirroring
PersonImages(the AI Tagging collection page) andSearchResults:ArrowLeft+ "Back") on the left; on the right, the photo/selected count followed by the page actions (Select Images / Add Images, or Cancel / Remove Selected in selection mode).h1, with the description underneath.The count sits in the right-side action area as the issue asks. Below
sm:the header stacks and the action group wraps, so selection mode (Cancel+Remove Selected) cannot push it wider than a mobile viewport.The header action buttons drop
size="sm"so they match the Back button's height in the same row, exactly as "Edit Name" does on the AI Tagging collection page, and pick up thecursor-pointerclass those pages use.Why
frontend/src/pages/Album/AlbumDetail.tsxwas the only detail page not following this shape.PersonImages.tsxandSearchResults.tsxboth render<div className="my-6 flex items-center justify-between">with a labelled Back button followed by<h1 className="mb-6 text-2xl font-bold">. Aligning it makes back-navigation land in the same place and at the same size across pages, and the title-below-controls rhythm consistent.No behaviour changed — same handlers, same selection flow, same grid, same dialogs.
How tested
frontend/src/pages/__tests__/AlbumDetail.test.tsxasserting the album name renders as a heading and that a button with the accessible name Back navigates to the albums list. This pins the new header shape: the old icon-only button had no accessible name, so the test would fail against the previous markup.npm run lint:check,npm run format:check,npx tsc --noEmit— all clean.npm test— 352/352 pass.0c7311a; all still clean.Notes
Back to Albumsbutton style used by the AI Tagging face-collection detail page. I treated that page as the source of truth for the style, and its button label isBack(PersonImages.tsx:92-93), so this matches it exactly. Happy to switch to the literal string "Back to Albums" if that was the intent.AGENTS.md; the change and its tests were reviewed before submission.0c7311aaddresses the review: the count moved into the action area, and the header now stacks belowsm:to prevent horizontal overflow.Summary by CodeRabbit
Style
Tests