You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a83563
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): reject the awaited form from the abort wind-down; pipe forms only settle
Integrates #4649 with #4654's wind-down. On this branch the signal's
disconnect wind-down already completes every registered consumer, so the
awaited form's completion resolved before #4649's `onCancelled` hook could
reject it. Fold the rejection into that completion instead: `onAbort` marks
`cancelled` before the wind-down, and the thenable's `onFailure` completion
rejects with `signal.reason` when it is set (at registration too, for an
abort before `then`). The separate `onCancelled` chain is dropped.
`pipe`/`pipeTo` keep #4654's behaviour: nothing more is written to or ends
the sink, `pipeTo`'s promise resolves, `createSSRResponse` still answers a
pre-shell abort with a bodyless 500.
The #4646 spec now expects the awaited form to reject with signal.reason;
the signal JSDoc (server.ts, server-mock.ts), 12-ssr-http.md and the
observability sketch state the split.
Co-authored-by: Éverton Toffanetto <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
Copy file name to clipboardExpand all lines: .changeset/stream-signal-abort-settles.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@solidjs/web": patch
3
3
---
4
4
5
-
Aborting `renderToStream`'s `signal` now settles the consumer promises. Before, `await renderToStream(...)` and the promise from `pipeTo` stayed pending forever after an abort, which kept the request alive. The awaited form now resolves with whatever HTML the render had produced, as it already does for a render failure, and still never rejects. `pipeTo`'s promise resolves. As before, nothing more is written to the sink (#4646).
5
+
Aborting `renderToStream`'s `signal` now settles the consumer promises. Before, `await renderToStream(...)` and the promise from `pipeTo` stayed pending forever after an abort, which kept the request alive. `pipeTo`'s promise now resolves and, as before, nothing more is written to the sink: the bytes already sent stay sent, and `pipe`/`pipeTo` do not reject. The awaited form rejects with `signal.reason` (see the companion changeset) (#4646).
-`renderToStream(() => <App />, options?)` — the streaming renderer: the shell flushes first, and each async boundary streams its resolved fragment plus the activation script that swaps it in. A primitive marked `deferStream: true` (RFC 05) holds the shell flush until its first value resolves instead of letting the enclosing `<Loading>` fallback into the HTML. The returned stream is also a thenable: `await renderToStream(...)` resolves once the tree settles with the fully-resolved HTML string — the settled-string form of the render (what `renderToStringAsync` was before its removal).
27
+
-`renderToStream(() => <App />, options?)` — the streaming renderer: the shell flushes first, and each async boundary streams its resolved fragment plus the activation script that swaps it in. A primitive marked `deferStream: true` (RFC 05) holds the shell flush until its first value resolves instead of letting the enclosing `<Loading>` fallback into the HTML. The returned stream is also a thenable: `await renderToStream(...)` resolves once the tree settles with the fully-resolved HTML string — the settled-string form of the render (what `renderToStringAsync` was before its removal). Render errors go to `onError` and the promise still resolves with whatever HTML the render produced; the one rejection is the `signal` option aborting, which rejects the awaited form with `signal.reason` ([#4646](https://github.com/solidjs/solid/issues/4646)).
28
28
29
29
For hydration, the document needs the hydration script ahead of the app markup: `generateHydrationScript({ nonce?, eventNames? })` returns it as a string for hand-built documents, and `<HydrationScript />` renders it in JSX documents.
30
30
@@ -63,7 +63,7 @@ What the callback does and does not tell you:
63
63
`renderToStream` returns a result with three consumption surfaces — **exactly one may be used per render** (a second consumer throws with a directed message):
64
64
65
65
-`pipe(writable)` — Node-style writable streams.
66
-
-`pipeTo(writable)` — web `WritableStream`; returns a promise that settles when the render has been fully written.
66
+
-`pipeTo(writable)` — web `WritableStream`; returns a promise that settles when the render has been fully written. If the `signal` aborts, nothing more is written (the bytes already sent stay sent) and the promise resolves; it does not reject.
67
67
-`readable` — a getter that builds a web `ReadableStream` internally and hands it back. The stream yields `Uint8Array` bytes, `Response`-body ready:
0 commit comments