fix(remote): stabilize shared control and terminal parking (#11656)
* fix(remote): stabilize shared control and terminal parking * fix(remote): harden parking review edge cases * fix(terminal): restore parked local floating buffer * fix(ci): drop superseded paired parking evidence * fix(terminal): preserve floating park watchers * fix(ci): include web client in paired e2e artifact * fix(ci): reuse renderer build for paired e2e
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import type { parseRemoteRuntimeRpcFrame } from './remote-runtime-request-frames'
|
||||
import { logUnknownSharedControlResponse } from './remote-runtime-shared-control-diagnostics-log'
|
||||
import {
|
||||
handleSharedControlLogicalResponse,
|
||||
sendSharedControlCleanupRequest
|
||||
} from './remote-runtime-shared-control-subscriptions'
|
||||
import type { SharedControlRetiredRequestIds } from './remote-runtime-shared-control-retired-request-ids'
|
||||
import { sendRetiredSharedControlCleanupRequest } from './remote-runtime-shared-control-subscription-close'
|
||||
import { handleSharedControlLogicalResponse } from './remote-runtime-shared-control-subscriptions'
|
||||
import {
|
||||
refreshSharedControlPendingRequestTimeouts,
|
||||
resolveSharedControlPendingResponse
|
||||
@@ -20,6 +19,7 @@ export function dispatchSharedControlFrame(args: {
|
||||
frame: SharedControlFrame
|
||||
pendingRequests: Map<string, SharedControlPendingRequest<unknown>>
|
||||
subscriptions: Map<string, SharedControlLogicalSubscription<unknown>>
|
||||
retiredRequestIds: SharedControlRetiredRequestIds
|
||||
deviceToken: string
|
||||
send: (payload: unknown) => boolean
|
||||
}): void {
|
||||
@@ -36,18 +36,27 @@ export function dispatchSharedControlFrame(args: {
|
||||
subscription,
|
||||
response,
|
||||
request: (method, params) =>
|
||||
sendSharedControlCleanupRequest({
|
||||
sendRetiredSharedControlCleanupRequest({
|
||||
retiredRequestIds: args.retiredRequestIds,
|
||||
deviceToken: args.deviceToken,
|
||||
method,
|
||||
params,
|
||||
send: args.send
|
||||
})
|
||||
})
|
||||
if (!args.subscriptions.has(response.id)) {
|
||||
args.retiredRequestIds.retire(response.id)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (args.pendingRequests.has(response.id)) {
|
||||
resolveSharedControlPendingResponse(args.pendingRequests, response.id, response)
|
||||
args.retiredRequestIds.retire(response.id)
|
||||
return
|
||||
}
|
||||
|
||||
if (args.retiredRequestIds.has(response.id)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user