fix(server): serve generated pages at clean route URLs - #3544
Conversation
Production builds emit nested routes as directory index files. Resolve those files before falling through to live SSR so generated MDX pages do not enter an unsupported hydration path. Constraint: Static builds emit nested routes as dist/<route>/index.html. Rejected: Admit raw MDX through the client module endpoint | generated static pages should not fall through to live SSR. Confidence: high Scope-risk: narrow Directive: Keep exact static-file candidates ahead of directory-index fallbacks. Tested: StaticFileService unit test, production static integration test, generated Node minimal scaffold build/serve/browser journey. Not-tested: Full seven-template by three-runtime production matrix is pending.
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: addd06a337
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
index.htmlpages for clean production URLs/aboutand/about/Root cause
veryfront buildemits a nested route such as/aboutatdist/about/index.html.veryfront serveonly probeddist/about, missed the generated page, and fell through to live SSR. For an MDX page that fallback produced hydration data pointing at rawpage.mdx, and the browser module request returned 404.The module endpoint was not the correct fix. The generated static page should be served before SSR fallback.
Validation
deno test --preload=src/testing/preload.ts --no-check --allow-all src/server/services/static/static-file.service.test.tsdeno test --preload=src/testing/preload.ts --no-check --allow-all src/server/handlers/request/static.handler.test.tsdeno test --preload=src/testing/preload.ts --no-check --allow-all --unstable-worker-options --unstable-net tests/integration/server/production/static.test.ts/and/about, browser/and/about, clean shutdown all passedFollow-up journey
The full seven-template by three-runtime production journey will continue independently. Any additional defect will use its own test-first PR.