[PR #349] [CLOSED] test: reproduce issue #346 — renderHTTPAccessFallbackPage drops params from layouts #500

Closed
opened 2026-05-06 13:08:24 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/349
Author: @james-elicx
Created: 3/8/2026
Status: Closed

Base: mainHead: repro/issue-346-fallback-page-params


📝 Commits (2)

  • 79b59f7 test: reproduce issue #346 — renderHTTPAccessFallbackPage drops params from layouts
  • 30daaf8 fix: layout not getting correct params on 404

📊 Changes

5 files changed (+113 additions, -12 deletions)

View changed files

📝 packages/vinext/src/server/app-dev-server.ts (+18 -12)
tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/layout.tsx (+25 -0)
tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/not-found.tsx (+8 -0)
tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/page.tsx (+8 -0)
📝 tests/nextjs-compat/not-found.test.ts (+54 -0)

📄 Description

Summary

Adds a failing test that reproduces #346: when a 404 is triggered under a dynamic [lang] route segment, renderHTTPAccessFallbackPage passes no params to layout components. This causes the scoped not-found.tsx boundary to be skipped entirely and the root not-found to render instead (or a crash if the layout doesn't guard against undefined params).

Failing tests

  • notFound() under dynamic [lang] layout passes params to layout (issue #346) — expects scoped "Not Found (params-layout)", gets root "404 - Page Not Found"
  • RSC request: notFound() under dynamic [lang] layout passes params (issue #346) — same via .rsc endpoint

What was added

  • Fixture tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/
    • layout.tsx — destructures lang from params (the affected component type)
    • page.tsx — simple page under the dynamic segment
    • not-found.tsx — scoped fallback ("Not Found (params-layout)")
  • Tests in tests/nextjs-compat/not-found.test.ts — sanity check (passes) + two failing regression tests

No fix is included; this PR exists to track the reproduction.

Closes #346


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/349 **Author:** [@james-elicx](https://github.com/james-elicx) **Created:** 3/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `repro/issue-346-fallback-page-params` --- ### 📝 Commits (2) - [`79b59f7`](https://github.com/cloudflare/vinext/commit/79b59f7f711e66fa822b39a2d36fde100e08aa5a) test: reproduce issue #346 — renderHTTPAccessFallbackPage drops params from layouts - [`30daaf8`](https://github.com/cloudflare/vinext/commit/30daaf8d91e0623264bd345c53e286115d6cc322) fix: layout not getting correct params on 404 ### 📊 Changes **5 files changed** (+113 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/server/app-dev-server.ts` (+18 -12) ➕ `tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/layout.tsx` (+25 -0) ➕ `tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/not-found.tsx` (+8 -0) ➕ `tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/page.tsx` (+8 -0) 📝 `tests/nextjs-compat/not-found.test.ts` (+54 -0) </details> ### 📄 Description ## Summary Adds a failing test that reproduces #346: when a 404 is triggered under a dynamic `[lang]` route segment, `renderHTTPAccessFallbackPage` passes no `params` to layout components. This causes the scoped `not-found.tsx` boundary to be skipped entirely and the root not-found to render instead (or a crash if the layout doesn't guard against `undefined` params). ## Failing tests - `notFound() under dynamic [lang] layout passes params to layout (issue #346)` — expects scoped "Not Found (params-layout)", gets root "404 - Page Not Found" - `RSC request: notFound() under dynamic [lang] layout passes params (issue #346)` — same via `.rsc` endpoint ## What was added - **Fixture** `tests/fixtures/app-basic/app/nextjs-compat/not-found-params-layout/[lang]/` - `layout.tsx` — destructures `lang` from `params` (the affected component type) - `page.tsx` — simple page under the dynamic segment - `not-found.tsx` — scoped fallback ("Not Found (params-layout)") - **Tests** in `tests/nextjs-compat/not-found.test.ts` — sanity check (passes) + two failing regression tests No fix is included; this PR exists to track the reproduction. Closes #346 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:08:24 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#500
No description provided.