cloudflare/vinext

Metadata streaming: parallel route slot metadata not emitted

已關閉

#1,341 建立於 2026年5月20日

 (1 則留言) (0 個反應) (0 位負責人)TypeScript (383 個分叉)github user discovery
adapter-api-e2ehelp wanted

倉庫指標

星標
 (8,624 顆星)
PR 合併指標
 (平均合併 1天 1小時) (30 天內合併 462 個 PR)

描述

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-20).

Problem

Metadata from parallel route slots is not properly emitted or updated:

  1. Empty title in parallel routes. When a parallel routes layout sets metadata but does not render children, the <title> tag is empty instead of containing the layout's metadata.

  2. Stale metadata on slot navigation. Navigating between pages under a parallel route slot does not update the <title> tag. It stays on the layout's default title instead of switching to the page-specific title.

  3. Missing charset meta. The root not-found page renders without <meta charset="utf-8"> when metadata streaming is active.

Expected: "parallel-routes-default layout title"
Received: ""

Expected: "first page - @bar"
Received: "parallel-routes-default layout title"

Expected: 1  // meta[charset="utf-8"] count
Received: 0

Estimated Impact

~8 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/app-dir/metadata-streaming-parallel-routes/metadata-streaming-parallel-routes.test.ts (2 failures)
  • test/e2e/app-dir/metadata-navigation/metadata-navigation.test.ts (4 failures)
  • test/e2e/app-dir/metadata-streaming/metadata-streaming.test.ts
  • test/e2e/app-dir/metadata-streaming-static-generation/metadata-streaming-static-generation.test.ts (2 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test with parallel routes that set different metadata at each level and verify the correct title renders. Confirm it fails.

  2. Study Next.js metadata resolution for parallel routes. The metadata resolution logic needs to walk all slots, not just the children slot, when determining which metadata to emit.

  3. Fix client-side metadata updates during slot navigation. When navigating within a parallel route slot, the metadata should update to reflect the new page's metadata.

貢獻者指南