feat(home): land on Home, and make it worth landing on
Build & publish Arch package / arch-package (push) Successful in 2m3s
CI / check (push) Canceled after 10s
CI / e2e (push) Canceled after 0s
Search index maintenance / maintain-index (push) Canceled after 0s

The app opened on Tracks — an alphabetical list of everything, which is
the one entry point that is identical every time and therefore gives the
user nothing to start from. Home is listed first in the nav and is the
page built to answer 'what should I play' (H-8).

Two things had to be true before that was an improvement.

An album with no cover rendered as a small dim icon on a surface the
same colour as the page, so a shelf read as having holes in it, while
the Albums and Artists grids both drew a letter tile (H-9). It draws the
same tile now.

And a shelf that repeats the one above it is suppressed, the way an
empty one already is — 'On repeat' was 'Pick up where you left off'
reordered. The rule fires only when the shelf is not showing the whole
library: a repeat is a fault only if a different row was possible, and
measured against a fixed shelf size instead this let an 11-album library
keep three identical shelves while a 13-album one lost them.

The first two versions of that rule were wrong and the *existing* Go
tests caught both — it collapsed a four-album library to a single shelf.

Nine e2e specs assumed the app starts on Tracks and now navigate there,
and one new spec freezes the landing itself. Home's page-header action
is 'Shuffle suggestions': 'Shuffle' alone was two different controls
with one accessible name, which only became reachable together once a
cached Home was always in the tree.
This commit is contained in:
2026-08-12 11:42:26 -04:00
parent c13a920487
commit 862e8a0468
11 changed files with 271 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -70,6 +70,28 @@ describe('home view', () => {
]);
});
it('draws a letter tile for an album with no cover, not a hole', async () => {
// H-9: the missing-art placeholder was a small dim icon on a
// surface the same colour as the page, so a shelf read as having
// gaps in it — while the Albums and Artists grids both drew a
// letter tile. Plainly visible in any Home screenshot, and
// invisible to every assertion in this file until now.
const el = await fixture('home-view');
await el.updateComplete;
await new Promise((r) => setTimeout(r, 20));
const placeholders = shadowAll(el, '.art .placeholder');
expect(placeholders.length, 'no placeholders for coverless albums').toBeGreaterThan(
0,
);
// The initial of the album's own name, as cover-grid does it.
expect(placeholders[0]?.textContent?.trim()).toBe('K');
// And it is a tile: it fills the art box rather than sitting in it.
expect(getComputedStyle(placeholders[0]!).backgroundImage).not.toBe('none');
});
it('keys each row by the kind the backend assigned', async () => {
const el = await fixture('home-view');
await el.updateComplete;