@@ -4,7 +4,6 @@ import type {
44 HoverCommandResult ,
55 LongPressCommandResult ,
66 PressCommandResult ,
7- ReadinessWaitEvidence ,
87 RecordingTargetOverride ,
98 ResolutionDisclosure ,
109 SettleObservation ,
@@ -173,8 +172,6 @@ export function buildInteractionResponseData(params: {
173172 * Only attached when the settle observation actually carries a diff.
174173 */
175174 settleRefsGeneration ?: number ;
176- /** A wait the request already spent before this dispatch (the replay step's pre-dispatch gate). */
177- carriedReadiness ?: ReadinessWaitEvidence ;
178175} ) : InteractionResponsePayloads {
179176 const { source, referenceFrame, extra } = params ;
180177 if ( source . kind === 'runner-payload' || source . kind === 'corroborated-tap' ) {
@@ -237,25 +234,10 @@ export function buildInteractionResponseData(params: {
237234 visualization . warning = warning ;
238235 responseData . warning = warning ;
239236 }
240- const readiness = combineReadinessWaits (
241- 'readiness' in result ? result . readiness : undefined ,
242- params . carriedReadiness ,
243- ) ;
244- if ( readiness ) responseData . readiness = readiness ;
237+ if ( 'readiness' in result && result . readiness ) responseData . readiness = result . readiness ;
245238 return { result : visualization , responseData, ...recordedTargetCapture ( result ) } ;
246239}
247240
248- function combineReadinessWaits (
249- ...waits : Array < ReadinessWaitEvidence | undefined >
250- ) : ReadinessWaitEvidence | undefined {
251- const spent = waits . filter ( ( wait ) : wait is ReadinessWaitEvidence => wait !== undefined ) ;
252- if ( spent . length === 0 ) return undefined ;
253- return {
254- polls : spent . reduce ( ( total , wait ) => total + wait . polls , 0 ) ,
255- waitedMs : spent . reduce ( ( total , wait ) => total + wait . waitedMs , 0 ) ,
256- } ;
257- }
258-
259241function recordedTargetCapture (
260242 result : InteractionRuntimeResult ,
261243) : Pick < InteractionResponsePayloads , 'recordedTarget' > {
@@ -330,7 +312,6 @@ export async function buildTargetedTouchResponsePayloads(params: {
330312 extra,
331313 staleRefsWarning : params . staleRefsWarning ,
332314 settleRefsGeneration : issueSettleRefs ( session , result . settle ) ,
333- carriedReadiness : handlerParams . req . internal ?. replayReadinessWait ,
334315 } ) ;
335316}
336317
0 commit comments