@timber-js/app 0.2.0-alpha.201 → 0.2.0-alpha.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ export interface LayoutEntry {
27
27
  /** Callback to create a debug channel sink for RSC rendering. */
28
28
  export type DebugChannelFactory = () => {
29
29
  writable: WritableStream;
30
- };
30
+ } | undefined;
31
31
  /** Callback to pass RSC stream to SSR for HTML rendering. */
32
32
  export type CallSsrFn = (rscStream: ReadableStream<Uint8Array>, navContext: NavContext) => Promise<Response>;
33
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAc7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjE,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM;IACtC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,CACtB,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EACrC,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AA+BvB;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAA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IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM;IAAE,QAAQ,EAAE,cAAc,CAAA;CAAE,GAAG,SAAS,CAAC;AAEjF,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,CACtB,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EACrC,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AA+BvB;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,KAAK,QAAQ,GAAG,IAAI,CAAC;AAEhG;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,qBAAqB,EACtC,sBAAsB,EAAE,mBAAmB,EAC3C,OAAO,EAAE,SAAS,EAClB,WAAW,CAAC,EAAE,mBAAmB,EACjC,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAsInB;AAgBD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,sBAAsB,EAAE,mBAAmB,EAC3C,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAiDnB"}
@@ -7,19 +7,17 @@ import type { ManifestSegmentNode } from '../route-matcher.ts';
7
7
  import type { SegmentInfo } from '../../shared/segment-info.ts';
8
8
  import type { SlotSkipEntry } from '../slot-resolver.ts';
9
9
  /**
10
- * Create a debug channel sink that discards all debug data.
10
+ * No-op — returns undefined so no debugChannel is passed to Flight.
11
+ * Debug rows ride the main stream inline (React's default behavior).
11
12
  *
12
- * Used in production to divert debug rows ($E source entries, component
13
- * info) away from the main Flight stream. In dev mode, the debug channel
14
- * is omitted entirely so debug rows (owner stacks) ride the main stream
15
- * and reach the browser for console warning resolution.
13
+ * Production Flight emits no debug rows. In dev, inline debug rows
14
+ * are handled by the Flight client for owner stack resolution.
16
15
  *
17
- * Only provides `writable` — omitting `readable` avoids Flight's
18
- * keepDebugAlive mode which holds deferred debug refs open per request.
16
+ * A writable-only debugChannel triggers a react-server-dom-webpack
17
+ * >=19.3.0 Flight client regression (owner/stack refs parsed after
18
+ * stream close produce "Connection closed" errors).
19
19
  */
20
- export declare function createDebugChannelSink(): {
21
- writable: WritableStream;
22
- };
20
+ export declare function createDebugChannelSink(): undefined;
23
21
  /**
24
22
  * Parsed component debug info extracted from the Flight debug channel.
25
23
  *
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI;IAAE,QAAQ,EAAE,cAAc,CAAA;CAAE,CAOrE;AAID;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,IAA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gB,gBAAgB,CAC9B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,KAAK,CAAC;IACtB,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B,CAAC,EACF,YAAY,CAAC,EAAE,aAAa,EAAE,EAC9B,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,gBAAgB,SAAW,GAC1B,WAAW,EAAE,CAsEf;AAMD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -13,7 +13,7 @@ import type { RscPayloadRoot } from '../../shared/payload-root.ts';
13
13
  import { type DenyPageEntry } from '../deny-boundary.ts';
14
14
  import { DenySignal, RedirectSignal } from '../primitives.ts';
15
15
  import { type DebugComponentEntry } from './helpers.ts';
16
- import { type DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
16
+ import type { DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
17
17
  /**
18
18
  * Mutable signal state captured during RSC rendering.
19
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAIL,UAAU,EACV,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAwC,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAIpG;;;;;;;;;GASG;AACH,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AAE,CAUV;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,UAAU,EACjB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,IAAI,CAcN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,EACjB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,aAAa,EAAE,GAC5B,IAAI,CA+DN;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,CAAC,EAAE,eAAe,CAAC;IACnB,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,YAAY,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,SAAS,EACT,KAAK,EACL,CAAC,EACD,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,GACb,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAwIzD"}
@@ -50,5 +50,5 @@ import { type ReactNode } from 'react';
50
50
  * the walk must leave alone: a slot layout passes the `children` element it
51
51
  * received, so the page beneath it is not wrapped a second time.
52
52
  */
53
- export declare function containSlotSubtree(tree: ReactNode, fallback: ReactNode, opaque?: ReactNode): ReactNode;
53
+ export declare function containSlotSubtree(tree: ReactNode, fallback: ReactNode, opaque?: ReactNode, slotName?: string): ReactNode;
54
54
  //# sourceMappingURL=slot-subtree-contain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slot-subtree-contain.d.ts","sourceRoot":"","sources":["../../src/server/slot-subtree-contain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoM3F;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,EACnB,MAAM,CAAC,EAAE,SAAS,GACjB,SAAS,CAEX"}
1
+ {"version":3,"file":"slot-subtree-contain.d.ts","sourceRoot":"","sources":["../../src/server/slot-subtree-contain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA4M3F;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,EACnB,MAAM,CAAC,EAAE,SAAS,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,SAAS,CAEX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timber-js/app",
3
- "version": "0.2.0-alpha.201",
3
+ "version": "0.2.0-alpha.203",
4
4
  "description": "Vite-native React framework built for Servers and Serverless Platforms — correct HTTP semantics, real status codes, pages that work without JavaScript",
5
5
  "keywords": [
6
6
  "cloudflare-workers",
@@ -152,7 +152,7 @@
152
152
  "@opentelemetry/sdk-trace-base": "^2.11.0",
153
153
  "cookie": "^2.0.1",
154
154
  "jsonc-parser": "^3.3.1",
155
- "magic-string": "^1.3.1",
155
+ "magic-string": "^1.4.1",
156
156
  "nitro": "3.0.260903-beta",
157
157
  "oxc-transform-react": "^0.150.0",
158
158
  "srvx": "^1.0.5"
@@ -235,8 +235,40 @@ export function hideCompilingOverlay(): void {
235
235
  *
236
236
  * The server receives 'timber:client-error' events, and echoes them
237
237
  * back as Vite '{ type: "error" }' payloads to trigger the overlay.
238
+ *
239
+ * Errors that fire before the Vite HMR WebSocket has connected are
240
+ * buffered and flushed once the connection is established, so
241
+ * `hot.send()` never throws `SendBeforeConnectError`. See TIM-1509.
238
242
  */
239
- export function setupClientErrorForwarding(hot: Pick<HotInterface, 'send'>): void {
243
+ export function setupClientErrorForwarding(hot: HotInterface): void {
244
+ // Track WS connection state ourselves because Vite's HMRClient.send()
245
+ // is fire-and-forget: it catches transport rejections internally via
246
+ // .catch(err => logger.error(err)), so a pre-connect send doesn't throw
247
+ // into our code — it just logs a noisy SendBeforeConnectError. Buffering
248
+ // here prevents that noise entirely.
249
+ //
250
+ // The vite:ws:connect listener always fires AFTER registration because
251
+ // WebSocket.onopen is a macrotask and this code runs synchronously during
252
+ // module execution (setupHmr → setupClientErrorForwarding in browser-entry).
253
+ let connected = false;
254
+ const buffer: Array<{ event: string; data: unknown }> = [];
255
+
256
+ function send(event: string, data: unknown): void {
257
+ if (connected) {
258
+ hot.send(event, data);
259
+ } else {
260
+ buffer.push({ event, data });
261
+ }
262
+ }
263
+
264
+ hot.on('vite:ws:connect', () => {
265
+ connected = true;
266
+ for (const queued of buffer) {
267
+ hot.send(queued.event, queued.data);
268
+ }
269
+ buffer.length = 0;
270
+ });
271
+
240
272
  window.addEventListener('error', (event: ErrorEvent) => {
241
273
  // Skip errors without useful information
242
274
  if (!event.error && !event.message) return;
@@ -248,7 +280,7 @@ export function setupClientErrorForwarding(hot: Pick<HotInterface, 'send'>): voi
248
280
  if (isFrameworkSignalError(event.error)) return;
249
281
 
250
282
  const error = event.error;
251
- hot.send('timber:client-error', {
283
+ send('timber:client-error', {
252
284
  message: error?.message ?? event.message,
253
285
  stack: error?.stack ?? '',
254
286
  componentStack: error?.componentStack ?? null,
@@ -266,7 +298,7 @@ export function setupClientErrorForwarding(hot: Pick<HotInterface, 'send'>): voi
266
298
  const message = reason instanceof Error ? reason.message : String(reason);
267
299
  const stack = reason instanceof Error ? (reason.stack ?? '') : '';
268
300
 
269
- hot.send('timber:client-error', {
301
+ send('timber:client-error', {
270
302
  message,
271
303
  stack,
272
304
  componentStack: null,
@@ -95,7 +95,11 @@ export function createRscPayloadStream(): RscStreamResult | null {
95
95
  },
96
96
  });
97
97
 
98
- const debugChannel = createHmrDebugChannel();
98
+ // No debug channel — debug rows ride the main stream inline.
99
+ // A readable debug channel causes "Connection closed" when HMR
100
+ // messages are lost or sessions expire. React handles inline
101
+ // debug rows natively for owner stack resolution.
102
+ const debugChannel = null;
99
103
 
100
104
  // Close the stream when the document finishes loading.
101
105
  // DOMContentLoaded fires after the HTML parser has processed all
@@ -49,9 +49,7 @@ export interface LayoutEntry {
49
49
  }
50
50
 
51
51
  /** Callback to create a debug channel sink for RSC rendering. */
52
- export type DebugChannelFactory = () => {
53
- writable: WritableStream;
54
- };
52
+ export type DebugChannelFactory = () => { writable: WritableStream } | undefined;
55
53
 
56
54
  /** Callback to pass RSC stream to SSR for HTML rendering. */
57
55
  export type CallSsrFn = (
@@ -13,23 +13,18 @@ import { isClientReference } from '../utils/element-type.ts';
13
13
  import { isStaticRequestDependent } from '../request-dep.ts';
14
14
 
15
15
  /**
16
- * Create a debug channel sink that discards all debug data.
16
+ * No-op — returns undefined so no debugChannel is passed to Flight.
17
+ * Debug rows ride the main stream inline (React's default behavior).
17
18
  *
18
- * Used in production to divert debug rows ($E source entries, component
19
- * info) away from the main Flight stream. In dev mode, the debug channel
20
- * is omitted entirely so debug rows (owner stacks) ride the main stream
21
- * and reach the browser for console warning resolution.
19
+ * Production Flight emits no debug rows. In dev, inline debug rows
20
+ * are handled by the Flight client for owner stack resolution.
22
21
  *
23
- * Only provides `writable` — omitting `readable` avoids Flight's
24
- * keepDebugAlive mode which holds deferred debug refs open per request.
22
+ * A writable-only debugChannel triggers a react-server-dom-webpack
23
+ * >=19.3.0 Flight client regression (owner/stack refs parsed after
24
+ * stream close produce "Connection closed" errors).
25
25
  */
26
- export function createDebugChannelSink(): { writable: WritableStream } {
27
- const sink = new TransformStream();
28
- // Drain the readable side so the writable never back-pressures.
29
- sink.readable.pipeTo(new WritableStream()).catch(() => {});
30
- // Only writable — omitting `readable` avoids Flight's keepDebugAlive
31
- // mode which holds deferred debug refs open per request.
32
- return { writable: sink.writable };
26
+ export function createDebugChannelSink(): undefined {
27
+ return undefined;
33
28
  }
34
29
 
35
30
  // ─── Debug Channel Collector (dev mode only) ────────────────────────────
@@ -27,8 +27,8 @@ import {
27
27
  } from '../primitives.ts';
28
28
  import { checkAndWarnRscPropError } from '../rsc-prop-warnings.ts';
29
29
 
30
- import { createDebugChannelSink, isAbortError, type DebugComponentEntry } from './helpers.ts';
31
- import { createDevDebugChannel, type DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
30
+ import { isAbortError, type DebugComponentEntry } from './helpers.ts';
31
+ import type { DebugChannelRegistry } from '../../dev-tools/debug-channel.ts';
32
32
  import { isDebug } from '../debug.ts';
33
33
  import { isDevMode } from '../debug.ts';
34
34
 
@@ -111,18 +111,13 @@ export function renderRscStream(
111
111
 
112
112
  let rscStream: ReadableStream<Uint8Array> | undefined;
113
113
 
114
- // Always provide a debugChannel to prevent $E source entries (which
115
- // may contain bound-arg secrets) from leaking into the main stream.
116
- //
117
- // In dev mode with an HMR transport: use createDevDebugChannel which
118
- // pipes debug data to the browser via WebSocket for owner stack
119
- // resolution. In production (or dev without transport): use a sink
120
- // that discards everything.
121
- const debugChannel = devDebugRegistry
122
- ? createDevDebugChannel(devDebugRegistry)
123
- : createDebugChannelSink();
124
- const debugRequestId =
125
- 'requestId' in debugChannel ? (debugChannel as { requestId: string }).requestId : undefined;
114
+ // No debugChannel — debug rows ride the main RSC stream inline.
115
+ // Production Flight emits none. In dev, the browser Flight client
116
+ // handles inline debug rows for owner stack resolution (React's
117
+ // default behavior). A writable-only debugChannel triggers a
118
+ // react-server-dom-webpack >=19.3.0 Flight client regression.
119
+ const debugChannel = undefined;
120
+ const debugRequestId = undefined;
126
121
 
127
122
  try {
128
123
  rscStream = renderToReadableStream(
@@ -284,7 +279,7 @@ export function renderRscStream(
284
279
  // In dev mode, debug rows ride the main stream (no separate channel), so
285
280
  // this is undefined — the error overlay uses stack traces directly.
286
281
  getDebugComponents:
287
- 'getComponents' in debugChannel
282
+ debugChannel && 'getComponents' in debugChannel
288
283
  ? (debugChannel as { getComponents: () => DebugComponentEntry[] }).getComponents
289
284
  : undefined,
290
285
  debugRequestId,
@@ -156,7 +156,12 @@ export async function resolveSlotElement(
156
156
  const rendered = await scope(() =>
157
157
  (SlotPage as (props: Record<string, unknown>) => unknown)(props)
158
158
  );
159
- return containSlotSubtree(rendered as React.ReactNode, denyFallback);
159
+ return containSlotSubtree(
160
+ rendered as React.ReactNode,
161
+ denyFallback,
162
+ undefined,
163
+ slotNode.segmentName
164
+ );
160
165
  } catch (error) {
161
166
  // RedirectSignal must propagate — the pipeline handles redirects
162
167
  // at the top level. Swallowing it here would silently return
@@ -189,12 +194,20 @@ export async function resolveSlotElement(
189
194
  element,
190
195
  h,
191
196
  scope,
192
- denyFallback
197
+ denyFallback,
198
+ slotNode.segmentName
193
199
  );
194
200
 
195
201
  // Wrap with slot root's layout — INSIDE the access gate, so the layout
196
202
  // server component never executes when access.ts denies. See TIM-1074.
197
- element = await wrapWithLayout(slotNode, element, h, scope, denyFallback);
203
+ element = await wrapWithLayout(
204
+ slotNode,
205
+ element,
206
+ h,
207
+ scope,
208
+ denyFallback,
209
+ slotNode.segmentName
210
+ );
198
211
 
199
212
  // Wrap in SlotAccessGate if slot root has access.ts. The gate is
200
213
  // OUTSIDE the layout, matching the segment model in
@@ -290,7 +303,8 @@ async function wrapWithIntermediateSegments(
290
303
  element: React.ReactElement,
291
304
  h: CreateElementFn,
292
305
  scope?: SlotParamScope,
293
- denyFallback?: React.ReactNode
306
+ denyFallback?: React.ReactNode,
307
+ slotName?: string
294
308
  ): Promise<React.ReactElement> {
295
309
  for (let i = chain.length - 1; i > 0; i--) {
296
310
  const seg = chain[i];
@@ -300,7 +314,7 @@ async function wrapWithIntermediateSegments(
300
314
  errorBoundaryComponent: TimberErrorBoundary,
301
315
  isSlotBoundary: true,
302
316
  });
303
- element = await wrapWithLayout(seg, element, h, scope, denyFallback);
317
+ element = await wrapWithLayout(seg, element, h, scope, denyFallback, slotName);
304
318
  element = await wrapWithAccessGate(seg, element, h, scope);
305
319
  }
306
320
  return element;
@@ -341,10 +355,16 @@ function ScopedSlotLayout(props: {
341
355
  layout: (props: Record<string, unknown>) => unknown;
342
356
  scope: SlotParamScope;
343
357
  denyFallback: React.ReactNode;
358
+ slotName: string | undefined;
344
359
  children: React.ReactElement;
345
360
  }): unknown {
346
361
  const rendered = props.scope(() => props.layout({ children: props.children }));
347
- return containSlotSubtree(rendered as React.ReactNode, props.denyFallback, props.children);
362
+ return containSlotSubtree(
363
+ rendered as React.ReactNode,
364
+ props.denyFallback,
365
+ props.children,
366
+ props.slotName
367
+ );
348
368
  }
349
369
 
350
370
  /**
@@ -362,7 +382,8 @@ async function wrapWithLayout(
362
382
  element: React.ReactElement,
363
383
  h: CreateElementFn,
364
384
  scope?: SlotParamScope,
365
- denyFallback: React.ReactNode = null
385
+ denyFallback: React.ReactNode = null,
386
+ slotName?: string
366
387
  ): Promise<React.ReactElement> {
367
388
  if (!node.layout) return element;
368
389
  const Layout = await loadComponent(node.layout);
@@ -373,6 +394,7 @@ async function wrapWithLayout(
373
394
  layout: Layout as (props: Record<string, unknown>) => unknown,
374
395
  scope,
375
396
  denyFallback,
397
+ slotName,
376
398
  children: element,
377
399
  });
378
400
  }
@@ -65,6 +65,10 @@ interface Containment {
65
65
  * so the level below is not wrapped (and re-walked) a second time.
66
66
  */
67
67
  opaque: unknown;
68
+ /** Slot name (e.g. `@artists`) used as a key prefix for wrapped elements. */
69
+ slotName?: string;
70
+ /** Monotonic counter for disambiguating same-name sibling components. */
71
+ wrapCount: number;
68
72
  }
69
73
 
70
74
  function isThenable(value: unknown): value is Thenable<unknown> {
@@ -156,7 +160,7 @@ function ContainedSlotComponent(props: {
156
160
  fallback: ReactNode;
157
161
  }): ReactNode | Promise<ReactNode> {
158
162
  const { component: Component, componentProps, fallback } = props;
159
- const containment: Containment = { fallback, opaque: undefined };
163
+ const containment: Containment = { fallback, opaque: undefined, wrapCount: 0 };
160
164
  let result: unknown;
161
165
  try {
162
166
  result = Component(componentProps);
@@ -204,12 +208,16 @@ function walk(node: unknown, c: Containment, seen: WeakSet<object>): unknown {
204
208
  const { type, key, props } = node;
205
209
  const component = type === ContainedSlotComponent ? undefined : serverComponentOf(type);
206
210
  if (component) {
211
+ const effectiveKey = key ?? (c.slotName ? `${c.slotName}:${c.wrapCount++}` : null);
207
212
  const wrapped = {
208
213
  component,
209
214
  componentProps: props as Record<string, unknown>,
210
215
  fallback: c.fallback,
211
216
  };
212
- return createElement(ContainedSlotComponent, key === null ? wrapped : { ...wrapped, key });
217
+ return createElement(
218
+ ContainedSlotComponent,
219
+ effectiveKey === null ? wrapped : { ...wrapped, key: effectiveKey }
220
+ );
213
221
  }
214
222
  // Host elements, fragments, Suspense, client references, providers, and
215
223
  // wrappers this walk already made: keep the type, contain whatever server
@@ -249,7 +257,8 @@ function walk(node: unknown, c: Containment, seen: WeakSet<object>): unknown {
249
257
  export function containSlotSubtree(
250
258
  tree: ReactNode,
251
259
  fallback: ReactNode,
252
- opaque?: ReactNode
260
+ opaque?: ReactNode,
261
+ slotName?: string
253
262
  ): ReactNode {
254
- return walk(tree, { fallback, opaque }, new WeakSet()) as ReactNode;
263
+ return walk(tree, { fallback, opaque, slotName, wrapCount: 0 }, new WeakSet()) as ReactNode;
255
264
  }