Repository navigation
fix(web): refresh catalog views when the metadata language changes - #2213
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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. |
|
This PR visibly refreshes localized titles and descriptions after a metadata-language change on detail pages, Home, and other media views. The Evidence section currently says the link is forthcoming, so there is no evidence to review.
Name the surfaces and PR build or commit in the evidence, or replace the placeholder with the published evidence page link. No diff. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddc73fa695
ℹ️ 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".
Changing the profile's metadata language, or its per-source exceptions, only refreshed the settings reads. Detail pages, Home and other catalog views kept showing titles and descriptions in the old language until their cached data went stale. A change to either setting, saved here or reported by another device, now marks every cached media read stale and resets Home's load queue, as switching profile already does in effect.
ddc73fa to
4357315
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Evidence is linked in the description now: https://evidence.siloserver.org/r/silo-server/pr-2213/ (the detail page after switching German to French without a reload, desktop and mobile web, before and after). The |
The refresh invalidated every query except settings, so it refetched client-only admin state (the WebSocket-fed active scans list reset to empty) and held the settings mutation pending until every active query in the app had refetched. It also cancelled only Home and library rows, so a detail read or prefetch already in flight in the old language still landed as fresh. Refresh the localized reads only, through the media surface matcher plus collections, episodes and calendar, cancel every one of them before invalidating, and let the write settle once they are marked stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104
left a comment
There was a problem hiding this comment.
Review of 8886931. The approach is right: a metadata-language change has to refresh the localized reads, and doing it in the settings invalidation path covers both local writes and other devices. I found three defects in how wide the refresh reaches and when it settles. They're on the lines below, and I'm fixing all three in a commit on this branch. I'll follow up with a summary once the fix is verified.
|
The linked evidence is described as covering the detail page on desktop and mobile, but this refresh also affects localized text on other media surfaces.
No diff. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
Review summary (head 295ed1b)Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green) The change belongs here. A metadata-language change should show up without a reload, and the settings invalidation path is the right place, because it covers both a save in this browser and a change from another device. I fixed three defects in a5bb7d7; the threads on 8886931 have the details.
Verification. New web tests cover each defect, and each one fails on 8886931. The focused query, Home and realtime suites pass (164 files, 1015 tests). Lint, typecheck and Prettier are clean. On a dev sandbox built from a5bb7d7, with German and French text seeded for one movie, the open detail page changed language after an in-app switch and after a change from another tab, with no reload. The language control re-enabled about 30 ms after each save. The console showed no errors. The published evidence still holds: it shows the detail page refreshing after a switch, which this head still does. Remaining, not blocking
Found during review, not caused by this PR
Validated features. No passed case is affected. #1215 C2 ("switch language/profile without stale cross-profile values") hasn't been run, and this PR is needed for it to pass, so the body now says User manual. Unaffected. The preferences page already says the metadata language sets titles and descriptions; this makes the web app apply it without a reload. Apple and Android. This is a web cache fix. I didn't check whether the apps refresh open screens after a language change; their #1212 validation tasks walk the same switch. Review method. A Claude multi-agent review (three finders and a validation check, Opus 5.5 and Sonnet 5.5) and one Codex gpt-6.1-sol adversarial round on 8886931. Findings were checked against the source before they were posted or fixed. AI disclosure: this review and the fix commit were written by Claude Code (claude-opus-5-5) in T3 Code, with a Codex (gpt-6.1-sol) review round. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d4b31b5d0
ℹ️ 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".
…ge change Shuffle cards come from the localized item detail, and the Watch Together picker's rows, search and recently added lists from the localized catalog. Neither key family was in the localized refresh, so an open shuffle post-roll or picker kept the previous language. Room presence and member state are not localized and stay out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Validation impact
Profile switching is a separate path and is not changed here; on this head, Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d63860125
ℹ️ 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".
The Home-row editor's peeks and previews read section cards, and its curated-title search reads the catalog, under their own key families. None was in the localized refresh, so an open editor kept the previous language until the five-minute stale window ran out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cef3914706
ℹ️ 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".
Collection poster peeks read the collection's item cards under their own key family, which the localized refresh missed. An audit of every query key root in web/src found no other localized card reads outside the refresh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
Related issue: #1212
Validation tasks: unblocks #1215 C2
Changing the profile's metadata language, or its per-source exceptions, only refreshed the settings reads. Detail pages, Home and other catalog views kept showing titles and descriptions in the old language until their cached data went stale.
Approach
A change to
catalog.metadata_languageorcatalog.metadata_language_overrides, saved in this browser or reported by another device, refreshes the localized media reads: the reads the media surface refresh already covers (catalog, sections, items, people, recommendations, progress, history, favorites, watchlist, library collections), plus collections, episodes, calendar, shuffle cards, collection peeks, the Home-row editor and the Watch Together picker. Requests for those reads that are still in flight are cancelled first, so an old-language answer can't land as fresh data. Then the reads are marked stale and Home's load queue restarts. The save settles once the reads are marked stale; open screens refetch on their own.Admin and other client-only state is left alone. Switching profile already clears the whole query cache.
Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2213/
Risks
The refresh runs twice on the device that saves, once for the save and once for its own realtime echo, as the existing Home and library refreshes already do. Home and library rows refetch but stay in the source language until #2209 localizes section cards.
Follow-up: #2475 (the player treats a failed background refresh of the watch detail as fatal).
Checklist
AI Disclosure
/code-review(medium) over the combined diff of all [v1] AI metadata translation #1212 server branches before opening. It found one bug in the on-view language guard (see fix(metadata): limit on-view translation to the viewer's missing language #2211), which is fixed there; nothing in this branch. A later review (Claude multi-agent review plus a Codex gpt-6.1-sol adversarial round, on 8886931) found three defects in this branch, fixed in a5bb7d7. The Codex review bot then found the shuffle, picker, Home-row editor and collection peek cards missing from the refresh, fixed in 4d63860, cef3914 and 295ed1b.Note
Fix catalog views to refresh when the metadata language setting changes
refreshLocalizedMediaQueriesin mediaSurfaceRefresh.ts. It cancels matching in-flight reads, invalidates localized media queries (catalog details, shuffle, Home rows, curated lists, collection peeks, Watch Together picker), and bumps the Home refresh signal without waiting for refetches.refreshLocalizedMediaForSettingin settingValues.ts. Only the two metadata-language setting keys trigger the refresh, from both setting writes and realtime settings-change events.Macroscope summarized 295ed1b.