Skip to content

feat(frontend): migrate react-router-dom v7 → react-router v8 - #494

Merged
enyineer merged 1 commit into
mainfrom
feat/react-router-v8
Jul 26, 2026
Merged

feat(frontend): migrate react-router-dom v7 → react-router v8#494
enyineer merged 1 commit into
mainfrom
feat/react-router-v8

Conversation

@enyineer

@enyineer enyineer commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Unblocks the Security (dependency graph) gate, which is currently failing on every PR (#489, #490, #491, #492, #493).

Why #493 (and everything else) was failing

pr-checks only runs on: pull_request, so main is never scanned and three fixable vulns accumulated on it invisibly. Every PR then inherits them. I verified with Trivy that #493 introduces nothing — it actually fixes tar.

Vuln Status
react-router 7.18.1 → 8.3.0 (HIGH) This PR. Fix exists only in 8.x; pickInMajorFix deliberately refuses major bumps, so it could never auto-resolve.
tar 7.5.20 → 7.5.21 (MEDIUM) Fixed by #493's lockfile refresh.
brace-expansion 5.0.7 → 5.0.8 (HIGH) Fix is quarantined by our own minimumReleaseAge = 3 days (published 07-23 11:39Z). Self-heals; the daily security-maintenance job will pick it up.

The advisory

GHSA-qwww-vcr4-c8h2"RSC Mode CSRF Bypass Allows Action Execution Before 400 Response". Checkstack runs a client-side SPA (<BrowserRouter>) and does not use RSC mode, so it was not exploitable here — but it kept the gate permanently red.

What changed

react-router-dom has no v8 (folded into react-router in v7), so this is a package swap, not a range bump:

  • 31 packagesreact-router@^8.3.0; 97 source files import from react-router.
  • Module Federation: host shared / optimizeDeps / dedupe move to react-router (singleton requiredVersion: ^8.0.0). Remotes never shared the router → remote contract unchanged.
  • syncpack unified-range group tracks react-router (preserving the single-range guarantee a past four-range regression motivated).
  • Docs code examples + regenerated docs index. The historical four-range note in dependency-linter.md is left intact as history.

Every API we use — BrowserRouter, MemoryRouter, Routes, Route, Link, NavLink, useLocation, useNavigate, useParams, useSearchParams — is exported by v8 unchanged, so no routing logic changed beyond the import specifier. v8 requires React >= 19.2.7, already pinned.

Verification

  • typecheck ✓ · lint ✓ · deps:check (syncpack) ✓ · docs-index ✓
  • Full unit suite: 10,256 pass / 0 fail
  • E2E (Playwright): 185 passed — the meaningful check for a router change. Covers route guards ("admin-only route renders the Access Denied gate"), deep links ("a deep-linked docs page resolves in-app"), SPA-vs-docs routing ("an unknown /checkstack/ path returns the docs 404, not the SPA shell"), sidebar NavLink targets, and the MF remote loading on the public status page.
  • Builds: Module Federation host ✓ and build:public-remotes (announcement remote) ✓
  • Trivy rescan: react-router is gone from the fixable set

Not run: the CHECKSTACK_IT integration lane — this change is frontend-only (the sole backend edit is a code comment), so it is unaffected.

One cosmetic build warning: IMPORT_IS_UNDEFINED for default on the MF prebuild shim — v8 has no default export and the shim's ?? namespace fallback covers it. No source file default-imports the router (verified).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hccsjzvqr6xfhGicNBjRgB

Resolves GHSA-qwww-vcr4-c8h2 (HIGH), which kept the dependency-graph security
gate red on every PR. The advisory is an RSC-mode CSRF bypass; Checkstack runs a
client-side SPA (<BrowserRouter>) and never uses RSC mode, so it was not
exploitable here - but the fix ships only in the 8.x line, which the security
auto-remediation deliberately refuses to reach (no major bumps), so it could
never self-resolve.

react-router-dom has no v8 (it was folded into react-router in v7), so this is a
package swap, not a range bump:

- 31 packages depend on react-router@^8.3.0 instead of react-router-dom@^7.16.0;
  97 source files import from "react-router".
- Module Federation host share + optimizeDeps + dedupe move to react-router
  (shared singleton requiredVersion ^8.0.0). Remotes never shared the router, so
  the remote contract is unchanged.
- syncpack's unified-range group tracks react-router.
- Docs code examples + the generated docs index updated.

Every API Checkstack uses (BrowserRouter, MemoryRouter, Routes, Route, Link,
NavLink, useLocation, useNavigate, useParams, useSearchParams) is exported by v8
unchanged, so no routing logic changed beyond the import specifier. v8 needs
React >= 19.2.7, already pinned.

Verified: typecheck, lint, syncpack, full unit suite (10,256 pass / 0 fail),
frontend MF build, and a Trivy rescan confirming react-router is gone from the
fixable set.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hccsjzvqr6xfhGicNBjRgB
@changeset-bot

changeset-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 966e51e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 68 packages
Name Type
@checkstack/about-frontend Minor
@checkstack/ai-frontend Minor
@checkstack/announcement-frontend Minor
@checkstack/anomaly-frontend Minor
@checkstack/api-docs-frontend Minor
@checkstack/auth-frontend Minor
@checkstack/automation-frontend Minor
@checkstack/catalog-frontend Minor
@checkstack/command-frontend Minor
@checkstack/dashboard-frontend Minor
@checkstack/dependency-frontend Minor
@checkstack/frontend Minor
@checkstack/gitops-frontend Minor
@checkstack/healthcheck-frontend Minor
@checkstack/incident-frontend Minor
@checkstack/infrastructure-frontend Minor
@checkstack/integration-frontend Minor
@checkstack/logstream-frontend Minor
@checkstack/maintenance-frontend Minor
@checkstack/metricstream-frontend Minor
@checkstack/notification-frontend Minor
@checkstack/pluginmanager-frontend Minor
@checkstack/queue-frontend Minor
@checkstack/satellite-frontend Minor
@checkstack/script-packages-frontend Minor
@checkstack/secrets-frontend Minor
@checkstack/slo-frontend Minor
@checkstack/status-page-frontend Minor
@checkstack/telemetry-frontend Minor
@checkstack/tracestream-frontend Minor
@checkstack/ui Minor
@checkstack/ai-backend Patch
@checkstack/theme-frontend Patch
@checkstack/tips-frontend Patch
@checkstack/cache-frontend Patch
@checkstack/anomaly-backend Patch
@checkstack/automation-backend Patch
@checkstack/catalog-backend Patch
@checkstack/dependency-backend Patch
@checkstack/healthcheck-backend Patch
@checkstack/incident-backend Patch
@checkstack/logstream-backend Patch
@checkstack/maintenance-backend Patch
@checkstack/metricstream-backend Patch
@checkstack/screenshots Patch
@checkstack/slo-backend Patch
@checkstack/tracestream-backend Patch
@checkstack/notification-backend Patch
@checkstack/satellite-backend Patch
@checkstack/integration-jira-backend Patch
@checkstack/integration-script-backend Patch
@checkstack/integration-teams-backend Patch
@checkstack/integration-webex-backend Patch
@checkstack/integration-webhook-backend Patch
@checkstack/status-page-backend Patch
@checkstack/notification-backstage-backend Patch
@checkstack/notification-discord-backend Patch
@checkstack/notification-gotify-backend Patch
@checkstack/notification-pushover-backend Patch
@checkstack/notification-slack-backend Patch
@checkstack/notification-smtp-backend Patch
@checkstack/notification-teams-backend Patch
@checkstack/notification-telegram-backend Patch
@checkstack/notification-webex-backend Patch
@checkstack/notification-webhook-backend Patch
@checkstack/telemetry-backend Patch
@checkstack/announcement-backend Patch
@checkstack/k8s-events-backend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

📦 Changeset Coverage Incomplete

The following packages have code changes but are not included in any changeset:

  • @checkstack/backend

⚠️ Please add a changeset entry for each of the listed packages before merging.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR Checks Failed

Check Status
Typecheck ✅ Passed
Lint ✅ Passed
Deps ✅ Passed
Test ✅ Passed
Integration ✅ Passed
Security (deps) ❌ Failed
Security (container) ✅ Passed
E2E ✅ Passed
❌ Security Audit Failures (dependency graph)
🔎 Security Audit (dependency graph, incl. devDependencies)

❌ Fixable vulnerabilities (2) — an upgrade path exists, so these fail the build:
  [MEDIUM] tar 7.5.20 -> fixed in 7.5.21  (GHSA-r292-9mhp-454m)
  [HIGH] brace-expansion 5.0.7 -> fixed in 5.0.8  (CVE-2026-14257)

⚠️  Known unfixed vulnerabilities (0) — surfaced, not gated:
  (none)

How to fix: This gate scans the whole dependency graph (incl. devDependencies) and fails only on findings with an upgrade path (a fixed version exists); unfixed findings are warnings, not gated. Run bun run audit:security locally to reproduce. Bump the affected direct dependency, or for a transitive package add a documented entry to security/managed-overrides.json plus matching overrides/resolutions in package.json (then bun install). Re-run bun run audit:overrides:check to confirm the override is consistent.

@enyineer The above code quality issues were found in this PR. Please fix them before merging.

@enyineer
enyineer merged commit 56e5375 into main Jul 26, 2026
15 of 17 checks passed
@enyineer
enyineer deleted the feat/react-router-v8 branch July 26, 2026 02:32
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