From 54541d790fc3277bc572a45752cbc77ce919ae89 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 16 Oct 2026 01:39:43 -0700 Subject: [PATCH] fix(runtime): route the scrollback read by the tab's own host, never the focused one (D1b-6d-1) --- .../src/runtime/host-terminal-scrollback-hydration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/runtime/host-terminal-scrollback-hydration.ts b/src/renderer/src/runtime/host-terminal-scrollback-hydration.ts index 1dc2404c4d8..cddcd14ec03 100644 --- a/src/renderer/src/runtime/host-terminal-scrollback-hydration.ts +++ b/src/renderer/src/runtime/host-terminal-scrollback-hydration.ts @@ -2,7 +2,7 @@ import type { TerminalLayoutSnapshot } from '../../../shared/terminal-tab-types' import type { SessionReadTerminalScrollbackResult } from '../../../shared/rpc-contract/session-terminal-scrollback-params' import { SESSION_TERMINAL_SCROLLBACK_READ_RUNTIME_CAPABILITY } from '../../../shared/session-tabs-runtime-capabilities' import { useAppStore } from '@/store' -import { getRuntimeEnvironmentIdForWorktree } from '@/lib/worktree-runtime-owner' +import { getExplicitRuntimeEnvironmentIdForWorktree } from '@/lib/worktree-runtime-owner' import { callRuntimeRpc, peekRuntimeEnvironmentCapability, @@ -62,7 +62,7 @@ const defaultDeps: HostTerminalScrollbackHydrationDeps = { } }, resolveEnvironmentId: (worktreeId) => - getRuntimeEnvironmentIdForWorktree(useAppStore.getState(), worktreeId), + getExplicitRuntimeEnvironmentIdForWorktree(useAppStore.getState(), worktreeId), hasLocalSnapshot: (ref) => { try { return window.api.session.hasTerminalScrollback({ ref })