The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): keep titleBar.center in one permanent slot
686f6c6143ab8c91a0f3
diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsxindex 684c22d916a..0b7b39215ad 100644--- a/apps/desktop/src/app/contrib/controller.tsx+++ b/apps/desktop/src/app/contrib/controller.tsx@@ -39,7 +39,6 @@ import {import { $workspaceOwnerLabels, workspaceOwnerTitle } from '@/components/pane-shell/workspace-scope'import { SidebarProvider } from '@/components/ui/sidebar'import { discoverBundledPlugins } from '@/contrib/plugins'-import { Slot } from '@/contrib/react/slot'import { registry } from '@/contrib/registry'import { discoverRuntimePlugins } from '@/contrib/runtime-loader'import { translateNow } from '@/i18n'@@ -475,10 +474,6 @@ const syncWorkspaceTitle = () => {tabTitle: stored ? undefined : () => <SessionDraftTitle scope={selected} />,// Pages aren't tab-able: the main zone's bar stands down while one shows.headerVeto: $workspaceIsPage.get(),- headerContent:- $workspaceIsPage.get() && registry.getArea('titleBar.center').length- ? () => <Slot area="titleBar.center" />- : undefined,placement: 'main',minWidth: '22vw',tabDrag: workspaceTabDrag,@@ -494,7 +489,6 @@ $sessions.listen(syncWorkspaceTitle)$botChatScopes.listen(syncWorkspaceTitle)$workspaceOwnerLabels.listen(syncWorkspaceTitle)$workspaceIsPage.listen(syncWorkspaceTitle)-registry.subscribeArea('titleBar.center', syncWorkspaceTitle)// Layout reset collapses every session tile into main as a tab (after the// workspace) instead of re-scattering them — pre-placed before adoption.diff --git a/apps/desktop/src/app/shell/titlebar-controls.test.tsx b/apps/desktop/src/app/shell/titlebar-controls.test.tsxindex ecf57bdc127..c67744a31c7 100644--- a/apps/desktop/src/app/shell/titlebar-controls.test.tsx+++ b/apps/desktop/src/app/shell/titlebar-controls.test.tsx@@ -89,16 +89,16 @@ describe('TitlebarControls fixed clusters', () => {expect(pluginTool()).not.toBeNull()})- it('leaves page titles to the workspace header without hiding window controls', () => {+ it('keeps titleBar.center in the titlebar on a workspace page', () => {const disposeTitle = registry.register({area: 'titleBar.center',id: 'test-page-title',- render: () => <span>Board picker</span>+ render: () => <span>plugin-center</span>})try {- renderControls('/kanban')- expect(screen.queryByText('Board picker')).toBeNull()+ renderControls('/skills')+ expect(screen.getByText('plugin-center')).not.toBeNull()expect(windowControls()).not.toBeNull()expect(appControls()).not.toBeNull()} finally {diff --git a/apps/desktop/src/app/shell/titlebar-controls.tsx b/apps/desktop/src/app/shell/titlebar-controls.tsxindex 52bdf793661..b1b48e483e1 100644--- a/apps/desktop/src/app/shell/titlebar-controls.tsx+++ b/apps/desktop/src/app/shell/titlebar-controls.tsx@@ -27,7 +27,7 @@ import {import { $unreadSessionCount } from '@/store/session-dot-state'import { $titlebarAppActionsSide } from '@/store/titlebar-app-actions'-import { appViewForPath, hidesFixedTitlebarClusters, isOverlayView, isWorkspacePageRoute } from '../routes'+import { appViewForPath, hidesFixedTitlebarClusters, isOverlayView } from '../routes'import {TITLEBAR_CHROME_CHANGED_EVENT,@@ -150,7 +150,6 @@ export function TitlebarControls({ leftTools = [], tools = [], onOpenSettings }:// actively projecting chrome into the band right now.const titleBarLeft = useContributions('titleBar.left')const titleBarRight = useContributions('titleBar.right')- const workspacePage = isWorkspacePageRoute(location.pathname)const pageOwnsTitlebar = titleBarLeft.length + titleBarRight.length > 0// POSITIONAL toggles: each button shows/hides everything on its physical@@ -309,7 +308,7 @@ export function TitlebarControls({ leftTools = [], tools = [], onOpenSettings }:<TitlebarToolButton key={tool.id} navigate={navigate} tool={tool} />))}<Slot area="titleBar.left" />- {!workspacePage && <Slot area="titleBar.center" />}+ <Slot area="titleBar.center" /></div>{visiblePaneTools.length > 0 && (diff --git a/apps/desktop/src/plugins/kanban/board-switcher.tsx b/apps/desktop/src/plugins/kanban/board-switcher.tsxindex cbc18f69e20..0f5d1094666 100644--- a/apps/desktop/src/plugins/kanban/board-switcher.tsx+++ b/apps/desktop/src/plugins/kanban/board-switcher.tsx@@ -1,6 +1,5 @@/**- * Board switcher projected through `titleBar.center` into the workspace- * panel's tab-header space while the board page is mounted.+ * Board switcher projected through `titleBar.center` (permanent titlebar slot).*/import {