The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
Revert "fix(desktop): keep popped Browser tabs out of docked closes after the session-scope rebase"
teknium1bed3ae12ff45
diff --git a/apps/desktop/src/app/model-picker-overlay.test.tsx b/apps/desktop/src/app/model-picker-overlay.test.tsxindex c48a0b40a43..347fa6b8c64 100644--- a/apps/desktop/src/app/model-picker-overlay.test.tsx+++ b/apps/desktop/src/app/model-picker-overlay.test.tsx@@ -17,20 +17,9 @@ import { ModelPickerOverlay } from './model-picker-overlay'const $focusedTreePaneId = $focusedTreePaneIdMock as unknown as WritableAtom<null | string>vi.mock('@/store/session-focus', async () => {- const { atom, computed } = await import('nanostores')- const { $selectedStoredSessionId } = await import('@/store/session')- const TILE_PANE_PREFIX = 'session-tile:'- const $focusedTreePaneId = atom<null | string>(null)+ const { atom } = await import('nanostores')- // Only the tree focus is driven by the test; the session derivations stay real.- return {- $focusedSessionIsTile: computed($focusedTreePaneId, active => Boolean(active?.startsWith(TILE_PANE_PREFIX))),- $focusedStoredSessionId: computed([$focusedTreePaneId, $selectedStoredSessionId], (active, selected) =>- active?.startsWith(TILE_PANE_PREFIX) ? active.slice(TILE_PANE_PREFIX.length) : selected- ),- $focusedTreePaneId,- TILE_PANE_PREFIX- }+ return { $focusedTreePaneId: atom<null | string>(null) }})vi.mock('@/hermes', async importOriginal => ({...(await importOriginal<Record<string, unknown>>()),diff --git a/apps/desktop/src/store/preview.ts b/apps/desktop/src/store/preview.tsindex e06e0570f4b..7a8eb148e35 100644--- a/apps/desktop/src/store/preview.ts+++ b/apps/desktop/src/store/preview.ts@@ -988,14 +988,14 @@ export function closeBrowserPreviewMatchingLiveUrl(...candidates: string[]): booreturn true}-function closePreviewMatchingTabs(tabs: readonly PreviewTab[], candidates: string[]): boolean {+function closePreviewMatchingTabs(candidates: string[]): boolean {const queries = [...new Set(candidates.map(value => value.trim()).filter(Boolean))]if (queries.length === 0) {return false}- const tab = tabs.find(item => {+ const tab = $visiblePreviewTabs.get().find(item => {const fields = [item.target.source, item.target.url, item.target.label]return queries.some(query => fields.includes(query))@@ -1014,18 +1014,13 @@ function closePreviewMatchingTabs(tabs: readonly PreviewTab[], candidates: strin* Empty candidates are a no-op so a missed match cannot wipe the rail —* closing the whole pane is `closeRightRail`. */export function closePreviewMatching(...candidates: string[]): boolean {- return closePreviewMatchingTabs($visiblePreviewTabs.get(), candidates)+ return closePreviewMatchingTabs(candidates)}/** Agent-driven close is scoped to the docked rail; an independent Browser* window owns popped tabs and must not lose its backing state here. */export function closeDockedPreviewMatching(...candidates: string[]): boolean {- const popped = $poppedBrowserTabIds.get()-- return closePreviewMatchingTabs(- $visiblePreviewTabs.get().filter(tab => !popped.has(tab.id)),- candidates- )+ return closePreviewMatchingTabs(candidates)}/** Artifact tabs can't outlive the registry they read from, so clearing itdiff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.jsonindex 9cb5a073e70..52c608cc202 100644--- a/locales/_keys.desktop.json+++ b/locales/_keys.desktop.json@@ -2155,7 +2155,6 @@"preview.openPreview","preview.opening","preview.overwrite",- "preview.pin","preview.popIn","preview.popOut","preview.previewAnyway",@@ -2168,7 +2167,6 @@"preview.truncated","preview.unavailable","preview.unknownSize",- "preview.unpin","preview.unsavedChanges","preview.web.addComments","preview.web.address",