Series detail page never loads: open() wipes its own state #157

Closed
opened 2026-08-24 03:18:47 +01:00 by naps62-yolo · 0 comments
Owner

Found by the Rich metadata smoke test. Pre-existing on main — this is not a
regression from that milestone, but it hides everything #150 added.

/series/{id} renders an empty shell: an em-dash where the title goes, no
seasons, no cast, no metadata. The daemon sees GET /api/series/{id} and then
nothing — no /seasons, no /files, no /metadata.

The series view's open() takes its state before hiding its siblings:

seriesId = id;
...
for (const sibling of views) {
    sibling.hide();
}
...
await load();

The series view is itself in views, so that loop calls its own hide(), which
sets seriesId = null and bumps sequence. load() then returns at its
if (id === null) guard and the page paints nothing.

The movie view had the same hazard and already carries the fix, with a comment
naming it:

// this page is one of `views`, so the loop below calls its own hide()
// and would wipe the state assigned after it — hide first, then take state

Do the same here: hide the siblings first, then assign seriesId, origin,
returnTo, parentRoute, expanded and focusKey.

A regression test belongs with it — deep-linking to /series/{id} must issue the
seasons request, since the symptom is silent and the next reordering brings it
straight back.

Found by the Rich metadata smoke test. Pre-existing on `main` — this is not a regression from that milestone, but it hides everything #150 added. `/series/{id}` renders an empty shell: an em-dash where the title goes, no seasons, no cast, no metadata. The daemon sees `GET /api/series/{id}` and then nothing — no `/seasons`, no `/files`, no `/metadata`. The series view's `open()` takes its state before hiding its siblings: ``` seriesId = id; ... for (const sibling of views) { sibling.hide(); } ... await load(); ``` The series view is itself in `views`, so that loop calls its own `hide()`, which sets `seriesId = null` and bumps `sequence`. `load()` then returns at its `if (id === null)` guard and the page paints nothing. The movie view had the same hazard and already carries the fix, with a comment naming it: ``` // this page is one of `views`, so the loop below calls its own hide() // and would wipe the state assigned after it — hide first, then take state ``` Do the same here: hide the siblings first, then assign `seriesId`, `origin`, `returnTo`, `parentRoute`, `expanded` and `focusKey`. A regression test belongs with it — deep-linking to `/series/{id}` must issue the seasons request, since the symptom is silent and the next reordering brings it straight back.
naps62-yolo added this to the Rich metadata milestone 2026-08-24 03:18:47 +01:00
naps62-yolo added the phase/5-uidifficulty/easyarea/webtype/bug labels 2026-08-24 03:18:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#157