Skip to content

Develop - #5

Merged
EarMaster merged 5 commits into
mainfrom
develop
Aug 5, 2026
Merged

EarMaster merged 5 commits into
mainfrom
develop

Conversation

@EarMaster

Copy link
Copy Markdown
Owner

No description provided.

EarMaster and others added 5 commits August 5, 2026 22:16
A favourite recorded a cover only when it was saved from an album whose
artwork the album grid had already resolved. The player's star and every
folder and track row in the library saved none, and nothing filled one in
later — so the tab was a wall of placeholder icons while the image
loader's 96 MB disk cache sat unused, never having been given a URL to
fetch. Caching was never the missing piece; knowing the file name was.

The player now stores the playing song's already-resolved cover when it
saves, and ResolveFavoriteCoverUseCase fills in the rest as entries come
on screen: get_album_coverart for an album, get_single_coverart for a
track, and for a folder the first track inside it — from the Room cache
when that level has been browsed, otherwise one get_folder_content first,
following one level down for a folder that holds only subfolders.

Capped by the album grid's existing two-permit semaphore, tried once per
favourite per session, and persisted, so a favourite costs the lookup
once ever and then renders from the disk cache with the box switched off.
The "already asked" set is cleared when the box or the connection
changes, so an attempt spent on an unreachable box is not the only one a
favourite gets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The cover grid stays the default — a big cover is what makes a favourite
something a child can aim at without reading — but a collection that has
outgrown a screenful of tiles is easier to scan by name as rows. The
switch is a top bar action on that tab, and the choice is stored, so the
tab comes back the way it was left.

The preference is owned by AppViewModel and passed into FavoritesScreen
rather than read there, because the control lives in the shell's top bar
and one preference should have one owner. Both layouts share a single
LazyVerticalGrid — one fixed column is the list — and a single
FavoriteEntry, so neither shape can quietly lose an action the other has.

It rides in the settings backup without bumping FORMAT_VERSION: an older
build that drops the field loses a layout preference, not the ability to
play anything.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The fake image loader answered every URL with one green rectangle, which
left the goldens unable to fail on most of the ways cover display goes
wrong: cropped, stretched, letterboxed, left unclipped or swapped with a
different cover all look identical when the picture is one colour.

FakeCoverArt draws a 3:2 landscape source, so ContentScale.Crop has to be
doing something — Fit would letterbox. Inside it, a circle in the middle
third stays round when scaled correctly and becomes an ellipse when
stretched; an asymmetric wedge and a full-width base stripe mean a
mirrored or vertically offset draw is not a picture that happens to
match; and the colour comes from the URL, so a cover shown against the
wrong title is visible rather than plausible. Everything is a pure
function of the URL — String.hashCode is specified by the JLS — because a
golden cannot afford a picture that varies by host or run.

Fixtures.albums gains artwork on four of six entries so the album grid
exercises this too, keeping two placeholders for the albums a box has no
art for. The store assets are deliberately not regenerated here: they are
products, and bringing them in step is its own act.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
They still showed the flat green rectangle the fake image loader used to
answer every cover request with, and the favourites shot in particular
had four empty tiles sitting above a mini player that did show a cover —
which reads as artwork failing to load rather than as a design, and
contradicts what the app does now that a played folder keeps its cover.

StoreFixtures.favorites therefore gains artwork on three of four, leaving
one placeholder because a box genuinely has folders it has no art for.
The third is spelt cover-fairytales.jpg rather than cover-fairy-tales.jpg
because the latter hashes into the same palette slot as the bedtime
cover, and two identical tiles side by side is what the shot is meant to
disprove. FakeCoverArt and AGENTS.md now say how to check that.

All 15 Play images and the 15 copies under docs/pages are rebuilt, and
tools/check_store_metadata.sh passes on format, alpha, dimensions and
aspect ratio.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@EarMaster
EarMaster merged commit a96388b into main Aug 5, 2026
10 checks passed
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.

1 participant