fix(web): preserve locale preference during prefetch - #13255
Conversation
|
Warning Review limit reachedNext included review available in 2 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
|
All contributors have signed the CLA ✍️ ✅ |
|
e77a6b1 feat: add current-work reads and Find Work (manaflow-ai#13269) 6386ba5 Cache Ghostty CLI helper builds across local invocations (manaflow-ai#13206) 8f6c0ea ci: measure compiled test artifact transfer cost (manaflow-ai#13172) 55092b9 docs: add a concise guide for public CMUX writing (manaflow-ai#13257) 9e7d3be fix(web): preserve locale preference during prefetch (manaflow-ai#13255) b093335 build: skip unchanged diff sidecar builds (manaflow-ai#13212) b79d77d perf: skip unchanged bundled resource builds (manaflow-ai#13209) 4c19fcb feat: expose stable surface and workspace IDs in catalog reads (manaflow-ai#13247) 95fdfd7 ci: add safe stale run janitor (manaflow-ai#13143) 0bcf003 docs: make the contributor verification ladder explicit (manaflow-ai#13242)
A Korean-route prefetch can complete after the language picker has selected English and overwrite
NEXT_LOCALE=enwithko. The page remains English, but reloads use the stale preference. A browser trace reproduced this ordering: the prefetch requested/ko/blog/cmux-vaultwith the new English cookie, then returnedSet-Cookie: NEXT_LOCALE=ko.Suppress next-intl's cookie publication for all router-prefetch variants (including static
1, runtime2, and shell3) andpurpose: prefetch, preserving its locale routing and request headers. Rebuild the response without the cookie headers so later cookie writes cannot resurrect the preference from an internal cookie map. Ordinary document and RSC navigation still persist the destination locale. The language picker and existing browser assertions are unchanged.Validation: the static/purpose regressions fail before the initial fix, and the runtime/shell regressions fail before the review fix. All 10 focused middleware/link tests, typecheck, and the complexity check pass on the current head. The initial fix also passed all four existing production-browser locale cases (Korean/Japanese/Arabic roundtrips and nested-route reload), 20 further nested-route repetitions, and the complexity gate across all tracked web sources. Fresh hosted browser/CI results are required for the review follow-up. The original browser failure was preserved (1 failure in 10 baseline nested-route repetitions), rather than waived as unrelated CI noise.
Fixes #13246.