diff --git a/src/renderer/src/runtime/close-mirrored-editor-tab.test.ts b/src/renderer/src/runtime/close-mirrored-editor-tab.test.ts index f95591eb49c..bc4e045e477 100644 --- a/src/renderer/src/runtime/close-mirrored-editor-tab.test.ts +++ b/src/renderer/src/runtime/close-mirrored-editor-tab.test.ts @@ -46,7 +46,9 @@ describe('notifyHostOfMirroredEditorClose', () => { // host snapshot in the dynamic-import gap can't flash the old-path tab back. notifyHostOfMirroredEditorClose(buildState(), 'wt-1', 'file-1') - expect(isWebSessionCloseIntentPending('wt-1', toHostSessionTabId('host-tab-1'), now)).toBe(true) + expect( + isWebSessionCloseIntentPending('env-1', 'wt-1', toHostSessionTabId('host-tab-1'), now) + ).toBe(true) }) it('closes the mirrored editor tab on the host using the host tab id', async () => { diff --git a/src/renderer/src/runtime/close-mirrored-editor-tab.ts b/src/renderer/src/runtime/close-mirrored-editor-tab.ts index 1dbd1fbf3a4..1030a13c920 100644 --- a/src/renderer/src/runtime/close-mirrored-editor-tab.ts +++ b/src/renderer/src/runtime/close-mirrored-editor-tab.ts @@ -40,7 +40,12 @@ export function notifyHostOfMirroredEditorClose( } // Record the close intent SYNCHRONOUSLY so a host snapshot landing before the dynamic import below resolves can't // flash the old-path tab back. closeWebRuntimeSessionTab re-records it idempotently. - recordWebSessionCloseIntent(worktreeId, toHostSessionTabId(unifiedTab.id), Date.now()) + recordWebSessionCloseIntent( + runtimeEnvironmentId, + worktreeId, + toHostSessionTabId(unifiedTab.id), + Date.now() + ) // Dynamic import: this helper is imported by the editor slice during store creation, so importing // web-runtime-session eagerly imports the store back and trips cyclic init in full-suite import order. void import('./web-runtime-session').then(({ closeWebRuntimeSessionTab }) =>