Skip to content

chore: move the visual reporter from Remix 2 to React Router 7 - #1292

Closed
plum117 wants to merge 2 commits into
webdriverio:mainfrom
plum117:chore/reporter-react-router-7
Closed

plum117 wants to merge 2 commits into
webdriverio:mainfrom
plum117:chore/reporter-react-router-7

Conversation

@plum117

@plum117 plum117 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Step 2 of the visual reporter upgrade: move the report app from Remix 2 to React Router 7 (framework mode).

Depends on #1291 (Vite 6). Its commit is included here; after #1291 is merged, this PR shows only the React Router commit.

Remix 2 is in maintenance and supports only React 18, Vite 5/6 and TypeScript 5 (we use TypeScript 6 since #1283, which gave a peer warning). React Router 7 is its official successor and supports React 18/19, Vite 5–8 and TypeScript 5/6, so it unblocks React 19 (#1264) and Vite 8 (#1263).

All these packages are development dependencies of the reporter: they build the static report UI (build/client), which the CLI copies and serves. Users do not install them.

Changes

  • Packages: @remix-run/dev, node, react, serve → react-router, @react-router/dev, @react-router/node (7.18.4).
  • react-router.config.ts: ssr: false (static single-page app) and the GitHub Pages basename, which were plugin options before.
  • app/routes.ts: the single index route (routes/_index.tsx).
  • entry.client.tsx: RemixBrowser → HydratedRouter. entry.server.tsx: RemixServer → ServerRouter, abortDelay → export const streamTimeout.
  • root.tsx: imports from react-router. tsconfig.json: @react-router/node types. vite.config.ts: the reactRouter() plugin.
  • Scripts: build:report → react-router build; dev:remix → dev:app (react-router dev).
  • start → sirv build/client --single, like the CLI. The old remix-serve ./build/server/index.js could not work: a single-page app build has no build/server.
  • .gitignore: /.react-router (type generation folder). README: "Created with React Router".

Test

  • The built UI is pixel-identical to the Remix build: the demo report served and opened in headless Chrome (WebdriverIO), screenshots of the home view and of the comparison overlay: 0 different pixels.
  • GitHub Pages build (GITHUB_PAGES=/visual-testing/, served under /visual-testing/): renders the same report, 0 different pixels.
  • pnpm start now serves the report (HTTP 200).
  • Reporter typecheck, Oxlint, pnpm test (1077 unit tests), frozen install: pass.
  • pnpm peers check: the Remix TypeScript peer warnings are gone. The remaining TypeScript one comes from tsconfck (used by vite-tsconfig-paths 5), for step 4.

The build shows React Router "future flag" notes about v8; they are only information for a later move to React Router 8.

No changeset: development dependencies only, and the built UI does not change.

🤖 Generated with Claude Code

dprevost-LMI and others added 2 commits October 8, 2026 20:41
Remix 2 supports Vite 5 and 6 (peer ^5.1.0 || ^6.0.0), so Vite 6 is the
first step before the move to React Router. The built report is
pixel-identical to the Vite 5 build (home view and comparison overlay of
the demo report), and the GitHub Pages build keeps its base path.

Replaces Dependabot webdriverio#1267, which did not update pnpm-lock.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remix 2 is in maintenance and supports only React 18, Vite 5/6 and
TypeScript 5. React Router 7 is its successor (framework mode) and
supports React 18/19, Vite 5 to 8 and TypeScript 5/6.

- @remix-run/* -> react-router, @react-router/dev, @react-router/node.
- react-router.config.ts (ssr: false, the GitHub Pages basename) and
  app/routes.ts (the single index route).
- Entries: HydratedRouter / ServerRouter; abortDelay -> streamTimeout.
- Scripts: react-router build / dev; start serves build/client with
  sirv, like the CLI (remix-serve needed a server build, which a
  single-page app does not have, so start did not work).

The built report is pixel-identical to the Remix build (home view and
comparison overlay of the demo report), also under the GitHub Pages
base path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3bd39f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@plum117
plum117 marked this pull request as ready for review October 9, 2026 01:27
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Moves the visual reporter from Remix 2 to React Router 7 while keeping it a static single-page app.

  • The visual reporter now builds and runs on React Router 7.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Config["React Router config<br/>ssr: false"] --> Build["react-router build"]
  Routes["Index route"] --> Build
  Vite["Vite base from GITHUB_PAGES"] --> Build
  Build --> Client["build/client"]
  Client --> CLI["CLI copies report files"]
  Client --> Pages["GitHub Pages"]
  Client --> Start["sirv --single"]
  CLI --> Browser["Browser loads HydratedRouter"]
  Pages --> Browser
  Start --> Browser
Loading

Reviews (1) · Last reviewed commit: "chore: move the visual reporter from Rem..." · Reviewed by Greptile

@plum117

plum117 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Included in #1294, which was squash-merged with the whole stack.

@plum117 plum117 closed this Oct 9, 2026
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.

2 participants