You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): clear this browser's language override when the picker saves - #3908
Related issue: #3188
Validation tasks: none (the picker's saved value and resolution are unchanged; it also clears a per-browser value an administrator set)
Stacked on #3907; the full stack order is in #3723.
The App language picker writes the profile's value, but a value stored for this browser alone still wins, so picking a language seemed to do nothing on that browser. Only an administrator editing this device's preferences creates such a value on the web, but when one exists the picker can't override it. This makes the picker clear it.
Approach
After the profile write succeeds, the picker deletes this browser's profile_device value, as the Android and Apple pickers do. The clear runs with mutateAsync, so it still finishes if the page closes; it is skipped if the profile or session changed during the write; and a failed clear says so instead of reporting the save as failed. A choice made while a save is in flight is ignored, including one made before the pending state renders.
Validation
Web tests, typecheck, ESLint, prettier, the size ratchet and the bidi check pass on this branch.
On a sandbox with this browser's own value set, picking a language returned PUT 200 then DELETE 204 and the page switched; without one, the DELETE returns 404 silently (see Evidence).
Surface and build: web app Settings → Accessibility, desktop and phone width; English on main and on a build of the whole stack, and Spanish and Arabic on that build, plus the request trail. Phone captures show English (before and after), Spanish and Arabic.
Risks
None identified.
Checklist
I read and can explain the complete diff.
This pull request addresses one concern.
Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
The Evidence section shows every change a user can see, or says there is none.
Involvement: Fully AI-generated; human review pending
Adversarial review: code review by Claude (claude-opus-5-5); one adversarial round by Codex (gpt-6.1-sol) on the integration branch (the clear could hit another profile after a switch; fixed). Background review by Codex (gpt-6.1-sol) on 66e8285: F1 (no way to retry a failed clear) fixed in c851c57 with a "Try again" action.
Localize the web app with a react-intl catalog, hooks, and per-part message loading
Replaces hard-coded English strings across the app, admin, player, settings, and setup-wizard UIs with useT translation lookups and typed MessageKey values; counts, dates, and list separators now follow the app language and locale
Adds i18n infrastructure in web/src/i18n/: catalog loaders with lazy English admin messages, shared formatters, useT/useAppLanguage hooks, and an AppIntlProvider; LocaleProvider in App.tsx resolves the locale from profile settings, a signed-out choice, or the appearance cache, and a signed-out language picker appears on auth screens
Adds a catalogParts Vite plugin in vite.config.ts that splits locale JSON into part=app (excludes web.admin. keys) and part=admin (includes them), with tests in vite.config.test.ts
Parsed V2 problem errors now select display text through a shared problemDisplayText helper (error.<type> and error.field.<code> translations, falling back to server detail); buildApiHeaders sends Accept-Language
Per the PR title, saving the auth language picker clears the stored signed-out browser override (selecting the device-match option clears it)
Adds scripts/sync-translations to generate or download pinned translation assets with checksum and path-safety checks
Behavioral Change: AdminLayout renders nothing until the admin catalog loads (the admin hook throws a recorded load error meanwhile); numbers/dates and generated names (e.g. auto rule names, chart names) use the app locale while some intentionally stay English — check requestRoutingPresets.ts, tmdbSources.chartName, and warningDetailsReport for the English-pinned cases
We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The app language setting saves the selected profile language asynchronously. After a successful save, it clears this browser’s profile-device language value when the captured request context is current and the profile ID matches.
Changes: App language setting
Layer / File(s)
Summary
Save profile language and clear browser value web/src/pages/settings/AccessibilitySettings.tsx
The setting blocks overlapping saves and saves the selected profile value before clearing the browser-specific value. It skips the clear when the request context is absent or stale, or the profile ID differs. Missing-value errors are ignored; other clear failures show an error with a retry action. Save failures do not trigger the clear.
The language picker saves the profile language and then clears this browser's override. Rapid repeated selections can no longer start overlapping saves. No merge-blocking issues remain.
Security architecture risk: Low · up to 7340f
The change is limited to language preferences and includes ordered writes, overlapping-save protection, and separate cleanup recovery. No security vulnerability was established, but delayed cleanup across identity changes and completion after browser shutdown remain incompletely verified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
observed — The inspected picker path fixes the setting key to ui.app_language, writes profile scope, and clears profile_device scope without supplying another profile or device ID. The browser device header identifies the cleanup target; this is not a new generic administrator operation.
Trust Boundaries and Controls
observed — The existing server deletion path selects a per-user store, resolves the setting identity, and validates allowed scope before clearing. Explicitly naming another profile invokes household-management authorization and existence checks within that user’s store.
observed — After initial request construction, token-refresh retries preserve the original profile and device headers. Refresh processing also rejects a result superseded by an account/server change. These existing controls are counterevidence to a simple profile switch redirecting an already-constructed request.
Resilience and Maintainability Implications
observed — Cleanup retries repeat the context preflight but do not use the save lock or a value/version condition. The server clear is transactional and returns 404 for an absent addressed value. Repeated clears converge when no intervening override is written; handling a newer intervening override is not established by the inspected contract.
Hardening Proposals
proposed — If cleanup may be queued or deferred, bind or revalidate its captured authority at actual request dispatch rather than relying solely on the preflight guard. Keep captured credentials out of retained mutation variables.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the main change: clearing this browser’s language override when the picker saves.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description explains how the language picker clears this browser’s per-device language value after a successful profile save.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 1 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 6e4a3f0f-5f2f-46bf-b2bc-3f4d14885378
Commits
Reviewing files that changed from the base of the PR and between c851c57 and 7340f6b.
Files selected for processing: 1
web/src/pages/settings/AccessibilitySettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
silo-triageBot
added
the
size/M
50–199 added + deleted lines (all files); change volume, not priority.
label
Nov 9, 2026
silo-triageBot
added
bug
Something isn't working
evidence-required
Needs before-and-after evidence before the Evidence check passes
priority: P2
Limited scope, workaround exists, or polish
stacked
Base is another open PR; merge in stack order named in the body
labels
Nov 9, 2026
The Evidence section identifies desktop coverage only. Please add phone-width before-and-after captures of the language picker with a browser override set, or explain why mobile web is unaffected. CONTRIBUTING.md requires both web surfaces when the behavior changes on both.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 3a0e9051-8578-41f4-bc8f-41b87c109447
Commits
Reviewing files that changed from the base of the PR and between 569dbaa and c851c57.
Files selected for processing: 1
web/src/pages/settings/AccessibilitySettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Added phone-width captures to the evidence page: Settings → Accessibility in English (before and after), Spanish and Arabic, and the open picker in each language (main has no picker to compare).
The app-language picker writes the profile's value, but a value stored
for this browser alone still wins, so the change seemed to do nothing
here. The picker now deletes this browser's profile_device value after
the profile write, as the Android and Apple pickers do. The clear runs
with mutateAsync so it still finishes if the page closes, says what
failed if it does, and is skipped if the profile or session changed
during the write.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
isPending only changes after a render, so two choices made in that window
could both start a profile write. A ref set synchronously closes it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bugSomething isn't workingevidence-requiredNeeds before-and-after evidence before the Evidence check passesimpact: usabilityCore flow broken or severely blockedjavascriptPull requests that update javascript codeneeds-reviewNeeds maintainer review to resolve uncertain classification, scope, or changed evidence.priority: P2Limited scope, workaround exists, or polishsize/M50–199 added + deleted lines (all files); change volume, not priority.stackedBase is another open PR; merge in stack order named in the body
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related issue: #3188
Validation tasks: none (the picker's saved value and resolution are unchanged; it also clears a per-browser value an administrator set)
Stacked on #3907; the full stack order is in #3723.
The App language picker writes the profile's value, but a value stored for this browser alone still wins, so picking a language seemed to do nothing on that browser. Only an administrator editing this device's preferences creates such a value on the web, but when one exists the picker can't override it. This makes the picker clear it.
Approach
After the profile write succeeds, the picker deletes this browser's
profile_devicevalue, as the Android and Apple pickers do. The clear runs withmutateAsync, so it still finishes if the page closes; it is skipped if the profile or session changed during the write; and a failed clear says so instead of reporting the save as failed. A choice made while a save is in flight is ignored, including one made before the pending state renders.Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3908/
Surface and build: web app Settings → Accessibility, desktop and phone width; English on
mainand on a build of the whole stack, and Spanish and Arabic on that build, plus the request trail. Phone captures show English (before and after), Spanish and Arabic.Risks
None identified.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Localize the web app with a react-intl catalog, hooks, and per-part message loading
useTtranslation lookups and typedMessageKeyvalues; counts, dates, and list separators now follow the app language and localeuseT/useAppLanguagehooks, and anAppIntlProvider;LocaleProviderin App.tsx resolves the locale from profile settings, a signed-out choice, or the appearance cache, and a signed-out language picker appears on auth screenscatalogPartsVite plugin in vite.config.ts that splits locale JSON intopart=app(excludesweb.admin.keys) andpart=admin(includes them), with tests in vite.config.test.tsproblemDisplayTexthelper (error.<type>anderror.field.<code>translations, falling back to server detail);buildApiHeaderssendsAccept-LanguageAdminLayoutrenders nothing until the admin catalog loads (the admin hook throws a recorded load error meanwhile); numbers/dates and generated names (e.g. auto rule names, chart names) use the app locale while some intentionally stay English — checkrequestRoutingPresets.ts,tmdbSources.chartName, andwarningDetailsReportfor the English-pinned casesMacroscope summarized c98de7a.