Skip to content

Commit 8d3a32a

Browse files
authored
fix(daemon): let a finishing mutation record the tree it acted through (#3471) (#3539)
* feat(daemon): let a finishing mutation record the tree it acted through (#3471) The history the gate reads. The session's deferred surface becomes a two-variant claim — `stabilize` (the capture side still owes a quiet-window loop) or `recheck` (a mutation dispatched through a captured tree whose own effect may still be animating) — and a mutation that resolved a target records that tree at the instant it finished, so the next press can ask whether its own coordinates are still in play. ADR 0014's device side-effect seam retires the record, and a press never erases a stabilization the capture side still owes. The `targetStability` matrix cells, their Layer-3 scenarios on both runtime paths, and the caller-facing help/docs land with it: the refusal is observable from here. Closes #3471. * chore(gates): name the deferred-surface owner the recheck variant shares (#3471) * fix(daemon): record only the tree a mutation actually acted through (#3471) `chooseMovingTargetTree` preferred the session snapshot whenever its node array differed from the tree the action resolved against, reasoning that a `--settle` or `--verify` capture must have published something newer. Array identity cannot establish that: a freshness capture and a `@ref` press's authorized frame reach `session.snapshot` the same way, so the marker could record a surface this action never looked at — the exact substitution its own docblock forbids, and a `stationary` verdict made against the wrong tree. The baseline is now the acted-through tree, always. A settled press simply owes its successor one re-observation instead of being answered from a tree of unknown provenance. The corroborated-failure path also dropped the tree. That sibling call reached the same finalizer without `preActionTree`, so a corroborated iOS tap retired the baseline a previous mutation had recorded and left the next press unscreened — a dispatch that touched the device behaving like one that never looked at a tree. It now passes the resolved target's own tree. Help and website docs now scope the guarantee to what the gate actually covers: ref and selector targets on the runtime path, dispatched (not "tapped") at the resting position, `movedToRect` optional, and a raw-coordinate press explicitly outside it. Refusing to narrow the WRITER to press/click: the ADR 0011 cells scope which commands the gate guards, while this marker asks whether a mutation just left an animating surface, and a `fill` that opened a keyboard or a `longpress` that started a drag answers that the same way a press does. The breadth is now pinned by a test rather than left implicit. * test(daemon): bracket the recorded baseline instant with the reads around it (#3471) The bound was "within the last second" of assertion time, so a CI pause between the mark and the comparison could fail the test while the marker itself stayed correct. Reading the clock before the call and again in the assertion keeps the claim the test actually makes — the stamp is the mutation END, not the action's start — and removes the slack the bound needed. * docs(website): name the two dispatch routes the moving-target check does not cover (#3471) The paragraph claimed the check runs for any @ref or selector target, which held for neither exclusion. `click @ref` on a backend that dispatches to the element itself returns from `maybeTapRefTarget` before the guard is reached, and the Maestro non-hittable coordinate fallback is a fused runner request that never resolves a point at all. Both are now stated as the exceptions they are, and "nothing was tapped" becomes "nothing was dispatched" for the same reason the command metadata changed verb. * fix(daemon): let a settle that proved rest record the tree that proved it (#3471) Removing the session-snapshot preference took the baseline back to the tree the action started from, and that broke a contract the repository already encodes: a press following a converged `--settle` spends a tap and nothing else (test/integration/provider-scenarios/settle-observation. test.ts asserts the runner transcript directly). A settled press is the case the screening exists to answer cheaply — re-observing a surface the settle already proved quiet is the round trip `--settle` was built to remove. The provenance problem the review found stays fixed. Instead of inferring "newer" from a differing node array, the finalizer forwards the action's own settle observation and the marker reads the one field that carries the fact: `diff`, which the runtime attaches only when the loop converged AND stored its settled tree as the session snapshot within one surface. `settled` alone is not that fact — a sparse capture is refused by the store and a cross-surface transition withholds the diff, and in both cases the session's newest tree belongs to some earlier capture. Everything that is not a stored settled tree keeps the acted-through tree: a timed-out loop, a lone `--verify` capture, a freshness capture, a `@ref` frame. * refactor(daemon): hand the finalizer its optional values directly (#3471) Both forwards were conditional property spreads, and the complexity ceiling counts each one as a branch on the already-branching dispatch path — `check:fallow` flagged the function at threshold on the previous commit. The finalizer's parameters are optional-with-undefined, so passing the value directly states the same fact with two fewer branches: an absent settle or an unresolved target forwards undefined, which is what the marker already treats as "no such evidence". * docs(website): say the motion check could not confirm rest, not that the target moves (#3471) The refusal covers two outcomes and the paragraph described only one. A re-check that never measured a position refuses for the same reason a target that kept moving does, and a reader told the target "was still moving" reads missing evidence as measured motion — then waits for motion that the gate never observed. Same wording the typed reason's own docblock already uses. * fix(interaction): report a refused press as an unconfirmed position, not as measured motion (#3471) A `target_still_moving` refusal covers two outcomes and all three of its surfaces described only one. The gate also refuses when a re-observation never measured a position at all — the `@ref` case where reconciliation kept the authorized frame node — so "the target was still moving" reported an observation the gate had not made, in the message, in the published hint, and in the website paragraph. A caller told the target is moving waits for movement; the actual recovery there is to re-resolve the target. All three now state the confirmation that failed. The reason literal is untouched: `reason` is the branch point, and the prose around it is not allowed to be more specific than the code that raised it. The unmeasured `@ref` refusal asserts both halves of that — the new wording present, the motion claim absent — so the text cannot drift back into a claim this path cannot support. * refactor(daemon): cut the duplicate settle-branch test and the repeated baseline reasoning (#3471) * docs(daemon): put the baseline's real shape in the docs that describe it (#3471) Three places said less than the code does, all found in review: - `MovingTargetBaseline.tree` named only the pre-action tree. #3538 asked for this doc to be widened when the writer landed, because it cannot be read truthfully from that layer: the converged-settle case records the tree that settle published as rest, not the one the action started from. - `markMovingTargetBaseline` listed "a raw coordinate" among the routes that leave the session idle. A point target with `--verify` or `--settle` DOES capture a tree in `resolvePointInteractionTarget`, so the idle list is the routes with no tree of their own, not the point-shaped ones. - `DeferredSurface.stabilize.baselineSignature` still pointed at `markPostGestureStabilization`, which is `markSurfaceStabilization` now. Also shrinks five comments that were narrating control flow rather than stating the invariant: the field-owner claim, the retirement comment, the carrier comment, and two guarantee cells. Line counts matter at this layer's budget, and a claim in prose is worth less than the same claim in a name. * test(interaction): name the wall-clock window the daemon-route scenario trusts (#3471) The press-to-press scenario goes through the real daemon route, and production installs no runtime clock on that route, so the gate's 500 ms window runs on the wall clock: press B has to reach its gate read within 500 ms of press A finishing. A host loaded enough to starve the process past that sends B idle, and B spends the tap — the same `Unexpected provider call: ios.runner.tap` a wiring regression gives, which is exactly the failure this scenario exists to catch. The alternative was threading a `clock` through the router deps so the daemon composition could install one, for a guarantee the scenario does not own; the harness-level `createContractClock` only reaches the in-process runtime, which this scenario deliberately does not use. So the risk is named where it can be read instead of paid for.
1 parent 6dc1e34 commit 8d3a32a

32 files changed

Lines changed: 918 additions & 82 deletions

‎packages/contracts/src/interaction-guarantees.ts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ export const INTERACTION_GUARANTEES = [
8383
// a settled diff). Distinct from the opt-in verifyEvidence/settleObservation features; this is the
8484
// path's baseline, always-on claim.
8585
'outcomeObservation',
86+
// The position the path dispatches at is one the target is confirmed to be at REST in (#3471).
87+
// Distinct from every guard above: those judge a tree, this judges the tree against the previous
88+
// action's tree. A capture is one instant's photograph of a surface that may still be rearranging
89+
// itself — the ADB-backed Android helper is measured reporting frames in flight — so a press
90+
// issued right after an action that animated the UI can resolve a point the target has already
91+
// vacated and report success on the vacancy. The gate is backend-neutral: it re-observes past the
92+
// window and refuses rather than dispatching at a position two observations disagree about.
93+
'targetStability',
8694
] as const;
8795

8896
export type InteractionGuarantee = (typeof INTERACTION_GUARANTEES)[number];
@@ -151,6 +159,21 @@ export type InteractionPathContract = {
151159
const GAPS_UMBRELLA_ISSUE = 'https://github.com/callstack/agent-device/issues/1081';
152160
const TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE = 'https://github.com/callstack/agent-device/issues/3335';
153161

162+
/**
163+
* The moving-target gate's shared cell (#3471). Scoped to the two commands that dispatch a tap the
164+
* daemon aimed at a rect it captured: `fill` aims at a field it expects to be found wherever it
165+
* is, and its own staleness failure mode is a wrong focus rather than a silent miss, which the
166+
* guard's re-resolve would not fix. `longpress` aims the same way and is deliberately left out for
167+
* now: a hold that begins one frame early is a gesture the recognizer still owns, the measured
168+
* failure and the caller-visible recovery are both tap-shaped, and widening this list is one
169+
* declaration plus one scenario per added command.
170+
*/
171+
const RUNTIME_TREE_TARGET_STABILITY: GuaranteeEnforcement = {
172+
kind: 'runtime',
173+
via: 'src/commands/interaction/runtime/moving-target-gate.ts#guardResolvedTargetAgainstMotion',
174+
appliesTo: ['press', 'click'],
175+
};
176+
154177
// Every path shares the SAME cell by construction: response payloads have one
155178
// construction site (ADR 0011 Layer 2), and the hand-rolled-literal guard test
156179
// (interaction-response-construction-guard.test.ts) keeps new branches on it.
@@ -193,6 +216,16 @@ const DIRECT_IOS_OUTCOME_NOT_OBSERVED_GAP: GuaranteeEnforcement = {
193216
trackingIssue: TAP_OUTCOME_NOT_OBSERVED_GAP_ISSUE,
194217
};
195218

219+
/**
220+
* Shares the SAME reasoning as DIRECT_IOS_SINGLE_QUERY_READINESS: the fused request is one XCTest
221+
* round trip, so it also cannot carry a stale daemon-captured position into the tap.
222+
*/
223+
const DIRECT_IOS_TARGET_STABILITY: GuaranteeEnforcement = {
224+
kind: 'waived',
225+
reason:
226+
"Intentional: the fused runner request queries the element and taps it inside one XCTest request, so the runner aims at the element's own live frame at tap time rather than at a rect the daemon captured earlier and carried across a round trip — the capture-to-dispatch distance #3471 closes does not exist on this route. Its hittability semantics stay the runner's, as the offscreen cell above already records.",
227+
};
228+
196229
// The two runtime tree paths (selector and ref resolution) run the SAME shared
197230
// guard/observation implementations; only how the target is found
198231
// (disambiguation) and how failures are described (errorTaxonomy) differ.
@@ -260,6 +293,7 @@ const RUNTIME_TREE_SHARED_GUARANTEES = {
260293
kind: 'runtime',
261294
via: 'src/commands/interaction/runtime/settle.ts#settleAfterInteraction',
262295
},
296+
targetStability: RUNTIME_TREE_TARGET_STABILITY,
263297
} satisfies Partial<Record<InteractionGuarantee, GuaranteeEnforcement>>;
264298

265299
export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPathContract> = {
@@ -390,6 +424,11 @@ export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPa
390424
'gap: target-authored drag has no --settle/--verify observation of the destination; the tap-shaped runtime paths are the only ones with an opt-in evidence route today.',
391425
trackingIssue: GAPS_UMBRELLA_ISSUE,
392426
},
427+
targetStability: {
428+
kind: 'inapplicable',
429+
reason:
430+
"Drag endpoints name contact coordinates for one uninterrupted pointer plan (ADR 0013); re-pointing an endpoint after resolution would split the plan the gesture's integrity depends on, and a drag whose surface moved mid-gesture is the surface behavior, not a misaimed tap. #3471 guards the tap-shaped paths, where one captured point is the whole action.",
431+
},
393432
},
394433
},
395434
'native-ref': {
@@ -475,6 +514,11 @@ export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPa
475514
'gap: the fast path observes no post-action outcome by default; --settle/--verify disable it and delegate to runtime-ref instead of running here.',
476515
trackingIssue: GAPS_UMBRELLA_ISSUE,
477516
},
517+
targetStability: {
518+
kind: 'inapplicable',
519+
reason:
520+
'The fast path activates a provider-owned semantic handle rather than a point the daemon aimed from a capture, so there is no daemon-captured position that could have gone stale — the exposure #3471 guards is created by capture-to-dispatch distance and this path has none. Where the daemon does read a rect on this path, its preflight reads the same stored node the other guards judge.',
521+
},
478522
},
479523
},
480524
coordinate: {
@@ -538,6 +582,11 @@ export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPa
538582
'Coordinates name a point, not an element; there is no target existence to wait for.',
539583
},
540584
outcomeObservation: TAP_OUTCOME_NOT_OBSERVED_GAP,
585+
targetStability: {
586+
kind: 'inapplicable',
587+
reason:
588+
'Coordinates are the escape hatch that dispatches the point it was given; there is no resolved element whose position could be confirmed, and re-resolving a caller-authored coordinate would replace the instruction rather than verify it.',
589+
},
541590
},
542591
},
543592
'maestro-direct-selector': {
@@ -601,6 +650,7 @@ export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPa
601650
},
602651
targetReadiness: DIRECT_IOS_SINGLE_QUERY_READINESS,
603652
outcomeObservation: DIRECT_IOS_OUTCOME_NOT_OBSERVED_GAP,
653+
targetStability: DIRECT_IOS_TARGET_STABILITY,
604654
},
605655
},
606656
'maestro-non-hittable-fallback': {
@@ -664,6 +714,7 @@ export const INTERACTION_DISPATCH_PATHS: Record<InteractionPathId, InteractionPa
664714
},
665715
targetReadiness: DIRECT_IOS_SINGLE_QUERY_READINESS,
666716
outcomeObservation: DIRECT_IOS_OUTCOME_NOT_OBSERVED_GAP,
717+
targetStability: DIRECT_IOS_TARGET_STABILITY,
667718
},
668719
},
669720
};

‎packages/contracts/src/moving-target-gate.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export type MovingTargetBaseline = Readonly<{
4848
* clock's time too. Production installs none, so both sides read the wall clock.
4949
*/
5050
finishedAt: number;
51-
/** The pre-action tree — the observation the action's own resolution came out of. */
51+
/**
52+
* The tree the action acted through: its resolution's own observation, or the settled one its
53+
* `--settle` published as rest.
54+
*/
5255
tree: SurfaceScopedNodes;
5356
}>;
5457

‎scripts/layering/session-state.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export const SESSION_STATE_FIELD_OWNERS: Readonly<Record<string, readonly string
5151
pendingRecordAndHeal: ['src/daemon/session-replay-coordinator.ts'],
5252

5353
trace: ['src/daemon/handlers/trace-runtime.ts'],
54-
postGestureStabilization: ['src/daemon/deferred-interaction-outcome.ts'],
54+
// #3471 and #1542 share one field: what the session still owes after its last mutation. The two
55+
// variants are mutually exclusive, and every transition between them is owned by
56+
// `deferred-interaction-outcome.ts`, so neither mechanism can overwrite the other's claim.
57+
deferredSurface: ['src/daemon/deferred-interaction-outcome.ts'],
5558

5659
// App identity follows open, deployment and observation through named patches.
5760
appName: [

‎src/__tests__/daemon-composition/handlers/snapshot-handler-freshness.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ test('snapshot annotations survive a deferred post-gesture capture into CLI JSON
166166
];
167167
const snapshotQuality = { state: 'healthy', backend: 'tree' };
168168
session.snapshot = { nodes: baselineNodes, createdAt: Date.now(), backend: 'android' };
169-
session.postGestureStabilization = { action: 'swipe', positionals: [], markedAt: Date.now() };
169+
session.deferredSurface = {
170+
kind: 'stabilize',
171+
action: 'swipe',
172+
positionals: [],
173+
markedAt: Date.now(),
174+
};
170175
sessionStore.publish(sessionName, session);
171176

172177
legacyDispatchCapture.mockResolvedValue({

‎src/commands/interaction/metadata.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ const FIND_ACTION_VALUES = [
5757

5858
const interactionCommandDescriptions = {
5959
click:
60-
'Activate a UI target by snapshot ref, selector, or coordinates. Prefer a ref or selector after a snapshot; use coordinates only when semantic targeting is unavailable. This can change app state. Success means the click was dispatched, not that it landed: use settle or verify to confirm the result without a follow-up snapshot, or wait for the expected screen.',
60+
"Activate a UI target by snapshot ref, selector, or coordinates. Prefer a ref or selector after a snapshot; use coordinates only when semantic targeting is unavailable. This can change app state. Success means the click was dispatched, not that it landed: use settle or verify to confirm the result without a follow-up snapshot, or wait for the expected screen. A ref or selector target is re-checked for motion before dispatch when the session's previous action just animated the screen, and is dispatched at its resting position; one that has not stopped refuses with target_still_moving rather than acting where it was.",
6161
press:
62-
'Short-press a UI target by snapshot ref, selector, or coordinates. Use longpress instead when the target requires a context-menu or hold gesture. Success means the press was dispatched, not that it landed: use settle or verify to confirm the result, or wait for the expected screen.',
62+
"Short-press a UI target by snapshot ref, selector, or coordinates. Use longpress instead when the target requires a context-menu or hold gesture. Success means the press was dispatched, not that it landed: use settle or verify to confirm the result, or wait for the expected screen. A ref or selector target is re-checked for motion before dispatch when the session's previous action just animated the screen, and is dispatched at its resting position; one that has not stopped refuses with target_still_moving rather than acting where it was.",
6363
fill: 'Replace text in a UI input selected by snapshot ref, selector, or coordinates. Pass an empty text to clear the field. Inspect unconfirmed evidence and assert the expected value or resulting screen before continuing. Prefer refs or selectors after snapshot; use recordAs to keep sensitive text out of a recorded replay while sending it to the live app.',
6464
longpress:
6565
'Hold a UI target by snapshot ref, selector, or coordinates to open a context menu or perform another hold gesture. Set durationMs when the default hold duration is unsuitable.',

‎src/commands/interaction/runtime/moving-target-gate.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ test('a ref the second observation cannot re-measure is refused, never self-agre
278278
// hint's only test was the contracts unit suite, and the hint now lives beside this refusal.
279279
assert.match(String(details?.hint), /snapshot -i/);
280280
assert.match(String(details?.hint), /ref frame/);
281+
// And no motion claim: this is the shape that measured NOTHING.
282+
assert.match(String(details?.hint), /no confirmed resting position/);
283+
assert.doesNotMatch(String(details?.hint), /was still moving/);
281284
return true;
282285
},
283286
);

‎src/commands/interaction/runtime/moving-target-gate.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ function targetStillMovingHint(params: { selector: string | undefined }): string
276276
? `Run wait ${shellQuoteIfNeeded(params.selector)} and retry with the same selector`
277277
: 'Run snapshot -i and retry with a selector (text=/id=) rather than this @ref — re-observing retires the ref frame';
278278
return (
279-
'The target was still moving when the transition window after the previous action ran out, so no resting ' +
280-
`position could be confirmed and nothing was tapped. ${reobserve}; or pass --settle to have the action itself ` +
281-
'wait for the UI to go quiet.'
279+
'The target had no confirmed resting position when the transition window after the previous action ran ' +
280+
`out, so nothing was dispatched. ${reobserve}; or pass --settle to have the action itself wait for the ` +
281+
'UI to go quiet.'
282282
);
283283
}
284284

@@ -301,8 +301,8 @@ function motionRefusal(
301301
new AppError(
302302
'COMMAND_FAILED',
303303
selector
304-
? `Selector ${selector} is still moving, so no resting position could be confirmed to press`
305-
: `Ref ${ref} is still moving, so no resting position could be confirmed to press`,
304+
? `Selector ${selector} had no confirmed resting position when the transition window ran out`
305+
: `Ref ${ref} had no confirmed resting position when the transition window ran out`,
306306
{
307307
reason: INTERACTION_ERROR_REASONS.targetStillMoving,
308308
...(selector !== undefined ? { selector } : { ref }),

‎src/daemon/__tests__/deferred-interaction-outcome.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { afterEach, test, vi } from 'vitest';
33
import {
44
isPostGestureStabilizationPending,
55
markDeferredInteractionOutcome,
6+
pendingSurfaceStabilization,
67
markPostOpenStabilization,
78
resolveDeferredInteractionOutcome,
89
stripInternalInteractionFlags,
@@ -105,8 +106,8 @@ test('an Apple open that could not observe its app marks stabilization without a
105106
markPostOpenStabilization(session, 'unobservable');
106107

107108
assert.equal(isPostGestureStabilizationPending(session), true);
108-
assert.equal(session.postGestureStabilization?.action, 'open');
109-
assert.equal(session.postGestureStabilization?.baselineSignature, undefined);
109+
assert.equal(pendingSurfaceStabilization(session)?.action, 'open');
110+
assert.equal(pendingSurfaceStabilization(session)?.baselineSignature, undefined);
110111
});
111112

112113
test('every open verdict other than observable marks stabilization', () => {

‎src/daemon/__tests__/direct-ios-selector.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test('isLocalIosRunnerSession: iOS local sessions are eligible, Android and unde
119119

120120
test('isLocalIosRunnerSession: skipPendingPostGestureStabilization:true excludes a pending session (the tap fast path)', () => {
121121
const pending = makeSession('ios', {
122-
postGestureStabilization: { action: 'scroll', positionals: [], markedAt: Date.now() },
122+
deferredSurface: { kind: 'stabilize', action: 'scroll', positionals: [], markedAt: Date.now() },
123123
});
124124
assert.equal(
125125
isLocalIosRunnerSession(pending, { skipPendingPostGestureStabilization: true }),
@@ -129,7 +129,7 @@ test('isLocalIosRunnerSession: skipPendingPostGestureStabilization:true excludes
129129

130130
test('isLocalIosRunnerSession: skipPendingPostGestureStabilization:false keeps a pending session eligible (the offscreen double-check)', () => {
131131
const pending = makeSession('ios', {
132-
postGestureStabilization: { action: 'scroll', positionals: [], markedAt: Date.now() },
132+
deferredSurface: { kind: 'stabilize', action: 'scroll', positionals: [], markedAt: Date.now() },
133133
});
134134
assert.equal(
135135
isLocalIosRunnerSession(pending, { skipPendingPostGestureStabilization: false }),

‎src/daemon/__tests__/generic-settle.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ vi.mock('../interaction/index.ts', async (importOriginal) => {
4040

4141
import { captureSnapshotForSession } from '../interaction/index.ts';
4242
import { dispatchGenericCommand } from '../request-generic-dispatch.ts';
43+
import { pendingSurfaceStabilization } from '../deferred-interaction-outcome.ts';
4344

4445
const mockCaptureSnapshotForSession = vi.mocked(captureSnapshotForSession);
4546

@@ -98,7 +99,7 @@ async function emulateCaptureSnapshotForSession(
9899
) {
99100
captureObservations.push({
100101
postGestureStabilizationPending:
101-
sessionStore.requireCurrent(ref).postGestureStabilization !== undefined,
102+
pendingSurfaceStabilization(sessionStore.requireCurrent(ref)) !== undefined,
102103
});
103104
const effectiveFlags = { ...(flags ?? {}), snapshotInteractiveOnly: options.interactiveOnly };
104105
// Same rule the real seam applies: a request-bound capture is the tree this request reads, and

0 commit comments

Comments
 (0)