Skip to content

refactor(pages): extract response stage - #3145

Draft
james-elicx wants to merge 11 commits into
codex/cdn-v2-stage-cacheabilityfrom
codex/cdn-v2-pages-response-stage
Draft

refactor(pages): extract response stage#3145
james-elicx wants to merge 11 commits into
codex/cdn-v2-stage-cacheabilityfrom
codex/cdn-v2-pages-response-stage

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 2, 2026

Copy link
Copy Markdown
Member

Part 5 of 16 in the staged CDN adapter stack. Depends on #3144.

Summary

  • extracts the Pages response renderer into an importable typed stage
  • keeps API routes, page rendering, preview state, headers, and response policy in Pages-owned modules
  • defines the Pages stage wire contract without selecting a transport
  • bypasses shared response dispatch for tokenized WebSocket upgrades

Validation

  • focused Pages API, page-handler, response-stage, route-data, and worker-stage tests
  • cumulative exact-tip changed-test sweep: 3,461 passed, 2 skipped
  • full vp check and vinext package build

Review size

  • Implementation: +609 / -48 LOC
  • Tests and fixtures: +1166 / -3 LOC
  • Other (docs, config, lockfile): +0 / -0 LOC
  • 15 changed files

Measured against codex/cdn-v2-stage-cacheability after rebasing onto main@a6931c0.

@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3145
npm i https://pkg.pr.new/create-vinext-app@3145
npm i https://pkg.pr.new/@vinext/types@3145
npm i https://pkg.pr.new/vinext@3145

commit: 0acbae4

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 0acbae4 against base d05a2c4 using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ -0.0%
Client entry size (gzip) vinext 129.6 KB 129.6 KB ⚫ +0.0%
Dev server cold start vinext 3.11 s 3.11 s ⚫ +0.1%
Production build time vinext 3.32 s 3.31 s ⚫ -0.3%
RSC entry closure size (gzip) vinext 119.8 KB 119.8 KB ⚫ +0.0%
Server bundle size (gzip) vinext 203.4 KB 203.4 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch from 8e3651f to ddc4d97 Compare September 2, 2026 09:43
@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch from ddc4d97 to 4a02535 Compare September 2, 2026 12:47
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
static-export preview production
web preview production

@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch 2 times, most recently from a2798e6 to 2fe343d Compare September 2, 2026 14:16
@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch from 2fe343d to a2108b1 Compare September 2, 2026 15:11
@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch 2 times, most recently from ce0683e to f4cc5f6 Compare September 2, 2026 16:36
@james-elicx
james-elicx force-pushed the codex/cdn-v2-pages-response-stage branch from 2356e96 to 0acbae4 Compare September 2, 2026 17:12
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