The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): hide close affordance on navigation tabs
Calvin Ng34d1aed3f1d8
diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsxindex f14f957c33a..3fd60090965 100644--- a/apps/desktop/src/app/contrib/controller.tsx+++ b/apps/desktop/src/app/contrib/controller.tsx@@ -154,6 +154,7 @@ registry.registerMany([collapsible: true,dock: { pane: 'workspace', pos: 'left' },revealAliases: ['chat-sidebar'],+ showCloseButton: false,width: `${SIDEBAR_DEFAULT_WIDTH}px`,minWidth: `${SIDEBAR_DEFAULT_WIDTH}px`,maxWidth: `${SIDEBAR_MAX_WIDTH}px`diff --git a/apps/desktop/src/components/pane-shell/tree/renderer/track-model.ts b/apps/desktop/src/components/pane-shell/tree/renderer/track-model.tsindex 57652df418f..dd719f16a99 100644--- a/apps/desktop/src/components/pane-shell/tree/renderer/track-model.ts+++ b/apps/desktop/src/components/pane-shell/tree/renderer/track-model.ts@@ -65,6 +65,8 @@ interface PaneChrome extends PaneSizing {/** No Close in the tab menu — the one surface the app can't lose (the* main workspace). Session tiles share `placement: 'main'` but close. */uncloseable?: boolean+ /** Hide the hover ✕ while retaining explicit close behavior for this pane. */+ showCloseButton?: boolean/** Wrap this pane's TAB (e.g. in a domain context menu — a session tile's* pin/branch/rename/archive/delete). The wrapper must render `tab` as its* interactive child; the zone's own strip menu still owns non-tab space. */diff --git a/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx b/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsxindex 638cad093b9..9b26cb13929 100644--- a/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx+++ b/apps/desktop/src/components/pane-shell/tree/renderer/tree-group.tsx@@ -539,6 +539,7 @@ export function TreeGroup({}}role="tab"selected={isSelected}+ showCloseButton={chrome.showCloseButton !== false}style={{ cursor: 'grab' }}>{chrome.tabLead ? (diff --git a/apps/desktop/src/components/ui/pane-tab.test.tsx b/apps/desktop/src/components/ui/pane-tab.test.tsxindex f76ed4142b2..2ada280145d 100644--- a/apps/desktop/src/components/ui/pane-tab.test.tsx+++ b/apps/desktop/src/components/ui/pane-tab.test.tsx@@ -124,6 +124,21 @@ describe('PaneTab hover close button', () => {expect(screen.queryByRole('button', { name: 'Close' })).toBeNull()})+ it('can hide the hover ✕ while retaining the close handler', () => {+ const onClose = vi.fn()+ render(+ <PaneTab onClose={onClose} showCloseButton={false}>+ <PaneTabLabel>tab</PaneTabLabel>+ </PaneTab>+ )++ expect(screen.queryByRole('button', { name: 'Close' })).toBeNull()+ const tab = screen.getByText('tab')+ fireEvent.pointerDown(tab, { button: 1 })+ fireEvent.pointerUp(tab, { button: 1 })+ expect(onClose).toHaveBeenCalledTimes(1)+ })+it('renders no ✕ on a vertical rail tab (middle/⌘-click only there)', () => {const onClose = vi.fn()render(diff --git a/apps/desktop/src/components/ui/pane-tab.tsx b/apps/desktop/src/components/ui/pane-tab.tsxindex f34c282dc01..c08e98d10b4 100644--- a/apps/desktop/src/components/ui/pane-tab.tsx+++ b/apps/desktop/src/components/ui/pane-tab.tsx@@ -58,6 +58,8 @@ interface PaneTabProps extends React.ComponentProps<'div'> {/** Part of a multi-tab selection (⌥/Ctrl-click, Shift-click) — an accent* wash marks every tab that a drag would carry, Chrome-style. */selected?: boolean+ /** Whether a closeable horizontal tab reveals the hover ✕. */+ showCloseButton?: boolean/** Vertical rail form (collapsed sidebar zones). */vertical?: boolean/** Content-facing edge of a vertical rail — the strip line the active tab cuts. */@@ -81,6 +83,7 @@ export const PaneTab = React.forwardRef<HTMLDivElement, PaneTabProps>(function PonPointerUp,onClickCapture,selected = false,+ showCloseButton = true,vertical = false,side = 'left',children,@@ -159,7 +162,7 @@ export const PaneTab = React.forwardRef<HTMLDivElement, PaneTabProps>(function P<span className="size-2 rounded-full bg-amber-500 shadow-[0_0_0_2px_var(--tab-bg),0_1px_2px_rgba(0,0,0,0.45)] dark:bg-amber-400" /></span>)}- {onClose && !vertical && (+ {onClose && showCloseButton && !vertical && (// Hover ✕, painted OVER the label's right edge as an overlay (no// layout shift, tab width never jumps on hover). The runway is a tiny// transparent→`--tab-face` gradient, so the button melts into thediff --git a/apps/desktop/src/plugins/hermes-bots/plugin.js b/apps/desktop/src/plugins/hermes-bots/plugin.jsindex d013949e266..7fdf85737ba 100644--- a/apps/desktop/src/plugins/hermes-bots/plugin.js+++ b/apps/desktop/src/plugins/hermes-bots/plugin.js@@ -9887,7 +9887,7 @@ export default {// sessions pane collapses alone without this flag. The zone then keeps// a stranded BOTS tab on screen. The narrow edge overlay mirrors the// zone's tab strip, so the pane stays reachable while collapsed.- data: { placement: 'left', width: '260px', collapsible: true, dock: { pane: 'sessions', pos: 'center', enforce: true } },+ data: { placement: 'left', width: '260px', collapsible: true, showCloseButton: false, dock: { pane: 'sessions', pos: 'center', enforce: true } },render: () => jsx(BotsPane, {})})