Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
refactor(desktop-app): unify the command-center into the title bar on every route (F2b)
Diego Zacariasa150285a6928
diff --git a/desktop-app/test/browser/responsiveUtilityGutter.browser.test.ts b/desktop-app/test/browser/responsiveUtilityGutter.browser.test.tsindex 7db1469d9..9daaf914e 100644--- a/desktop-app/test/browser/responsiveUtilityGutter.browser.test.ts+++ b/desktop-app/test/browser/responsiveUtilityGutter.browser.test.ts@@ -10,7 +10,6 @@ type HeaderGeometry = {appsPaddingRight: numbermountedPaddingRight: numberpagePaddingRight: number- searchWidth: number}let browser: Browser | undefined@@ -22,16 +21,16 @@ function launchOptions() {return { headless: true }}-async function headerGeometry(- width: number,- drawerOpen = false,- searchOpen = false-): Promise<HeaderGeometry> {+// The command-center (global-search) now lives in the window title bar on every+// route, so the content panel and its headers reserve NO base gutter for it —+// that fixture is deliberately absent here. The only horizontal reservation left+// in the panel is the apps notification drawer's rail, applied to the page while+// the drawer is open, which is what this geometry measures.+async function headerGeometry(width: number, drawerOpen = false): Promise<HeaderGeometry> {if (!browser) throw new Error('Browser must launch before measuring responsive utility geometry')const page = await browser.newPage({ viewport: { width, height: 800 } })await page.setContent(`<div class="content-panel${drawerOpen ? ' content-panel--app-notification-drawer-open' : ''}">- <div class="top-bar"><div class="header-left"><div class="global-search${searchOpen ? ' is-open' : ''}"></div></div></div><section class="page"><header class="apps-page-header">Apps</header><header class="sandbox-ui-mounted-header"><button>Back</button></header>@@ -41,13 +40,12 @@ async function headerGeometry(await page.addStyleTag({ path: path.join(UI_ROOT, 'styles/tokens.css') })await page.addStyleTag({ path: path.join(UI_ROOT, 'styles.css') })const geometry = await page.evaluate(() => {- const number = (selector: string, property: 'paddingRight' | 'width') =>- Number.parseFloat(getComputedStyle(document.querySelector(selector)!)[property])+ const number = (selector: string) =>+ Number.parseFloat(getComputedStyle(document.querySelector(selector)!).paddingRight)return {- appsPaddingRight: number('.apps-page-header', 'paddingRight'),- mountedPaddingRight: number('.sandbox-ui-mounted-header', 'paddingRight'),- pagePaddingRight: number('.page', 'paddingRight'),- searchWidth: number('.global-search', 'width'),+ appsPaddingRight: number('.apps-page-header'),+ mountedPaddingRight: number('.sandbox-ui-mounted-header'),+ pagePaddingRight: number('.page'),}})await page.close()@@ -63,30 +61,30 @@ describe('responsive utility gutter', () => {await browser?.close()})- it('uses the compact closed-header reservation at tablet widths and retains drawer-open space', async () => {+ it('reserves the apps notification-drawer rail only while open, never a base gutter', async () => {const closed = await headerGeometry(1100)const open = await headerGeometry(1100, true)- const searchExpanded = await headerGeometry(1100, false, true)- // Idle, the global-search collapses to the 40px magnifier; it grows to its- // tablet expanded width (clamp(160px, 32vw, …) = 352px at 1100) only on- // focus/open. The utility gutter still reserves for the *expanded* search- // (352 + space-2 + 36 = 398) so expansion never collides with page content.- expect(closed.searchWidth).toBe(40)- expect(searchExpanded.searchWidth).toBe(352)- expect(closed.mountedPaddingRight).toBe(398)- expect(closed.mountedPaddingRight).toBeLessThan(open.pagePaddingRight)+ // Closed: no base gutter on the mounted-app header (search is in the title+ // bar). Open: the page reserves the drawer rail and the mounted-app header+ // sits flush against it (its own padding stays 0).+ expect(closed.mountedPaddingRight).toBe(0)expect(open.mountedPaddingRight).toBe(0)expect(open.pagePaddingRight).toBe(466)})- it('retains mobile zero-reservation and the wide desktop utility budget', async () => {+ it('reserves no base utility gutter at any width, mobile or wide desktop', async () => {const mobile = await headerGeometry(900)const desktop = await headerGeometry(1221)+ // With search in the title bar, neither the apps picker header nor the+ // mounted-app header pads a base gutter at any width — the responsive+ // "utility budget" that reserved space for the floating in-panel search is+ // retired. Regression guard: re-introducing a floating in-panel search would+ // make one of these non-zero again.expect(mobile.appsPaddingRight).toBe(0)expect(mobile.mountedPaddingRight).toBe(0)- expect(desktop.appsPaddingRight).toBe(466)- expect(desktop.mountedPaddingRight).toBe(466)+ expect(desktop.appsPaddingRight).toBe(0)+ expect(desktop.mountedPaddingRight).toBe(0)})})diff --git a/desktop-app/ui/src/App.tsx b/desktop-app/ui/src/App.tsxindex a36ccc3e2..661e93ed0 100644--- a/desktop-app/ui/src/App.tsx+++ b/desktop-app/ui/src/App.tsx@@ -2045,11 +2045,7 @@ export function App() {ref={contentPanelRef}className={`content-panel glass-card${isAgentChatView ? ' content-panel--agent-chat' : ''- }${vm.navItem === DESKTOP_ROUTES.settings ? ' content-panel--settings' : ''}${- vm.navItem === DESKTOP_ROUTES.chat- ? ' content-panel--titlebar-actions'- : ''- }${+ }${vm.navItem === DESKTOP_ROUTES.settings ? ' content-panel--settings' : ''} content-panel--titlebar-actions${appNotificationDrawerOpen? ' content-panel--app-notification-drawer-open': ''@@ -2069,22 +2065,13 @@ export function App() {: undefined}>- {vm.navItem === DESKTOP_ROUTES.chat ? (- <TitlebarActionsPortal container={titlebarActionsRoot}>- <AppHeader- placement="titlebar"- searchFocusRequestId={globalSearchFocusRequestId}- notificationOpenRequestId={notificationOpenRequestId}- notificationTrayMode={- notificationTrayUsesDrawer ? 'drawer' : 'overlay'- }- notificationTrayReady={notificationDrawerReady}- onNotificationTrayOpenChange={setHeaderNotificationTrayOpen}- onShellOverlayOpenChange={setHeaderShellOverlayOpen}- />- </TitlebarActionsPortal>- ) : (+ {/* Every route mounts the command-center header in the+ window title bar via the same portal — the search+ pill and notification bell live in the title bar on+ all routes, never floating inline over the panel. */}+ <TitlebarActionsPortal container={titlebarActionsRoot}><AppHeader+ placement="titlebar"searchFocusRequestId={globalSearchFocusRequestId}notificationOpenRequestId={notificationOpenRequestId}notificationTrayMode={@@ -2094,7 +2081,7 @@ export function App() {onNotificationTrayOpenChange={setHeaderNotificationTrayOpen}onShellOverlayOpenChange={setHeaderShellOverlayOpen}/>- )}+ </TitlebarActionsPortal><ToastStack items={vm.toasts} />{vm.navItem === DESKTOP_ROUTES.chat && (<ChatViewWorkspacediff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 67b847a93..1d3e0cc40 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -760,7 +760,10 @@ h3 {.notification-menu--app-drawer {position: fixed;- top: calc(var(--space-4) + 36px + var(--space-2));+ /* Anchored just below the window title bar, where the notification bell now+ lives on every route, so the drawer opens flush under the bell instead of+ floating over the panel. */+ top: calc(var(--window-titlebar-height) + var(--space-2));right: var(--space-4);bottom: var(--space-4);width: var(--app-notification-drawer-width);@@ -2569,7 +2572,6 @@ h3 {flex: 0 0 auto;display: grid;gap: 4px;- padding-right: clamp(480px, 54vw, 620px);}.page-header h2 {@@ -11914,7 +11916,6 @@ pre {display: grid;gap: var(--space-2);justify-items: start;- padding-right: var(--app-header-utilities-width);}.apps-page-header-text h2 {@@ -12784,8 +12785,10 @@ pre {}}-/* Tight single-row header for the mounted sandbox-ui app view. Keep the- Close button away from the absolute global top-bar controls. */+/* Tight single-row header for the mounted sandbox-ui app view. The command+ center now lives in the window title bar (not floating over the panel), so+ this row spans the full width; the notification-drawer-open state reserves+ the right rail on the page instead (see below). */.sandbox-ui-mounted-header {display: flex;align-items: center;@@ -12795,7 +12798,6 @@ pre {gap: var(--space-2);min-width: 0;padding-top: var(--space-4);- padding-right: var(--app-header-utilities-width);}.sandbox-ui-conversation-btn,@@ -13177,17 +13179,6 @@ pre {--global-search-expanded: clamp(160px, 32vw, var(--app-notification-drawer-width));--global-search-expanded-min: 160px;}-- .apps-page-header {- padding-right: 0;- }-}--@media (max-width: 900px) {- .apps-page-header,- .sandbox-ui-mounted-header {- padding-right: 0;- }}.window-titlebar__actions .search-input {