Skip to main content

Phase 1: Frontend Ecosystem Upgrade

Completed: March 29, 2026 | PRs: #465, #493, #495, #496, #501, #504, #506, #507, #508, #509, #510 Scope: equa-web repository | Branch: staging

Overview

Phase 1 modernized the equa-web frontend from a 2019-era toolchain to current ecosystem standards, unblocking the Turborepo monorepo consolidation and React 18 concurrent features. The upgrade was executed as 11 focused PRs over two sessions, each independently tested and merged.

Core Upgrades

React 16 to 18 (PR #506)

The single largest prerequisite for monorepo consolidation. Entry point migrated from ReactDOM.render() to createRoot() from react-dom/client.

TypeScript 3.7 to 5.3 (PR #465)

Enabled modern type features including template literal types, satisfies operator, and improved type narrowing.

Ecosystem Libraries (PR #508)

Build Toolchain (PR #465)

Not upgraded (intentionally):
  • react-router stays at v5 (v6 is a separate initiative)
  • react-pdf stays at v5 (v7 requires ESM, deferred to Phase 2 Vite migration)

Security Fixes

reCAPTCHA Test Key Removal (PR #493)

Removed Google’s hardcoded reCAPTCHA test site key (6LeIxAcT...) from webpack DefinePlugin fallback. CAPTCHA_SITE_KEY now requires explicit env var configuration.

Registration Crash Fix (PR #496)

Added early return guard in registration onSubmit when required fields are missing (Enter key could bypass the disabled button). Removed raw JS error stack trace rendering from AppErrorBoundary.

Logout Navigation Fix (PR #495)

Replaced withRouter (which doesn’t inject navigate) with withNavigation wrapper, fixing the blank page on logout.

Infrastructure

Docker Build Fix (PR #501)

Fixed Railway builds failing with node_modules/.bin/webpack: not found. Root cause: yarn install silently fails to fetch equa-patternlib without GH_PATTERNLIB_TOKEN, leaving a corrupt node_modules. Fix: switched to npx webpack, added post-install binary verification, documented GH_PATTERNLIB_TOKEN as required.

Azure Pipelines Removal (PR #507)

Removed azure-pipelines.yml — a legacy config from the Node 10 / Windows VM era targeting branches (mvp, mvp-staging, mvp-prod) that no longer exist.

CI Pipeline Rebuild (PR #507, #509)

Replaced the 2-job CI (E2E + regression) with a 5-stage tiered pipeline:

Bundle Optimization (PR #510)

Added granular async vendor chunk splitting and compressed the login background image:

Bug Fixes

Organization Create/Edit (PR #504)

Wrapped createOrganization + address creation in try-catch. Replaced forEach with async callback (fire-and-forget) with for...of (properly awaited sequential execution). Addresses were silently failing to save.

Verification

All PRs passed the same gate before merge:

What’s Next

Phase 1 PR 3 (Pending)

Deprecated pattern cleanup — 19 remaining issues from the Phase 1 QA audit including legacy lifecycle methods, class component migrations, and deprecated API usage.

Phase 2 (Planned)

  • Webpack to Vite migration
  • react-pdf v5 to v7 (ESM)
  • react-router v5 to v6
  • Turborepo monorepo consolidation with equa-patternlib-nextjs