Repository navigation
feat(web): show poster peeks on Home rows - #1893
Conversation
Each shown row in the Home rows list now shows its first three titles' posters (two on phones), from the admin preview of the row's own definition. Peeks load only once their row nears the screen, stay fresh for five minutes under their own cache key so list refreshes after a write don't refetch them, and share a budget of four requests in flight. Off rows, errors, empty rows and servers without previews keep the group icon tile. The Add row and Edit row strip shares the same preview fetch, and both fall back to the blurred thumbhash when a poster fails to load. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The on-screen observer was attached only to the icon tile, so a row that remounted with its peek already cached never reported reaching the screen and never refetched, which made the five-minute freshness window dead code. The observer now wraps both the icon tile and the posters, so a stale peek reloads once its row is back on screen. New tests cover a fresh peek (no reload) and a stale one after turning a row off and on or leaving the page. Also match the mockup: the icon tile is 42px tall on phones like the poster stack, and the poster ring takes the row's hover and selected colour. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f313966320
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fetch: async (signal) => | ||
| (await fetchRowPreview(row, page, PEEK_ITEM_LIMIT, signal)).items, |
There was a problem hiding this comment.
When the preview endpoint accepts a connection but stops responding, this fetch has no deadline: web/src/api/v2/request.ts only applies the read timeout to GET/HEAD and POST /api/v2/catalog/query, while all other POST requests wait indefinitely. Because usePeek sends these calls through a shared four-slot limiter, four stalled visible-row previews permanently occupy every slot and prevent later rows from loading until the page unmounts. Classify the preview operation as a read-only POST or pass an explicit timeout so failed requests release their slots.
AGENTS.md reference: AGENTS.md:L73-L75
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in 8cffaee. POST /api/v2/admin/sections/preview is now in readOnlyPostOperations, so it gets the same read deadline as a GET; a stalled preview fails with V2TimeoutError and releases its peek slot. Added a test in request.deadline.test.ts that hangs the preview and expects the timeout; it fails without the change.
…to feat/home-rows-poster-peeks
The admin row preview is a read sent as POST, so it had no deadline. Poster peeks share four request slots; four previews stuck on a server that went quiet held every slot until the page unmounted, and no other row's peek could load. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Minor change — #1141 C1 (Web admin). Enabled-row artwork in the Home rows list changes from a kind icon to poster peeks; the add, reorder, and saved-configuration flows remain unchanged. C1 is currently The Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
|
Minor change — Suggested line: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Problem
Related issue: #1137
Validation tasks: reaches #1141 C1 (the Home rows list now shows posters on each row that is on; building, reordering and saved configuration are unchanged); changes none
Stacked on #1891, so this targets
fix/sections-preview-posters(#1891 sits on #1889, #1885, #1884, #1883 and #1882). It retargets tofeat/collections-revamponce those merge.In Admin > Home rows, every row starts with an icon for its kind, so an admin can't see what a row currently shows without opening Home or the row's Edit dialog. The approved design starts each row with a poster peek: a small fan of the row's first posters. This PR adds them. Each row that is on shows the posters of its first three titles, or two on phones. Rows that are off keep their collapsed look. This is the poster peek step of the Home rows redesign. It depends on #1891, which makes the admin preview return poster URLs.
Approach
A peek calls
POST /api/v2/admin/sections/previewwithitem_limit3 and the row's stored type, config and library page. It doesn't use the viewer item endpoints, because those resolve the admin's own profile layout, which can carry that profile's overrides. The page edits the server row, so the peek shows the server row.Peeks load only when needed and share a request budget:
sectionKeys. The list refetch after every row write doesn't reload the peeks, and editing a row's config gives it a new key and a fresh peek.The row keeps its icon while the peek loads, and when the request fails, the row has no titles, or the server doesn't report the preview capability. In that last case no request is sent. A title without a poster, or whose poster fails to load, shows its blurred thumbhash. The Add row and Edit row preview strip now uses the same poster component and fetch, so it gets the same fallback, and its request is cancelled when the query is dropped. Poster rings take the row's hover and selected colour, as in the mockup.
The admin adapter decides whether rows get peeks, from
capabilities.preview; the components read no account role. Settings > Home Screen isn't built from these components yet and is unchanged.Differences from the approved design and plan, for sign-off:
usePeek(row). The adapter instead returns the peek's query key and fetch frompeek(row), and one shared hook handles lazy start, the request limit and caching. The profile adapter can implement the same member when Settings > Home Screen moves to these components.Not in this PR: the plan has Edit row show the row's peek posters while its 7-title preview loads. Neither #1883 nor this PR builds that; it stays a follow-up.
Validation
make test-web(776 files, 7124 tests passed),pnpm run lint(0 errors, no warnings in changed files),format:check,build,tsc -bandbudget:checkpass.sectionKeys, dropping config from the key, or setting the fresh time to 0 each makes a test fail.make verify-local-pathspasses.Risks
Opening the page sends one 3-title preview per row that is on and on screen, 4 at a time. Reopening it within 5 minutes sends none. Rows that don't depend on the viewer use the server's shared section cache; personalized rows such as Continue watching, Recommended for you, Because you watched and personal collections run their query on each request. The 4-request limit applies per browser tab, not per admin.
No API, stored data,
section_type, recipe ID, preset key, layout export/import or gating change, and hero behavior is unchanged. silo-apple, silo-android and jellycompat need no change.The user manual doesn't mention row posters. A siloserver.org issue covering them, along with the rest of the Home rows changes, is drafted and not filed yet.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add poster peeks to admin Home rows
PosterArtcomposes a thumbhash background with a lazy-loaded poster image and falls back to the background when the image fails to load.HomeRowsAdaptercallback, wired in useAdminHomeRows.ts.previewSectionnow accepts an AbortSignal, and the admin section preview POST is classified as read-only so it gets the default read timeout.Macroscope summarized 8cffaee.