Skip to content

experiment with removing action forwarding logic#90549

Draft
ztanner wants to merge 1 commit into
canaryfrom
02-25-remove_action_forwarding_logic
Draft

experiment with removing action forwarding logic#90549
ztanner wants to merge 1 commit into
canaryfrom
02-25-remove_action_forwarding_logic

Conversation

@ztanner

@ztanner ztanner commented Feb 26, 2026

Copy link
Copy Markdown
Member

No description provided.

ztanner commented Feb 26, 2026

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nextjs-bot

nextjs-bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: d72e46c | About building and testing Next.js

pnpm test-dev test/e2e/app-dir/actions/app-action.test.ts (job)

  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (node) (DD)
  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (edge) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (node) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (edge) (DD)
Expand output

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (node)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (edge)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should not error when a delayed action triggers a redirect (node)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

● app-dir action handling › should not error when a delayed action triggers a redirect (edge)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

pnpm test-start-turbo test/production/app-dir/actions-tree-shaking/reexport/reexport-edge.test.ts (turbopack) (job)

  • actions-tree-shaking - reexport > should keep all the action exports for namespace export case on client layer (DD)
Expand output

● actions-tree-shaking - reexport › should keep all the action exports for namespace export case on client layer

expect(received).toContain(expected) // indexOf

Expected substring: "action: test-2"
Received string:    "action: test-1
Error: Failed to find Server Action \"00cdf001d340311b3cd73f6924e8993bb77b16fa6b\". This request might be from an older or newer deployment.
Read more: https://nextjs.org/docs/messages/failed-to-find-server-action

  at dg (../.next/server/edge/chunks/ssr/[root-of-the-server]__e4a16e51._.js:11:3096)
  at dd (../.next/server/edge/chunks/ssr/[root-of-the-server]__e4a16e51._.js:10:15018)
  at gi (../.next/server/edge/chunks/ssr/[root-of-the-server]__e4a16e51._.js:52:30232)
  at async J (../.next/server/edge/chunks/ssr/_f1eb5d0d._.js:2:13213) {···
  }
  "
  at toContain (production/app-dir/actions-tree-shaking/reexport/reexport.test.ts:57:24)
  at fn (lib/next-test-utils.ts:831:20)
  at Object.<anonymous> (production/app-dir/actions-tree-shaking/reexport/reexport.test.ts:55:7)

pnpm test-dev-turbo test/e2e/app-dir/actions/app-action-node-middleware.test.ts (turbopack) (job)

  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (node) (DD)
  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (edge) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (node) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (edge) (DD)
Expand output

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (node)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (edge)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should not error when a delayed action triggers a redirect (node)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

● app-dir action handling › should not error when a delayed action triggers a redirect (edge)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

pnpm test-start test/e2e/app-dir/navigation/navigation.test.ts (job)

  • app dir - navigation > browser back to a revalidated page > should load the page (DD)
Expand output

● app dir - navigation › browser back to a revalidated page › should load the page

expect(received).toContain(expected) // indexOf

Expected substring: "Form Submitted."
Received string:    "This page crashed·
An error occurred while running this page.·
Reloading usually fixes this.·
Reload page
Go back"

  938 |
  939 |       await retry(async () => {
> 940 |         expect(await browser.elementByCss('body').text()).toContain(
      |                                                           ^
  941 |           'Form Submitted.'
  942 |         )
  943 |       })

  at toContain (e2e/app-dir/navigation/navigation.test.ts:940:59)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/navigation/navigation.test.ts:939:7)

pnpm test-start test/e2e/app-dir/dynamic-interception-route-revalidate/dynamic-interception-route-revalidate.test.ts (job)

  • dynamic-interception-route-revalidate > should refresh the dynamic intercepted route when the interception route is revalidated (DD)
Expand output

● dynamic-interception-route-revalidate › should refresh the dynamic intercepted route when the interception route is revalidated

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#result') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at elementByCss (e2e/app-dir/dynamic-interception-route-revalidate/dynamic-interception-route-revalidate.test.ts:28:36)
  at fn (lib/next-test-utils.ts:831:20)
  at Object.<anonymous> (e2e/app-dir/dynamic-interception-route-revalidate/dynamic-interception-route-revalidate.test.ts:27:5)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at text (e2e/app-dir/dynamic-interception-route-revalidate/dynamic-interception-route-revalidate.test.ts:28:60)
  at fn (lib/next-test-utils.ts:831:20)
  at Object.<anonymous> (e2e/app-dir/dynamic-interception-route-revalidate/dynamic-interception-route-revalidate.test.ts:27:5)

pnpm test-start test/e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts (job)

  • parallel-routes-revalidation > router.refresh (dynamic) - searchParams: false > should correctly refresh data for the intercepted route and previously active page slot (DD)
  • parallel-routes-revalidation > router.refresh (dynamic) - searchParams: false > should correctly refresh data for previously intercepted modal and active page slot (DD)
  • parallel-routes-revalidation > router.refresh (dynamic) - searchParams: true > should correctly refresh data for the intercepted route and previously active page slot (DD)
  • parallel-routes-revalidation > router.refresh (dynamic) - searchParams: true > should correctly refresh data for previously intercepted modal and active page slot (DD)
  • parallel-routes-revalidation > router.refresh (regular) - searchParams: false > should correctly refresh data for the intercepted route and previously active page slot (DD)
  • parallel-routes-revalidation > router.refresh (regular) - searchParams: false > should correctly refresh data for previously intercepted modal and active page slot (DD)
  • parallel-routes-revalidation > router.refresh (regular) - searchParams: true > should correctly refresh data for the intercepted route and previously active page slot (DD)
  • parallel-routes-revalidation > router.refresh (regular) - searchParams: true > should correctly refresh data for previously intercepted modal and active page slot (DD)
  • parallel-routes-revalidation > server action revalidation > handles refreshing when multiple parallel slots are active (DD)
Expand output

● parallel-routes-revalidation › router.refresh (regular) - searchParams: false › should correctly refresh data for the intercepted route and previously active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.4522770857507692"

  285 |             .elementById('modal-random')
  286 |             .text()
> 287 |           expect(initialRandomNumber).not.toBe(newRandomNumber)
      |                                           ^
  288 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
  289 |
  290 |           if (withSearchParams) {

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:287:43)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:280:9)

● parallel-routes-revalidation › router.refresh (regular) - searchParams: false › should correctly refresh data for previously intercepted modal and active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.7292565750102096"

  371 |             .elementById('other-page-random')
  372 |             .text()
> 373 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
      |                                                ^
  374 |           expect(initialOtherPageRandomNumber).not.toBe(
  375 |             newOtherPageRandomNumber
  376 |           )

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:373:48)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:365:9)

● parallel-routes-revalidation › router.refresh (regular) - searchParams: true › should correctly refresh data for the intercepted route and previously active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.020859130686831984"

  285 |             .elementById('modal-random')
  286 |             .text()
> 287 |           expect(initialRandomNumber).not.toBe(newRandomNumber)
      |                                           ^
  288 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
  289 |
  290 |           if (withSearchParams) {

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:287:43)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:280:9)

● parallel-routes-revalidation › router.refresh (regular) - searchParams: true › should correctly refresh data for previously intercepted modal and active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.9900088263565439"

  371 |             .elementById('other-page-random')
  372 |             .text()
> 373 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
      |                                                ^
  374 |           expect(initialOtherPageRandomNumber).not.toBe(
  375 |             newOtherPageRandomNumber
  376 |           )

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:373:48)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:365:9)

● parallel-routes-revalidation › router.refresh (dynamic) - searchParams: false › should correctly refresh data for the intercepted route and previously active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.18427366108801468"

  285 |             .elementById('modal-random')
  286 |             .text()
> 287 |           expect(initialRandomNumber).not.toBe(newRandomNumber)
      |                                           ^
  288 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
  289 |
  290 |           if (withSearchParams) {

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:287:43)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:280:9)

● parallel-routes-revalidation › router.refresh (dynamic) - searchParams: false › should correctly refresh data for previously intercepted modal and active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.048761978478368606"

  371 |             .elementById('other-page-random')
  372 |             .text()
> 373 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
      |                                                ^
  374 |           expect(initialOtherPageRandomNumber).not.toBe(
  375 |             newOtherPageRandomNumber
  376 |           )

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:373:48)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:365:9)

● parallel-routes-revalidation › router.refresh (dynamic) - searchParams: true › should correctly refresh data for the intercepted route and previously active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.37514467116102557"

  285 |             .elementById('modal-random')
  286 |             .text()
> 287 |           expect(initialRandomNumber).not.toBe(newRandomNumber)
      |                                           ^
  288 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
  289 |
  290 |           if (withSearchParams) {

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:287:43)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:280:9)

● parallel-routes-revalidation › router.refresh (dynamic) - searchParams: true › should correctly refresh data for previously intercepted modal and active page slot

expect(received).not.toBe(expected) // Object.is equality

Expected: not "0.6745133946451074"

  371 |             .elementById('other-page-random')
  372 |             .text()
> 373 |           expect(initialModalRandomNumber).not.toBe(newModalRandomNumber)
      |                                                ^
  374 |           expect(initialOtherPageRandomNumber).not.toBe(
  375 |             newOtherPageRandomNumber
  376 |           )

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:373:48)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:365:9)

● parallel-routes-revalidation › server action revalidation › handles refreshing when multiple parallel slots are active

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  412 |
  413 |         // But the drawer should still be open
> 414 |         expect(await browser.hasElementByCssSelector('#drawer')).toBe(true)
      |                                                                  ^
  415 |
  416 |         // And the drawer should have a new time
  417 |         expect(await browser.elementById('drawer-now').text()).not.toEqual(

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:414:66)
  at retry (lib/next-test-utils.ts:831:14)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:409:7)

pnpm test-start test/e2e/app-dir/actions-navigation/index.test.ts (job)

  • app-dir action handling > should handle actions correctly after navigation / redirection events (DD)
  • app-dir action handling > should handle actions correctly after following a relative link (DD)
Expand output

● app-dir action handling › should handle actions correctly after navigation / redirection events

expect(received).not.toContain(expected) // indexOf

Expected substring: not "Loading..."
Received string:        "SubmitLoading...
Server side rendered number: 0.8350625847186401"

  25 |     await waitFor(2000)
  26 |
> 27 |     expect(await browser.elementByCss('#form').text()).not.toContain(
     |                                                            ^
  28 |       'Loading...'
  29 |     )
  30 |

  at Object.toContain (e2e/app-dir/actions-navigation/index.test.ts:27:60)

● app-dir action handling › should handle actions correctly after following a relative link

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#result') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at elementById (e2e/app-dir/actions-navigation/index.test.ts:44:28)
  at fn (lib/next-test-utils.ts:831:20)
  at Object.<anonymous> (e2e/app-dir/actions-navigation/index.test.ts:43:5)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at text (e2e/app-dir/actions-navigation/index.test.ts:44:50)
  at fn (lib/next-test-utils.ts:831:20)
  at Object.<anonymous> (e2e/app-dir/actions-navigation/index.test.ts:43:5)

pnpm test-dev test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts (job)

  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (node) (DD)
  • app-dir action handling > should dispatch delayed action request to a route that contains the action handler (edge) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (node) (DD)
  • app-dir action handling > should not error when a delayed action triggers a redirect (edge) (DD)
Expand output

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (node)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should dispatch delayed action request to a route that contains the action handler (edge)

expect(received).toMatch(expected)

Expected pattern: /0\.\d+/
Received string:  "<null>"

  934 |         expect(
  935 |           await browser.elementById('delayed-action-result').text()
> 936 |         ).toMatch(
      |           ^
  937 |           // matches a Math.random() string
  938 |           /0\.\d+/
  939 |         )

  at toMatch (e2e/app-dir/actions/app-action.test.ts:936:11)
  at retry (lib/next-test-utils.ts:831:14)
  at e2e/app-dir/actions/app-action.test.ts:933:7

● app-dir action handling › should not error when a delayed action triggers a redirect (node)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

● app-dir action handling › should not error when a delayed action triggers a redirect (edge)

expect(received).toContain(expected) // indexOf

Expected value: undefined
Received array: [200, 303]

  989 |       // confirm a successful response code on the redirected action
  990 |       await retry(async () => {
> 991 |         expect([200, 303]).toContain(redirectResponseCode)
      |                            ^
  992 |       })
  993 |
  994 |       // delayed redirects should dispatch against the original route that has the action

  at toContain (e2e/app-dir/actions/app-action.test.ts:991:28)
  at fn (lib/next-test-utils.ts:831:20)
  at e2e/app-dir/actions/app-action.test.ts:990:7

pnpm test-start test/e2e/app-dir/next-after-app-static/build-time/build-time.test.ts (job)

  • avoid-popstate-flash > does not flash back to partial PPR data during back/forward navigation (DD)
Expand output

● avoid-popstate-flash › does not flash back to partial PPR data during back/forward navigation

thrown: "Exceeded timeout of 60000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  50 |       }
  51 |
> 52 |       const result = Reflect.apply(target, thisArg, args)
     |                              ^
  53 |       return typeof result === 'function' ? wrapJestTestFn(result) : result
  54 |     },
  55 |     get(target, prop, receiver) {

  at Object.apply (lib/e2e-utils/index.ts:52:30)
  at test (e2e/app-dir/ppr-navigations/avoid-popstate-flash/avoid-popstate-flash.test.ts:21:3)
  at Object.describe (e2e/app-dir/ppr-navigations/avoid-popstate-flash/avoid-popstate-flash.test.ts:6:1)

@nextjs-bot

Copy link
Copy Markdown
Contributor

Stats from current PR

🟢 1 improvement

Metric Canary PR Change Trend
node_modules Size 475 MB 475 MB 🟢 144 kB (0%) ▁▁▁▁▁
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▁▁▁█▁
Cold (Ready in log) 436ms 436ms ▂▁▁█▂
Cold (First Request) 1.248s 1.256s ▄▁▁█▄
Warm (Listen) 457ms 457ms ▁▁▁█▁
Warm (Ready in log) 440ms 446ms ▁▁▁█▁
Warm (First Request) 335ms 343ms ▁▁▁█▂
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 456ms 455ms ▅▅▁▅▁
Cold (Ready in log) 439ms 440ms ▁▂█▆▅
Cold (First Request) 1.957s 1.949s ▁▂▆█▄
Warm (Listen) 456ms 455ms ▃▃▃▃▁
Warm (Ready in log) 438ms 438ms ▂▁▇▇▅
Warm (First Request) 1.970s 1.955s ▂▁▄█▃

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 3.955s 3.974s ▁▁▁█▁
Cached Build 4.009s 3.963s ▁▁▁█▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 14.149s 14.113s ▁▁▂█▂
Cached Build 14.244s 14.261s ▁▂▃█▂
node_modules Size 475 MB 475 MB 🟢 144 kB (0%) ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **400 kB** → **400 kB** ⚠️ +125 B

80 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 764 B 765 B
Total 764 B 765 B ⚠️ +1 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 451 B 452 B
Total 451 B 452 B ⚠️ +1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
5528-HASH.js gzip 5.54 kB N/A -
6280-HASH.js gzip 58.3 kB N/A -
6335.HASH.js gzip 169 B N/A -
912-HASH.js gzip 4.59 kB N/A -
e8aec2e4-HASH.js gzip 62.6 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB
main-app-HASH.js gzip 255 B 254 B
main-HASH.js gzip 39.1 kB 39.1 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
262-HASH.js gzip N/A 4.59 kB -
2889.HASH.js gzip N/A 169 B -
5602-HASH.js gzip N/A 5.55 kB -
6948ada0-HASH.js gzip N/A 62.6 kB -
9544-HASH.js gzip N/A 59.1 kB -
Total 232 kB 233 kB ⚠️ +862 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 194 B
_error-HASH.js gzip 183 B 180 B 🟢 3 B (-2%)
css-HASH.js gzip 331 B 330 B
dynamic-HASH.js gzip 1.81 kB 1.81 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 351 B 352 B
hooks-HASH.js gzip 384 B 383 B
image-HASH.js gzip 580 B 581 B
index-HASH.js gzip 260 B 260 B
link-HASH.js gzip 2.5 kB 2.5 kB
routerDirect..HASH.js gzip 320 B 319 B
script-HASH.js gzip 386 B 386 B
withRouter-HASH.js gzip 315 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.97 kB 7.97 kB ✅ -2 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 125 kB 125 kB
page.js gzip 254 kB 254 kB
Total 379 kB 379 kB ⚠️ +73 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 615 B 615 B
middleware-r..fest.js gzip 156 B 155 B
middleware.js gzip 43.6 kB 43.9 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 45.2 kB 45.5 kB ⚠️ +308 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 715 B 718 B
Total 715 B 718 B ⚠️ +3 B
Build Cache
Canary PR Change
0.pack gzip 4.01 MB 4.02 MB 🔴 +10.2 kB (+0%)
index.pack gzip 103 kB 103 kB
index.pack.old gzip 104 kB 103 kB 🟢 1.22 kB (-1%)
Total 4.22 MB 4.23 MB ⚠️ +8.91 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 320 kB 320 kB
app-page-exp..prod.js gzip 170 kB 169 kB
app-page-tur...dev.js gzip 319 kB 319 kB
app-page-tur..prod.js gzip 169 kB 169 kB
app-page-tur...dev.js gzip 316 kB 316 kB
app-page-tur..prod.js gzip 168 kB 167 kB
app-page.run...dev.js gzip 316 kB 316 kB
app-page.run..prod.js gzip 168 kB 168 kB
app-route-ex...dev.js gzip 70.8 kB 70.8 kB
app-route-ex..prod.js gzip 49.2 kB 49.2 kB
app-route-tu...dev.js gzip 70.8 kB 70.8 kB
app-route-tu..prod.js gzip 49.2 kB 49.2 kB
app-route-tu...dev.js gzip 70.4 kB 70.4 kB
app-route-tu..prod.js gzip 49 kB 49 kB
app-route.ru...dev.js gzip 70.4 kB 70.4 kB
app-route.ru..prod.js gzip 49 kB 49 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 43.2 kB 43.2 kB
pages-api-tu..prod.js gzip 32.9 kB 32.9 kB
pages-api.ru...dev.js gzip 43.2 kB 43.2 kB
pages-api.ru..prod.js gzip 32.8 kB 32.8 kB
pages-turbo....dev.js gzip 52.5 kB 52.5 kB
pages-turbo...prod.js gzip 38.5 kB 38.5 kB
pages.runtim...dev.js gzip 52.5 kB 52.5 kB
pages.runtim..prod.js gzip 38.4 kB 38.4 kB
server.runti..prod.js gzip 62 kB 62 kB
Total 2.82 MB 2.82 MB ✅ -1.49 kB
📝 Changed Files (8 files)

Files with changes:

  • app-page-exp..ntime.dev.js
  • app-page-exp..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page.runtime.dev.js
  • app-page.runtime.prod.js
View diffs
app-page-exp..ntime.dev.js
failed to diff
app-page-exp..time.prod.js
failed to diff
app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js
failed to diff
app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js
failed to diff
app-page.runtime.dev.js
failed to diff
app-page.runtime.prod.js
failed to diff
📎 Tarball URL
next@https://vercel-packages.vercel.app/next/prs/90549/next

@ztanner ztanner changed the title remove action forwarding logic experiment with remove action forwarding logic Feb 27, 2026
@ztanner ztanner changed the title experiment with remove action forwarding logic experiment with removing action forwarding logic Feb 27, 2026
unstubbable added a commit that referenced this pull request May 14, 2026
Reopens #93710 from a branch on this repo so the required deploy test
matrix can run — GitHub Actions doesn't expose secrets to fork PRs, and
those deploy jobs are required checks. All commits and credit carry
forward from the original PR by @elishagreenwald, which built on earlier
attempts by @LiamBoz in #84525 and @claygeo in #92053.

When middleware rewrites a Server Action POST to a page that doesn't
bundle the action, the receiving worker forwards the request to a worker
that does. The forwarded request hits middleware again and gets
rewritten the same way, so the new receiving worker forwards again —
looping until undici's headers timeout (~300s) or memory pressure brings
the server down (#84504). The fix is two related changes on the
forwarding code path. The first is an `!actionWasForwarded` guard in
`action-handler.ts` so a request carrying `x-action-forwarded: 1` is
never forwarded a second time. The second is a new branch in
`createForwardedActionResponse` that copies the
`x-nextjs-action-not-found` header and 404 status onto the originating
response when the forwarded worker can't find the action either; without
it the client would see a generic "unexpected response" error instead of
the `UnrecognizedActionError` that the rest of the framework expects.

The e2e test at `test/e2e/app-dir/action-forward-loop` reproduces the
scenario. A `proxy.ts` rewrites POSTs to `/with-action` so GETs still
render the page normally; the page renders a `<form>` with an inline
server action wrapped in a React error boundary that branches on
`unstable_isUnrecognizedActionError`. The test clicks the button and
waits for `#action-not-found-error`. Without the loop guard the test
times out at 10s, and without the pass-through the boundary catches a
generic error and the assertion fails — so both changes are individually
load-bearing.

This is a short-term fix. The mid-term direction is to remove
server-side action forwarding altogether and have the client dispatch
each Server Action to the route that actually bundles it, which makes
the entire forwarding code path (and this bug surface) unnecessary.
#90549 is the draft exploring that approach.

Fixes #84504

Closes #93710
Closes #84525
Closes #92053

---------

Co-Authored-By: Elisha Greenwald <ejgreenwald@gmail.com>
Co-Authored-By: LiamBoz <thisamazingnow@gmail.com>
Co-Authored-By: kmaclip <kmartclips@proton.me>
unstubbable added a commit that referenced this pull request May 18, 2026
Reopens #93710 from a branch on this repo so the required deploy test
matrix can run — GitHub Actions doesn't expose secrets to fork PRs, and
those deploy jobs are required checks. All commits and credit carry
forward from the original PR by @elishagreenwald, which built on earlier
attempts by @LiamBoz in #84525 and @claygeo in #92053.

When middleware rewrites a Server Action POST to a page that doesn't
bundle the action, the receiving worker forwards the request to a worker
that does. The forwarded request hits middleware again and gets
rewritten the same way, so the new receiving worker forwards again —
looping until undici's headers timeout (~300s) or memory pressure brings
the server down (#84504). The fix is two related changes on the
forwarding code path. The first is an `!actionWasForwarded` guard in
`action-handler.ts` so a request carrying `x-action-forwarded: 1` is
never forwarded a second time. The second is a new branch in
`createForwardedActionResponse` that copies the
`x-nextjs-action-not-found` header and 404 status onto the originating
response when the forwarded worker can't find the action either; without
it the client would see a generic "unexpected response" error instead of
the `UnrecognizedActionError` that the rest of the framework expects.

The e2e test at `test/e2e/app-dir/action-forward-loop` reproduces the
scenario. A `proxy.ts` rewrites POSTs to `/with-action` so GETs still
render the page normally; the page renders a `<form>` with an inline
server action wrapped in a React error boundary that branches on
`unstable_isUnrecognizedActionError`. The test clicks the button and
waits for `#action-not-found-error`. Without the loop guard the test
times out at 10s, and without the pass-through the boundary catches a
generic error and the assertion fails — so both changes are individually
load-bearing.

This is a short-term fix. The mid-term direction is to remove
server-side action forwarding altogether and have the client dispatch
each Server Action to the route that actually bundles it, which makes
the entire forwarding code path (and this bug surface) unnecessary.
#90549 is the draft exploring that approach.

Fixes #84504

Closes #93710
Closes #84525
Closes #92053

---------

Co-Authored-By: Elisha Greenwald <ejgreenwald@gmail.com>
Co-Authored-By: LiamBoz <thisamazingnow@gmail.com>
Co-Authored-By: kmaclip <kmartclips@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants