Skip to content

Commit 92df16a

Browse files
committed
docs(capture-kit): scope the transport-death cancel comment to the routes that end here
R7 P3 / inline r4300817984: 'always a pre-press exit' overstated the catch's reach — confirmTreeAlertGone polls through the same observeTreeAlert, so a cancel mid-confirm-probe reaches it post-press (harmless: the actOnTreeAlert press/confirm catch re-types it to dispatched:'unknown', which owns that invariant). The comment now states where each typed answer is owned instead of asserting a false reachability fact. No behavior change.
1 parent 5fc2322 commit 92df16a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎packages/capture-kit/src/alert-tree-driver.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ async function observeTreeAlert<TCapture, TCandidate>(
177177
capture = await driver.capture({ signal: driver.signal ?? neverSignal });
178178
} catch (error) {
179179
if (driver.signal?.aborted) {
180-
// A capture that died with the caller's cancellation is always a pre-press exit: no
181-
// acting leg presses before its lookup returns, and get/wait have no press at all — so
182-
// nothing can have been dispatched when this route throws.
180+
// A capture that dies with the cancellation dispatches nothing on the get/wait/lookup
181+
// routes; post-press deaths rejoin `actOnTreeAlert`'s catch, which owns the typed 'unknown'.
183182
throw createRequestCanceledError({ dispatched: 'no' }, error);
184183
}
185184
throw error;

0 commit comments

Comments
 (0)