Show ready / total book counts with quality-color cue on grouped collections#589
Draft
kevinheneveld wants to merge 2 commits into
Draft
Conversation
647ae2b to
31b6c62
Compare
3 tasks
added 2 commits
May 19, 2026 08:13
The audiobooks toolbar exposes a list/grid toggle, but the grouped view template only rendered a grid — toggling to list mode while grouped by author or series was silently ignored. The list template only existed inside the `groupBy === 'books'` branch. This adds a parallel list rendering for grouped collections: - Row per collection (cover thumb, name, book count) - Clicking a row navigates to the collection page (matches grid behavior) - Keyboard accessible (Enter / Space activate the row) CSS reuses the existing `.audiobooks-list` / `.audiobook-list-item` patterns; the row layout has its own three-column grid template (cover / name / count) since collection rows don't carry status badges or per-item actions. Tests added for both authors and series groupings in list mode. (cherry picked from commit 284cea4)
…e per collection For grouped audiobook views (authors, series), the count column previously showed just the library total. This adds a "ready / total" breakdown where "ready" counts books that have a playable file (status quality-match or quality-mismatch), with the numerator colored: - green when every present file meets the quality profile - orange when at least one file is sub-par but still playable - neutral when no files are present yet Applied to the list-view row and the grid-card bottom placard (visible when showItemDetails is on). The small corner count badge stays as just the library total to keep the visual uncluttered, per Kevin's request. Implementation note: qualityProfiles and activeDownloadAudiobookIds were moved above groupedCollections so the new per-collection counting can call computeAudiobookStatus directly. Avoids a temporal-dead-zone error during initial watcher setup that would otherwise hit the status-cache computed declared further down the file. Closes #2 (cherry picked from commit 647ae2b)
0e4423c to
3492def
Compare
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.
Summary
12 books). This adds a ready / total breakdown — `8 / 12 books` — where the numerator counts books with a playable file present (statusesquality-matchorquality-mismatch).Implementation notes
groupedCollections:readyCountandqualityMismatchCount. Computed inline by callingcomputeAudiobookStatus(the pure helper infe/src/utils/audiobookStatus.ts).qualityProfilesref andactiveDownloadAudiobookIdscomputed are moved earlier in the file sogroupedCollectionscan depend on them. The status-cache computed (audiobookStatusById) declared further down stays where it is —groupedCollectionscalls the pure function directly to avoid a temporal-dead-zone error during initial watcher setup.#2ecc71/#f39c12palette from the audiobook-status legend.Test plan
cd fe && npm run test:unit— 351 / 351 passing (351 new test assertsreadyCountis populated from books-with-files data)npx vue-tsc --noEmit -p tsconfig.app.json— cleancd tests && dotnet test— passing (no backend changes)Closes kevinheneveld#2