[codex] Migrate website SSG to React Router#99
Merged
Conversation
The React Router migration's boilerplate entry.client.tsx wrapped the app
in <React.StrictMode>, which the prior vite-react-ssg setup never did. In
dev, StrictMode double-invokes mount: dockview's onReady fires and
use-dockview-ready.ts destructively consumes initialPaneIds, then StrictMode
disposes and recreates dockview. The second onReady no longer sees the
'tut-main' pane id and generates a random one instead, so
PlaygroundDesktop.handleApiReady's addPanel({ referencePanel: 'tut-main' })
throws "referencePanel 'tut-main' does not exist" and the page crashes.
Production builds don't double-invoke, so this was a dev-only crash, but it
makes the desktop playground unusable under `react-router dev`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
876a414
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://50b9dcc9.mouseterm.pages.dev |
| Branch Preview URL: | https://react-router-ssg.mouseterm.pages.dev |
dormouse-bot
approved these changes
May 27, 2026
Member
Author
|
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
Migrate the website static build from
vite-react-ssgto React Router Framework Mode withssr: false, including React Router route modules, client/server entries, and the build flattening step needed for Cloudflare Pages.The branch also keeps the changelog filter route client-side:
/changelog/after/*is rewritten to React Router's generated SPA fallback so the browser URL is preserved without generating HTML for every release version.Impact
react-router buildand prerender the stable static routes.Validation
pnpm --filter dormouse-website buildpnpm --filter dormouse-website testdist/_redirectspoints/changelog/after/*at__spa-fallback.html.dist/changelogonly contains the stable changelog HTML, not per-version filter pages.