Repository navigation
fix(linux): empty window under the C locale; CLAUDE.md: read, probe, then implement - #16
Merged
Merged
Conversation
A rule ahead of the others: read the installed source and the docs, reproduce the failure under the conditions where it fails, and measure the candidate fix in a throwaway worktree, before writing code. For CI-only failures, list the runner's differences (user, locale, exported variables, image, versions) and test them locally one at a time; a push is not an experiment. Written after six diagnostic pushes on 2026-11-06 missed what one local run as a non-root user with LANG=C.UTF-8 showed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
With LANG=C.UTF-8 WebKitGTK reports navigator.language "C", uPlot throws building Intl.NumberFormat at load, and the window stays empty. The spec records the inventory (wry and Tauri set no language; webkit2gtk exposes set_preferred_languages), the measurement that a call in setup still reaches the page, and that a fixed en-US would override Italian users, so the language is set only when the locale names none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
Under the C or POSIX locale (WSL2, containers, cloud VMs, CI runners) the window stayed empty: WebKitGTK reported navigator.language "C" and uPlot's Intl.NumberFormat threw when its module loaded. In setup, when the first of g_get_language_names() is C or POSIX, the main webview's context gets en-US through webkit_web_context_set_preferred_languages; any other language is left to WebKit. webkit2gtk is the version Tauri already uses. Measured on WebKitGTK 2.52.6 as a non-root user: C.UTF-8 now gives en-US and the app mounts (it did not before), it_IT.UTF-8 stays it-IT. The full E2E passes 88/88 as that user with LANG=C.UTF-8 and 88/88 as root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
With the locale fix the app starts on the Linux runner, and the run then stopped at the first Connect: "Disconnect" never appeared. pymodbus 3.16.2 needs pyserial for its serial server, which is an extra; without it the ASCII serial reference server raises "Serial client requires pyserial", and asyncio.gather in reference_servers.py takes the TCP servers down with it, so the master's connection is refused. Locally pyserial happened to be installed; Windows starts no serial server. Reproduced locally with Python 3.12 and a clean pymodbus 3.16.2 in a throwaway venv, LANG=C.UTF-8, fresh HOME: the same "Disconnect ... still not existing after 5000ms". With pymodbus[serial]==3.16.2 the TCP ports listen and the E2E passes 88/88. The README and run.mjs name the extra too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
LANG=C.UTF-8orPOSIX, as on WSL2, containers, cloud VMs and the CI runner.navigator.language = "C". uPlot 1.6.32 buildsIntl.NumberFormat(navigator.language)when its module loads, so the bundle throwsRangeError: invalid language tag: Cand the app never mounts. This is what kept the Linux E2E red in CI.setup, when the first ofg_get_language_names()is C or POSIX, the main webview getsen-USthroughwebkit_web_context_set_preferred_languages. Any other language is left to WebKit.webkit2gtk2.0, Linux only. It is the version Tauri already uses.docs/superpowers/specs/2026-11-06-linux-locale-design.md. Verification:docs/superpowers/verification/2026-11-06-linux-locale.md.Measured on WebKitGTK 2.52.6, Ubuntu 24.04, Xvfb, as a non-root user:
LANGC.UTF-8"C", RangeError, empty window"en-US", app mounts (3/3 runs)POSIX"en-US", mounts"en-US", mountsit_IT.UTF-8"it-IT", mounts"it-IT"kept, mountsFull E2E against pymodbus with the fix: 88/88 as a non-root user with
LANG=C.UTF-8, and 88/88 as root.Type
Checklist
npm run check && npm run lint && npm run format:check && npm testpass. No frontend code changed.cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testpass (insrc-tauri/)apply()needs a real webview, so the E2E covers it.npm run file-size); touched files refactored on touchnpm run e2e): 88/88 non-root withLANG=C.UTF-8, 88/88 as rootCHANGELOG.mdupdated if behaviour or interfaces changed, perCLAUDE.md. The fix is listed under v3.4.0 Fixed.Notes for reviewers
cargo mutantswas not run onwebview_locale.rs: it is not protocol code, and its single decision is covered by the unit tests.Generated by Claude Code