Skip to content

The agent that grows with you

fix(desktop): focus_pane un-minimizes the tree zone for every revealer

Teknium75a6fac052c6
diff --git a/apps/desktop/src/store/pane-focus.test.ts b/apps/desktop/src/store/pane-focus.test.ts
index 192a6d94188..7268951bc34 100644
--- a/apps/desktop/src/store/pane-focus.test.ts
+++ b/apps/desktop/src/store/pane-focus.test.ts
@@ -31,6 +31,13 @@ describe('revealDesktopPane', () => {
expect(setTerminalTakeover).toHaveBeenCalledWith(true)
})
+ it('also un-minimizes the tree pane, since a same-value store set is a no-op', () => {
+ for (const pane of ['files', 'review', 'sessions', 'terminal']) {
+ revealDesktopPane(pane)
+ expect(revealTreePane).toHaveBeenCalledWith(pane)
+ }
+ })
+
it('returns false for an unknown pane and touches nothing', () => {
expect(revealDesktopPane('nope')).toBe(false)
expect(revealTreePane).not.toHaveBeenCalled()
diff --git a/apps/desktop/src/store/pane-focus.ts b/apps/desktop/src/store/pane-focus.ts
index 46c1a34dfe2..f6470dbc0ac 100644
--- a/apps/desktop/src/store/pane-focus.ts
+++ b/apps/desktop/src/store/pane-focus.ts
@@ -19,6 +19,17 @@ const PANE_REVEALERS: Record<string, () => void> = {
terminal: () => setTerminalTakeover(true)
}
+// The store setters above are same-value no-ops: `$open` already reads true
+// while the pane sits in a zone the user minimized from its chevron, so the
+// listener never fires and the tool reported success over an invisible pane
+// (#106009). An explicit reveal also un-minimizes and fronts the tree pane.
+const TREE_PANE_OF: Record<string, string> = {
+ files: 'files',
+ review: 'review',
+ sessions: 'sessions',
+ terminal: 'terminal'
+}
+
/** Reveal a desktop pane by name. Returns false for an unknown pane. */
export function revealDesktopPane(pane: string): boolean {
const reveal = PANE_REVEALERS[pane]
@@ -29,6 +40,12 @@ export function revealDesktopPane(pane: string): boolean {
reveal()
+ const treePane = TREE_PANE_OF[pane]
+
+ if (treePane) {
+ revealTreePane(treePane)
+ }
+
return true
}