Skip to content

fix(i18n): refresh after detecting a different initial locale - #16059

Merged
diegosouzapw merged 4 commits into
release/v3.8.52from
fix/qg-locale-refresh-20261009
Oct 16, 2026
Merged

diegosouzapw merged 4 commits into
release/v3.8.52from
fix/qg-locale-refresh-20261009

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Capture the server-rendered html.lang before persistLocale updates the DOM, so a genuinely different detected locale refreshes server-rendered content. Preserve the no-refresh case when the locale already matches.

The public-boundary regression observes cookie, localStorage, html.lang and RTL direction when next/navigation receives the refresh, using real detection/persistence. Test roots are unmounted inside act. No threshold, timeout or assertion was relaxed.

Current validation — 2026-10-10

Head 2da6fba077aabff3de94a0d59bee6bfcd35d2f5a, including a normal merge of base 7510677f2f8f5317f1947284dab650d01333915d. Diff remains only the two locale files. Normal hooks PASS, no force-push.

  • Original RED on unfixed locale source: four FAIL / one PASS.
  • Current focused UI: five PASS. Native detection/resolution: 25 PASS.
  • Full MCP membership: 56 files / 500 PASS, zero FAIL, with diagnostic --maxWorkers=2 (default config is four). This supersedes the historical 494/499 timeout run, but does not prove the default runner configuration.
  • Full UI with two workers: TIMEOUT / exit 124 after 900 seconds, incomplete.
  • Full UI with the canonical 20-worker configuration: FAIL / exit 1, 465 files (440 PASS / 25 FAIL), 3222 tests (3094 PASS / 125 FAIL / three SKIP), nine errors reported. No full UI acceptance.
  • Exact-base-tree focused control reproduces seven ProviderIcon failures; that repair belongs to test(ui): stabilize real ProviderIcon lazy fallback coverage #16134. BurnRateChart passes focused.
  • Same 24-file failure cluster on the byte-identical base tree: two workers gives 232 PASS / one FAIL (cache timing <0.1 ms); 20 workers gives 225 PASS / six FAIL / two SKIP plus suite setup/cleanup failures. This demonstrates execution sensitivity, not that all full-suite failures are fixed or caused by the locale change.
  • Diagnostic dependencies are hard-linked from a completed clean install with identical lock; no install over shared inodes. Node 24.20.0 / npm 11.15.0 / Vitest 5.0.3.

Admission limits

Related to #15306. Draft / HOLD. The remote release base advanced to cc84e9426ac3e8d34e8dde8bb2e081305ae886d9; existing receipts do not certify that new candidate. Full Node, coverage, security, build/package/boot and current required CI remain necessary. No merge, bypass, ruleset activation or deployment was performed.

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Fechando esta PR para esvaziar a fila aberta. A branch fix/qg-locale-refresh-20261009 não é apagada. Se ainda precisar entrar, comente aqui que reabrimos.

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Reabrindo. O fechamento foi um engano; esta PR volta para a fila de merge. A branch continua no lugar.

Reconcile PR #16059 with release 94159e1; the runtime ordering fix is already present, while the regression and fixture cleanup remain useful.
@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Reconciled this original PR with release 94159e1b7536783aec456d4f1a1c02cf2b74403c in 8cae2158fec259b7f158c724c8bdaf843180b494.

The runtime ordering fix is already present in that release via #16420. The remaining useful change is the regression checking that the locale cookie, local storage, HTML language and text direction are persisted before router.refresh(), together with isolated mock/React-root cleanup. Added a scoped changelog fragment describing that actual residual instead of claiming a second runtime fix.

  • Actual Vitest UI collector: 5/5 PASS, zero skips; original assertions/timeouts preserved.
  • Scoped lint, formatting, normal hooks and post-hook two-file scope PASS.
  • Original worktrees, including the separate dirty locale worktree, were left untouched.

The PR remains draft and is not merge-admitted: required current-candidate CI and the release repair dependencies remain outstanding. No queue label or merge was applied.

Preserve current runtime implementation and rerun the actual UI collector: LocaleAutoDetect refresh 5/5 pass on release ad37e8f.
@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Relay continuation — scoped reconciliation, not merge acceptance

Thanks the locale-refresh contributors. Reconciled this original PR with pinned release ad37e8f8f51eb2d505f88a3139e76912cf9598e2 and published d0d26e347f6254e56fe7d3bd097f1ac934c087c9 through a normal fast-forward push. Original commits and contributor attribution are preserved.

5/5 tests PASS with the actual Vitest UI collector, including locale persistence before refresh. Production behavior already in the base is preserved.

Node 24.20.0 / npm 11.15.0; unchanged lockfile SHA-256 f2de65a4140bbe8f4f1ae78ea26e1ba06baa67850c297306d94e7b0793f7e3b4. Normal commit hooks ran. These are focused diagnostics, not the full current-candidate acceptance matrix. The release has advanced since the pinned comparison, and full mandatory checks must be refreshed before admission. No queue label, bypass, merge, closure or deployment was performed by this continuation.

@diegosouzapw
diegosouzapw marked this pull request as ready for review October 16, 2026 06:10
@diegosouzapw
diegosouzapw merged commit be1d878 into release/v3.8.52 Oct 16, 2026
45 of 48 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw deleted the fix/qg-locale-refresh-20261009 branch October 18, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant