Show the image/video split on the album card - #411
Merged
Merged
Conversation
/index_metadata has returned image_count and video_count since #360, but the album card still showed a single total, so a count that jumped because videos were indexed gave no hint why. Image-only albums keep the single count; once videos are present the card reads "N images, M videos", omitting a zero side. Counts of one are now singular. Closes #368 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #368.
Summary
GET /index_metadata/{album_key}has returnedimage_countandvideo_countsince #360, but nothing in the frontend read them. This wires them into the album card's index-status line through a new exported helper,formatIndexCount()inalbum-manager.js.(120 images), same as before(120 images, 4 videos)(4 videos)1 image/1 video(1 image)instead of(1 images).filename_count.Not changed
total_imagesfrom the progress endpoint, which returns no split, so matching it would need backend work first.filename_countonly as a total and never display it.Tests
New
tests/frontend/album-card-media-count.test.jscovers the display rules for each case above, the missing-field fallback, and the rendered.index-statustext for a mixed album and an image-only album. Full frontend suite: 58 suites, 963 tests passing; eslint and prettier are clean.🤖 Generated with Claude Code