feat: i18n, PWA offline mode, high-contrast theme & coverage CI gate (#1329, #1330, #1332, #1333) - #1595
Open
Hollujay wants to merge 4 commits into
Conversation
…the test suite - health.routes.ts: complete the failure-spike/lag degradation logic; add missing rpcPoolHealthy() import and fix the truncated checks object so the endpoint reports eventsProcessed/eventsFailed/lastErrorAt plus the granular database/indexer/redis/sorobanRpc breakdown - rpc-pool.ts: add synchronous rpcPoolHealthy() derived from circuit state so liveness probes never spend an RPC round-trip - indexerService.ts: absorb indexer.service.ts (admin control-plane helpers, previewReset/previewReplay, request-scoped replays via runExclusive) and replace inline dead-letter retries with the quarantineEvent flow; delete the now-duplicate indexer.service.ts - sorobanService.ts/event-worker: finish the Stellar SDK 17 migration (ScVal discriminated unions, TransactionEnvelope property arms, InvokeContractArgs) and migrate affected tests - rate limiter: wrap the req.ip fallback in ipKeyGenerator so IPv6 clients are subnet-bucketed, clearing ERR_ERL_KEY_GEN_IPV6 - admin-dead-letter.test.ts: sign test JWTs with the iss/aud claims verifyJwt requires, matching admin-metrics.test.ts (fixes 16 x 401) - schema.prisma formatting pass + idempotent dead-letter migration; lockfile reflects the intentional stellar-sdk 17 / vitest 3 upgrade Full suite: 57 files, 556 passed, 0 failed; tsc --noEmit clean. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
Summary
Implements four frontend / CI issues in one PR.
Closes #1329
Closes #1330
Closes #1332
Closes #1333
#1329 – Multi-language i18n
frontend/src/locales/foren(default),es,fr,pt,zh,ja, covering Navbar, Dashboard, Stream Wizard, Settings, theme and offline strings.I18nProvider/useI18n()(context/i18n-provider.tsx): stored preference (flowfi-locale) →navigator.languagesdetection → English. It sets<html lang>and exposest()with{var}interpolation plus locale-awareformatNumber,formatCurrencyandformatDatebuilt onIntl.LanguageSelectoradded to the Navbar (desktop and mobile menu) and Settings. The choice persists in localStorage.t(). The Dashboard and Stream Wizard keys exist in every dictionary, but those screens' own copy is not migrated in this PR.#1330 – PWA & offline read-only mode
public/manifest.webmanifest(standalone, theme colours, 192/512 and maskable icons), plus icons, and manifest, viewport and Apple metadata inlayout.tsx.public/sw.js: stale-while-revalidate for static assets, fonts and API GETs; navigation falls back to cached pages when offline. SSE and auth requests are never cached. It is registered in production builds only.useNetworkStatusandOfflineBanner: a non-intrusive banner reading "Offline (Last synced X mins ago)". The sync time comes from successful service-worker API responses and reconnects.#1332 – Theme architecture & high-contrast
globals.cssnow has semantic tokens (--color-bg-canvas,--color-bg-surface,--color-border-subtle,--color-text-{primary,secondary,muted},--color-brand-{primary,accent}). The legacy variables now read from them.data-theme="high-contrast": black canvas, white text and borders, yellow (#ffff00) focus ring. Every text/background/border token pair is at least 15:1 on the black canvas (WCAG AAA needs 7:1). Hard-coded slate/zinc/white-alpha utility classes are remapped onto the tokens in this theme.classanddata-theme.ModeToggleis a System / Light / Dark / High-contrast radio group, and Settings offers the same four options.#1333 – Coverage enforcement & CI gate
lcov,jsonandjson-summary. The frontend previously did not writelcov.info, which CI uploads.vitest-coverage-report-action, changed files only). It is non-blocking so fork PRs with read-only tokens don't fail.codecov.yml:threshold: 1%on the backend, frontend and contracts project statuses, so a PR fails if coverage drops by more than 1%. It also adds flag carryforward and a per-file comment layout.Testing
i18n.test.tsx(dictionary key and placeholder parity across locales, detection, persistence, formatting),theme.test.tsx,offline.test.tsx. All pass.tscand ESLint report nothing in the files added or changed here.mainin my environment (stream-details-content,Navbar.test,TransactionTracker, and others). They are missingQueryClientProviderandjestglobals, and were not caused by this change.next buildalso stops at type errors in files this PR doesn't touch (dashboard-view.tsx,StreamCreationWizard.tsx,soroban.ts).