Skip to content

Settings: ask for a poster of a kind the Under posters preview lacks - #1287

Merged
GLinnik21 merged 2 commits into
mainfrom
worktree-bridge-cse_01P6ZnFdaGFYTfiAWVCQ9QUh
Nov 8, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
worktree-bridge-cse_01P6ZnFdaGFYTfiAWVCQ9QUh

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Summary

Settings > Under posters drew its two preview tiles (MOVIE, TV SHOW) only from what the Browse store had already cached, and the store caches only libraries the user has opened. A show library never opened left the TV SHOW tile an empty placeholder.

The Under posters page, and the Settings root while its Under posters row has focus (and it is the page on top), now ask the store for the shelves of the library of any kind that has no poster: LibraryWork::Hubs { may_publish: true } plus a StoreWork::Browse pump, per tick. This reads the shelves into the section's own cache and does not switch the library the user is on. The ask stops per kind when the poster is there or when the store has published that library's shelves (new DirectoryView::kind_shelves_published), so there is no timer. Any poster of the kind is fine; which one is not specified.

Why a plain one-shot ask was not enough (found in the simulator): the store reads one library's shelves at a time, a landed read is staged until the next Hubs ask commits it, and nothing lands unless the store is pumped.

Verification

  • Regression tests first: the page test failed against the old behaviour (no ask, no pump). New tests cover the page, the Settings root (only on its Under posters row, only while on top) and the new view accessor.
  • macOS simulator against tests/mock_pms.py (a movie and a show library), booted on plxnative-settings=under-posters: both tiles empty before, both show posters after, and the event log shows both libraries' shelves landing. Mock posters are solid colours. Simulator evidence only, not TV-verified.
  • Committed tree, clean before and after: make check all 127 steps ok, make check-nodef ok.
  • pr-reviewer ran once: three MINOR findings (root and page both pumping the store, a timer that could run out before a slow server answered, no root test), all fixed in the second commit.

Gates

make check and make check-nodef green. No change to ci/allow/**, Makefile, Cargo.* or the module layout.

🤖 Generated with Claude Code

GLinnik21 and others added 2 commits November 9, 2026 02:10
The Under posters picture drew a kind's tile from the Browse store's
cache only, and the store caches only libraries the user has opened, so
a show library never opened left the TV SHOW tile an empty placeholder.

The Under posters page and the Settings root (while its Under posters
row has focus) now ask the store for the shelves of the library of any
kind with no poster, as `LibraryWork::Hubs`, which reads them into the
section's own cache without switching the user's library. The ask is
repeated with a `StoreWork::Browse` pump each tick until the poster
arrives (one read is in flight at a time, a landed read is committed by
the next ask, and nothing lands unpumped), for at most ten seconds.

Verified in the macOS simulator against mock_pms: both tiles empty
before, both show posters after. Not verified on the TV.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lished

Review of the previous commit found three problems, all fixed here:

- The ask was bounded by an accumulated tick delta, which the dt gate
  (ci/check-deps.sh) forbids in a screen and which could run out before a
  slow server answered, leaving a landed read staged and the tile empty.
  The page now stops per kind when the poster is there or when the store
  has published that library's shelves (`DirectoryView::kind_shelves_
  published`, new, read from the section's hubs state), so there is no
  timer at all.
- The Settings root and the pushed Under posters page both ticked, so the
  Browse store was pumped twice a frame while the page was open. The root
  now asks only while it is the page on top.
- The root's half had no test; it has one now, and so does the new view
  accessor.

Also notes the Settings pages as a second sender of `LibraryWork::Hubs`
in the section_hubs module doc and in screens/src/CLAUDE.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 2fe9e9f into main Nov 8, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the worktree-bridge-cse_01P6ZnFdaGFYTfiAWVCQ9QUh branch November 8, 2026 23:50
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