Skip to content

fix(docs): canonicalize exported HTML routes - #241

Closed
scttbnsn wants to merge 1 commit into
dev/v0.9from
fix/web-hydration-418
Closed

scttbnsn wants to merge 1 commit into
dev/v0.9from
fix/web-hydration-418

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

What

  • redirect exported .html URLs to the clean routes exposed by Vercel overrides
  • make the local Lighthouse server model that canonical redirect
  • fail the docs Lighthouse lane on non-network browser console errors

Why

The reported React 418 came from loading static export files directly. Fumadocs rendered /docs/installation on the server, while the client saw /docs/installation.html. That made the page-tree path disappear and let the TOC observer select Homebrew before the nested popover hydrated, changing Native Installation/empty to On this page/Homebrew. Canonical paths do not reproduce the mismatch.

Verification

  • negative control: the production console audit failed with React error 418 before the redirect
  • negative control: the build-output regression failed before redirect routes were emitted
  • npm run test:web (57 tests)
  • npm run lint
  • npm run build
  • npm run budget:web
  • npm run lighthouse:marketing
  • pre-push release contract, GoReleaser snapshot, Go lint, Qlty, race tests, govulncheck, and all fuzz smoke targets
  • docs Lighthouse reaches final budget verification with a clean browser-console audit, then fails the existing total-byte ceiling locally: median 2,420,365 > 1,545,000; script bytes remain under their cap

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deployment failed for project getportwing with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/codeswhat?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 55 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 970a71ed-d5fd-44dd-bc3e-1e189d382724

📥 Commits

Reviewing files that changed from the base of the PR and between 7317422 and 5a75375.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (5)
  • lighthouse/docs.cjs
  • scripts/lighthouse-budget.mjs
  • scripts/lighthouse-budget.test.mjs
  • website/scripts/security-headers.mjs
  • website/scripts/security-headers.test.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@scttbnsn

Copy link
Copy Markdown
Contributor Author

Closing this because the reported production bug is refuted by the original artifacts and the exact old deployment. Every saved #418 stack from the 4/25 sweep points to localhost:4321 or localhost:4201, and the saved page warnings identify direct generated-file URLs such as /docs/getting-started.html. The stack chunk, 0pbodm90epvpk.js, is the same chunk served by the old Vercel deployment, so this tests the same build. Authenticated vercel curl against getportwing-c2e05aqii-codeswhat.vercel.app returns 200 for /docs/getting-started and 404 with x-vercel-error: NOT_FOUND for /docs/getting-started.html. A fresh mobile Lighthouse errors-in-console audit of /docs/getting-started through that exact deployment returned score 1 with zero items (412x823 Android emulation). Current production is clean too. The mismatch only occurs when a generic local static server exposes Next export implementation files as public .html URLs that Vercel does not route. This PR also made the Lighthouse fallback answer RSC prefetches with full HTML, which caused the byte-budget regression, so there is no valid code change to keep.

@scttbnsn scttbnsn closed this Aug 29, 2026
@scttbnsn
scttbnsn deleted the fix/web-hydration-418 branch August 29, 2026 20:37
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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