Skip to content

fix(server): serve generated pages at clean route URLs - #3544

Merged
kwakayama merged 2 commits into
mainfrom
fix/serve-clean-route-index
Aug 10, 2026
Merged

kwakayama merged 2 commits into
mainfrom
fix/serve-clean-route-index

Conversation

@kojiwakayama

Copy link
Copy Markdown
Contributor

Summary

  • resolve generated nested index.html pages for clean production URLs
  • keep exact static-file candidates ahead of directory-index fallbacks
  • add service-level and production HTTP regressions for /about and /about/

Root cause

veryfront build emits a nested route such as /about at dist/about/index.html. veryfront serve only probed dist/about, missed the generated page, and fell through to live SSR. For an MDX page that fallback produced hydration data pointing at raw page.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.ts
  • deno test --preload=src/testing/preload.ts --no-check --allow-all src/server/handlers/request/static.handler.test.ts
  • deno test --preload=src/testing/preload.ts --no-check --allow-all --unstable-worker-options --unstable-net tests/integration/server/production/static.test.ts
  • full pre-push formatting, lint, typecheck, and unit suite: 3,774 parallel tests plus isolated CWD suites passed
  • generated Node minimal template: scaffold, install, build, production serve, HTTP / and /about, browser / and /about, clean shutdown all passed

Follow-up journey

The full seven-template by three-runtime production journey will continue independently. Any additional defect will use its own test-first PR.

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.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ebb398b4-7e87-49e2-ae9e-e40089bd469d

📥 Commits

Reviewing files that changed from the base of the PR and between ff32887 and cff0e19.

📒 Files selected for processing (3)
  • src/server/services/static/static-file.service.test.ts
  • src/server/services/static/static-file.service.ts
  • tests/integration/server/production/static.test.ts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/server/services/static/static-file.service.ts Outdated
@kwakayama
kwakayama added this pull request to the merge queue Aug 10, 2026
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Merged via the queue into main with commit a69bfe8 Aug 10, 2026
33 checks passed
@kwakayama
kwakayama deleted the fix/serve-clean-route-index branch August 10, 2026 18:03
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: cff0e1990a

ℹ️ 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".

@kwakayama kwakayama mentioned this pull request Aug 10, 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