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.

贡献者指南