From 174f381d8a40221f2866030867d123fdb2818096 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:40:20 -0700 Subject: [PATCH] perf(runtime): reuse terminal title during summary build --- src/main/runtime/orca-runtime.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/runtime/orca-runtime.ts b/src/main/runtime/orca-runtime.ts index 6f80739e757..6b92ee00acc 100644 --- a/src/main/runtime/orca-runtime.ts +++ b/src/main/runtime/orca-runtime.ts @@ -33049,6 +33049,7 @@ export class OrcaRuntimeService { const tab = this.tabs.get(leaf.tabId) ?? null const pty = leaf.ptyId ? this.ptysById.get(leaf.ptyId) : undefined + const title = getLatestLeafTitle(leaf, tab?.title ?? null) // Why: leaf.connected mirrors the renderer graph (`ptyId !== null`), so a // restored surface whose PTY died with a prior run still reads connected. // Demote only on a controller-proven absence, and only for locally-scoped @@ -33074,7 +33075,7 @@ export class OrcaRuntimeService { branch: worktree?.branch ?? '', tabId: leaf.tabId, leafId: leaf.leafId, - title: getLatestLeafTitle(leaf, tab?.title ?? null), + title, connected: provenAbsent ? false : leaf.connected, writable: provenAbsent ? false : leaf.writable, lastOutputAt: leaf.lastOutputAt, @@ -33084,7 +33085,7 @@ export class OrcaRuntimeService { ...this.resolvePaneAgentIdentityField( pty?.launchAgent, pty?.foregroundAgent, - getLatestLeafTitle(leaf, tab?.title ?? null) + title ) } } @@ -35045,6 +35046,7 @@ export class OrcaRuntimeService { worktreesById: Map ): RuntimeTerminalSummary { const worktree = worktreesById.get(pty.worktreeId) + const title = getLatestPtyTitle(pty) const pane = parsePaneKey(pty.paneKey ?? '') const orphaned = !pty.tabId || !pane || pane.tabId !== pty.tabId @@ -35058,7 +35060,7 @@ export class OrcaRuntimeService { branch: worktree?.branch ?? '', tabId: orphaned ? `pty:${pty.ptyId}` : pty.tabId!, leafId: orphaned ? `pty:${pty.ptyId}` : pane.leafId, - title: getLatestPtyTitle(pty), + title, connected: pty.connected, writable: pty.connected, lastOutputAt: pty.lastOutputAt, @@ -35068,7 +35070,7 @@ export class OrcaRuntimeService { ...this.resolvePaneAgentIdentityField( pty.launchAgent, pty.foregroundAgent, - getLatestPtyTitle(pty) + title ) } }