From 5af1c6d97a16b40e2c07c626ddbb363461b2be5b Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sun, 27 Sep 2026 12:37:39 -0700 Subject: [PATCH] fix(mobile): a re-derived frame does not infer renderer retirements from its older frame --- src/main/runtime/orca-runtime-sync-mobile-session-tabs.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/runtime/orca-runtime-sync-mobile-session-tabs.ts b/src/main/runtime/orca-runtime-sync-mobile-session-tabs.ts index efe372dc3fc..4794145f9f4 100644 --- a/src/main/runtime/orca-runtime-sync-mobile-session-tabs.ts +++ b/src/main/runtime/orca-runtime-sync-mobile-session-tabs.ts @@ -249,7 +249,11 @@ export class OrcaRuntimeWithSyncMobileSessionTabs extends OrcaRuntimeWithWriteOr unheldSurfaces.length > 0 ? removeMobileSessionSnapshotTabs(fencedSnapshot, unheldSurfaces) : fencedSnapshot - this.releaseRuntimeSessionOwnershipForRendererRetiredTabs(mergedSnapshot, existing) + // Why: a replay carries no new renderer decision, so a tab missing from its older frame (a + // phone create the desktop has not published yet) was not retired by the renderer. + if (!rederivedSurface) { + this.releaseRuntimeSessionOwnershipForRendererRetiredTabs(mergedSnapshot, existing) + } const nextSnapshot = this.mergePreservedHeadlessMobileSessionTabs(mergedSnapshot, existing) // Why: clients drop same-epoch frames whose version isn't strictly newer, // and main-local touches may already have emitted a higher version than