docs(runtime): say why resolveLiveLeafForHandle re-links before lookup

This commit is contained in:
Jinwoo-H
2026-09-08 03:21:19 -04:00
parent 8d467b9ca0
commit e66701778b
@@ -109,6 +109,8 @@ export class OrcaRuntimeWithSerializeHeadlessTerminalBuffer extends OrcaRuntimeW
// still awaiting their first PTY (ptyId null) may adopt it, which preserves
// the mobile pre-spawn subscribe flow.
resolveLiveLeafForHandle(handle: string): { ptyId: string | null } | null {
// Why the discarded call: it re-links a runtime-owned handle whose `handles` record a renderer
// reload cleared, so the lookup below sees it; without it a phone's held handle inspects nothing.
this.getLivePtyForHandle(handle)
const record = this.handles.get(handle)
if (!record) {