Repository navigation
fix(app): don't crash on POSIX-style browser locales - #3595
Conversation
On LANG=C.UTF-8 hosts headless Chromium reports navigator.language as en-US@posix, which Intl rejects. uPlot calls Intl.NumberFormat with it at import time, so the app crashes and e2e global setup times out.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
PR Review✅ No issues found. |
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
uPlot builds Intl.NumberFormat(navigator.language) at import time and throws on tags like en-US@posix, which Chromium reports on LANG=C.UTF-8 hosts. Patch it to fall back to en-US.
Deep ReviewScope: PR #3595 — patch uPlot's import-time The uPlot patch was verified correct: the ✅ No critical issues found. 🟡 P2 — recommended
🔵 P3 nitpicks (4)
Reviewers (6): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 466 passed • 1 skipped • 1192s
Tests ran across 4 shards in parallel. |
Summary
The app crashes on load when the browser reports a POSIX-style language such as
en-US@posix. Headless Chromium does this onLANG=C.UTF-8hosts. uPlot callsnew Intl.NumberFormat(navigator.language)at import time, andIntlthrows on that tag. The latest uPlot release (1.6.32) still does this.yarn patch) to fall back toen-USwhenIntlrejects the browser language, with a unit test.en-USso e2e formatting doesn't depend on the host.How to reproduce
LANG=C.UTF-8, runmake e2e.main, global setup times out waiting forsource-selector. The browser console showsRangeError: Invalid language tag: en-US@posix.🤖 Generated with Claude Code