Skip to content

Frontend major dependency upgrades (post-launch) #14

Description

@hseshadr

Goal

Post-launch, bring the frontend's major dependencies up to current majors. Each upgrade below must be landed with the frontend gate (Biome + tsc + Vitest) and the C1 Playwright e2e re-validated green, and the real /screen demo driven in a browser on localhost (secure context — required for WebCrypto signature verify + OPFS).

Upgrades

  • React 18 → 19 — bump react and react-dom to 19, and @types/react / @types/react-dom to 19. Review the 19 migration notes (ref-as-prop, removed legacy APIs, act changes) for the app and the @amlfilter/browser package.
  • React Router 6 → 7breaking: the ~8 <Route element={...}> definitions in frontend/app/src/App.tsx need rewriting to the v7 routing API. Verify every route (notably /screen and the admin routes) still resolves and renders after the migration.
  • Vite → latest major — re-check the build config, the es-target (the demo previously crashed on an es2020 model-load regression, so validate the in-tab MiniLM load specifically), and the dev-server/preview flow.
  • Vitest → latest major — align with the Vite bump; re-run the parity tests (crypto.test.ts, normalize.test.ts, scoring.parity.test.ts).
  • TypeScript → latest — fix any new strict-mode diagnostics; keep no any / no default exports.

Validation per upgrade (non-negotiable)

For each PR:

  1. pnpm -r run build + pnpm -r run lint green.
  2. tsc clean, Vitest green (incl. the Python↔TS scoring parity golden).
  3. C1 Playwright e2e (frontend/apppnpm test:e2e:c1) green — and it must cover the real committed demo bundle (backend/examples/catalog) against the pinned frontend/app/public/public.key, not just a synthetic test catalog.
  4. Drive /screen in a real browser on http://localhost:<port>: boot, type a query (e.g. Ivan Fakovich), read the rendered dossier, confirm a clean console.

Prefer landing these as separate PRs (one major per PR) so a regression is easy to bisect; React + React Router may need to land together if their type/runtime contracts interlock.

Note: dependencies label was requested but does not exist in this repo; applied enhancement only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions