fix: serve prerendered data for trailing slash routes - #1385
Conversation
Copy prerendered route data to the trailing-slash paths requested by React Router so search results can navigate without decoding the HTML fallback.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
guide | 3d7a445 | Commit Preview URL Branch Preview URL |
Sep 29 2026, 04:36 PM |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
Lighthouse baselineCompared with target branch
Download the full Lighthouse reports and baseline Commit |
Context
Search results use the site's canonical trailing-slash URLs. React Router 8 requests
/page/_.datawhen navigating to those URLs, but prerendering currently emits only/page.data. Cloudflare serves HTML for the missing data path, causing the turbo-stream decode error.Changes
Verification
fnm exec --using 26.3.0 yarn build:vitebuild/clientandout.200withapplication/octet-stream, while the page URL still redirects to its trailing-slash form.Fixes #1382
This PR carries the same commit as #1383 on a branch in the
rescript-langrepository and can supersede it.