Repository navigation
perf(frontend): load locale catalogs in parallel and overlap setup check (WI-2150) - #522
Conversation
|
Size Change: 0 B 🆕 Total Size: 0 B |
stefan-ernst
left a comment
There was a problem hiding this comment.
Review fixes
- Fixed startup localization and document-title updates being gated on successful setup status. Locale/branding readiness now updates the recovery UI even while setup is pending or after it fails; setup and auth still wait for the required bootstrap results.
- Fixed an early-retry race: branding callers now await the existing request instead of completing immediately with default branding.
- Corrected two existing German timer strings that violated the catalog's required “Vorgang” terminology, found by the broader locale suite.
- Extended companion coverage in https://github.com/Windshiftapp/core-tests-internal/pull/57 for both setup/locale completion orders, the setup wizard readiness boundary, branding retries, and English fallback keys when the selected catalog finishes first.
Validation
Node 24.18.0, using the repository's Node wrapper and overlay runner.
Regression reproduction before fixes:
../core-tests/run-overlay-script.sh . scripts/run-frontend-tests.sh src/App.test.js
../core-tests/run-overlay-script.sh . scripts/run-frontend-tests.sh src/lib/stores/brand.spec.jsThe first run failed both new localization cases (English loader/recovery text). The second failed the new branding retry case (Windshift instead of Acme). The initial broader run also caught the two German terminology violations. Full logs are retained locally under pr-522/ (app-regression-before.log, brand-regression-before.log, and frontend-broader.log).
Final broader run, from core:
../core-tests/run-overlay-script.sh . scripts/run-frontend-tests.sh src/App.test.js src/lib/stores/i18n-loading.test.js src/lib/stores/i18n-utils.spec.js src/lib/stores/i18n.svelte.test.js src/lib/locales src/lib/services/authenticatedShellBootstrap.test.js src/lib/services/authenticatedShellUI.test.js src/lib/services/appShellHandlers.test.js src/lib/services/appShellHandlers.spec.js src/lib/stores/brand.spec.js14 files / 175 tests passed.
From core/frontend:
../../core-tests/scripts/run-with-core-node.sh .. npm run check
../../core-tests/scripts/run-with-core-node.sh .. npm run typecheck
../../core-tests/scripts/run-with-core-node.sh .. npm run build:appAll passed. Type-check: zero errors, three existing warnings. Production build and entry-asset guard pass. Pre-commit checks, including the deprecated-v1, frontend-v2-field and inline-style guards, pass.
From core-tests:
scripts/run-with-core-node.sh ../core ../core/frontend/node_modules/.bin/biome check --write --vcs-enabled=false --config-path=../core/frontend/biome.json frontend/src/App.test.js frontend/src/lib/stores/i18n-loading.test.js frontend/src/lib/stores/brand.spec.jsPassed. The initial cross-repository Biome invocation crashed on its VCS root handling; running from core-tests with VCS discovery disabled resolved the tooling error.
Full frontend, Go/PostgreSQL, and browser suites were not run locally. Focused startup, shell bootstrap, branding and locale coverage was used for these changes.
Summary
/setup/statuscheck alongside locale and branding instead of after both resolve.WI-2150.
Behavior
A non-English cold start now issues the
enfallback chunk and the selected locale chunk in the same tick, and the setup-status request begins while locale and branding are still loading. Authorization, retry, deadline, capability-gated navigation and translation semantics are unchanged. The setup wizard is still shown only after i18n is ready, so its copy renders translated.Measurement
Built with
bun --bun run build:app. Locale chunks:en315,870 B raw / 94,908 B gzip;de428,475 B raw / 123,319 B gzip.en→ await → requestde→ await → apply locale. Two serial round trips on the critical path.enanddetogether → await both → apply locale. One round trip./setup/statuspreviously started only after locale and branding resolved; it now overlaps them.Unique startup byte totals are unchanged (the same two catalogs are requested); concurrency changes the waterfall, not the payloads. Namespace splitting of the aggregated catalogs is a larger change to the synchronous
t()surface and is deferred (recorded on WI-2150).Validation
Companion tests: merged in https://github.com/Windshiftapp/core-tests-internal/pull/57. Review fixes and final validation (175 tests) are documented in the review below.
From
core/:VITEST_RUNTIME=bun ../core-tests/run-overlay-script.sh . scripts/run-frontend-tests.sh src/lib/stores/i18n-loading.test.js src/lib/stores/i18n-utils.spec.js src/lib/stores/i18n.svelte.test.js src/lib/locales/required-locale-coverage.test.js src/lib/locales/createLocale.test.js src/App.test.jsi18n-loading.test.jsfails before the fix (selected:startis never recorded while the fallback is pending) and passes after.App.test.jsstalled-locale and new overlap tests fail before the fix and pass after.From
frontend/:bun --bun run typecheck: 0 errors, 3 pre-existing warnings.bun --bun run build:app: passes, entry-asset check passes.bun --bun x biome check src/lib/stores/i18n.svelte.js: passes.Go/PostgreSQL and browser suites were not run: no backend, execution, schema or browser-test behavior changed.