Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(nuxt): render component-less parent routes during client-side nav#35036

Merged
danielroe merged 3 commits into
mainnuxt/nuxt:mainfrom
fix-missing-file-propnuxt/nuxt:fix-missing-file-propCopy head branch name to clipboard
May 17, 2026
Merged

fix(nuxt): render component-less parent routes during client-side nav#35036
danielroe merged 3 commits into
mainnuxt/nuxt:mainfrom
fix-missing-file-propnuxt/nuxt:fix-missing-file-propCopy head branch name to clipboard

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #34967

📚 Description

this bug was introduced in #21823 - some time ago! - in Nuxt v3.6.2...

@danielroe
danielroe requested a review from posva May 11, 2026 10:59
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added 5.x 🐛 bug Something isn't working as expected labels May 11, 2026
@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/nuxt/nuxt-page.test.ts`:
- Around line 738-757: The parent route added with router.addRoute({ path:
'/parent-34967', ... }) has no name so it never gets removed; capture the
teardown function returned by router.addRoute (e.g., const removeParent =
router.addRoute(...)) when adding the parent route and call that function in
afterEach (alongside the existing router.removeRoute('index-34967') and
router.removeRoute('child-34967')) to fully unregister the unnamed parent route;
ensure removeParent is declared in the test scope so afterEach can call it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e4f4ad01-6397-4cd3-bf7c-89154efea210

📥 Commits

Reviewing files that changed from the base of the PR and between fb11efa and 6f90e79.

📒 Files selected for processing (2)
  • packages/nuxt/src/pages/runtime/page.ts
  • test/nuxt/nuxt-page.test.ts

Comment thread test/nuxt/nuxt-page.test.ts
@pkg-pr-new

pkg-pr-new Bot commented May 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35036

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35036

nuxt

npm i https://pkg.pr.new/nuxt@35036

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35036

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35036

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35036

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35036

commit: fe0056d

@codspeed-hq

codspeed-hq Bot commented May 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fix-missing-file-prop (fe0056d) with main (ad97329)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@posva posva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. I tried to simplify the test a bit, I'm aware the same changes can be applied in the file but I had trouble running the unit tests, they were running in a loop and the lsp server was crashing all the time too.

I feel like the page component is too complicated. I know a lot of the complexity comes from supporting Suspense but it feels odd we need all these extra things to handle it.

@danielroe

Copy link
Copy Markdown
Member Author

weird!

i would love to move some of the complexity out (into vue-router if you think worth it? specifically the bit that ensures each suspense fork has access to the route that it is rendering)

@posva

posva commented May 15, 2026

Copy link
Copy Markdown
Member

I think some of the complexity is worth moving to vue-router but it shouldn't impact users that do not rely on Suspense. I also feel like Suspense has never reached maturity.

In the upcoming version, RouterLink and RouterView are not installed by the router plugin, so it also opens more possibilities to have different versions, some lighter than others

@danielroe
danielroe merged commit 0fbd03b into main May 17, 2026
29 checks passed
@danielroe
danielroe deleted the fix-missing-file-prop branch May 17, 2026 15:52
@github-actions github-actions Bot mentioned this pull request May 17, 2026
5 tasks
danielroe added a commit that referenced this pull request May 17, 2026
…#35036)

Co-authored-by: Eduardo San Martin Morote <posva13@gmail.com>
@github-actions github-actions Bot mentioned this pull request May 17, 2026
danielroe added a commit that referenced this pull request May 17, 2026
…#35036)

Co-authored-by: Eduardo San Martin Morote <posva13@gmail.com>
@github-actions github-actions Bot mentioned this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🐛 bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SPA navigation hangs indefinitely for child routes when parent route defined via pages:extend has no file property

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.