Skip to content

Remove render server#94602

Draft
timneutkens wants to merge 1 commit into
codex/typed-dev-server-statefrom
codex/remove-render-server
Draft

Remove render server#94602
timneutkens wants to merge 1 commit into
codex/typed-dev-server-statefrom
codex/remove-render-server

Conversation

@timneutkens

@timneutkens timneutkens commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What?

Remove the obsolete render-server.ts lifecycle adapter and instantiate NextServer directly from router-server.ts.

Why?

The adapter no longer provides a meaningful process boundary. It duplicates server initialization and keeps directory-keyed lifecycle state that can instead be owned directly by each router-server initialization.

How?

Move ServerInitResult into shared server types, capture the prepared NextServer and request handler in router-server.ts, pass explicit dev lifecycle callbacks into bundler setup, route requests through the prepared handler, import sandbox cache-clearing helpers directly from their context module, and remove the obsolete render-worker compatibility environment variable.

Verification

  • pnpm prettier --with-node-modules --ignore-path .prettierignore --write <changed files>
  • npx eslint --config eslint.config.mjs --fix <changed files>
  • pnpm --filter=next types
  • pnpm --filter=next build
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-turbo test/e2e/custom-server/custom-server.test.ts
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-webpack test/e2e/custom-server/custom-server.test.ts
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/e2e/custom-server/custom-server.test.ts
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-turbo test/development/app-hmr/hmr-env.test.ts
  • NEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-webpack test/development/app-hmr/hmr-env.test.ts

@timneutkens timneutkens changed the title codex/remove render server Remove render server adapter Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: f6e8e65 | About building and testing Next.js

pnpm test-dev test/development/app-dir/hmr-deleted-page/hmr-deleted-page.test.ts (job)

  • hmr-deleted-page > should not show errors for a deleted page (DD)
Expand output

● hmr-deleted-page › should not show errors for a deleted page

Expected no visible Redbox but found one
header: ./app/page/page.tsx:1:1
Module not found: Can't resolve './style.css'
> 1 | import './style.css'
    | ^^^^^^^^^^^^^^^^^^^^
  2 |
  3 | import { Test } from './test'
  4 |



https://nextjs.org/docs/messages/module-not-found
Show More
Runtime Error
description: ./app/page/page.tsx:1:1
Module not found: Can't resolve './style.css'
> 1 | import './style.css'
    | ^^^^^^^^^^^^^^^^^^^^
  2 |
  3 | import { Test } from './test'
  4 |



https://nextjs.org/docs/messages/module-not-found
source: null

  25 |     await waitForHydration(browser)
  26 |
> 27 |     await waitForNoRedbox(browser)
     |     ^
  28 |     expect(await browser.elementByCss('h1').text()).toBe('404')
  29 |   })
  30 | })

  at Object.<anonymous> (development/app-dir/hmr-deleted-page/hmr-deleted-page.test.ts:27:5)

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Stats cancelled

Commit: f6e8e65
View workflow run

@timneutkens timneutkens changed the title Remove render server adapter Remove render server Jun 9, 2026
@timneutkens timneutkens force-pushed the codex/remove-render-server branch from 5111525 to 2e1089d Compare June 9, 2026 15:27
@timneutkens timneutkens force-pushed the codex/remove-render-server branch from 2e1089d to f6e8e65 Compare June 9, 2026 16:36
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