Files
archived-orca/src/shared/session-tab-file-host.ts
T
Kelvin Amoaba 162ea19851 fix(browser): stop paired desktops serving mirrored browser tabs back to their host (#36447)
When two desktops pair both ways, B mirrored A's browser tab and republished
it in its session inventory under A's workspace and page ids. A applied B's
copy onto its own workspace, so A's local page became B-hosted and showed a
dead Remote browser pane (selector_not_found from B).

Browser rows whose page runs on a paired server now carry
hostRuntimeEnvironmentId, as editor rows do since #33752, so B serves them to
its phone but not to other runtimes.

Fixes #36386
2026-10-30 21:14:06 +00:00

10 lines
490 B
TypeScript

import type { RuntimeMobileSessionFileTab } from './runtime-mobile-session-tab-contracts'
/** Names the paired server a row's file or page lives on, for runtimes to keep from other runtimes (#33424). */
export function editorRowHost(file: {
runtimeEnvironmentId?: string | null
}): Pick<RuntimeMobileSessionFileTab, 'hostRuntimeEnvironmentId'> {
const hostRuntimeEnvironmentId = file.runtimeEnvironmentId?.trim()
return hostRuntimeEnvironmentId ? { hostRuntimeEnvironmentId } : {}
}