Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop): r3-m1 preserve titlebar landmark semantics
Josué342bd1145947
diff --git a/desktop-app/ui/src/components/AppHeader/__tests__/searchCollapse.test.tsx b/desktop-app/ui/src/components/AppHeader/__tests__/searchCollapse.test.tsxindex d611bc93b..741855df3 100644--- a/desktop-app/ui/src/components/AppHeader/__tests__/searchCollapse.test.tsx+++ b/desktop-app/ui/src/components/AppHeader/__tests__/searchCollapse.test.tsx@@ -1,7 +1,9 @@// @vitest-environment jsdom+import React from 'react'import { afterEach, describe, expect, it, vi } from 'vitest'import { cleanup, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'+import { TitlebarActionsPortal, WindowTitleBar } from '@components/WindowTitleBar'import { AppHeader } from '../index'// The titlebar search opens its reusable results surface on focus, even before@@ -133,4 +135,31 @@ describe('AppHeader global search idle collapse', () => {expect(screen.getByRole('textbox', { name: 'Search' })).toBe(document.activeElement)expect(screen.getByText('Search agents, connectors, plugins or apps...')).toBeTruthy()})++ it('keeps titlebar actions out of a second banner while preserving the default banner', async () => {+ function TitlebarHarness() {+ const [actionsRoot, setActionsRoot] = React.useState<HTMLDivElement | null>(null)++ return (+ <div className="app-frame">+ <WindowTitleBar actionsRef={setActionsRoot} />+ <div className="app-root">+ <section className="content-panel">+ <TitlebarActionsPortal container={actionsRoot}>+ <AppHeader placement="titlebar" />+ </TitlebarActionsPortal>+ </section>+ </div>+ </div>+ )+ }++ const titlebar = render(<TitlebarHarness />)+ await screen.findByRole('textbox', { name: 'Search' })+ expect(screen.getAllByRole('banner')).toHaveLength(1)+ titlebar.unmount()++ render(<AppHeader />)+ expect(screen.getAllByRole('banner')).toHaveLength(1)+ })})diff --git a/desktop-app/ui/src/components/HeaderActions/index.tsx b/desktop-app/ui/src/components/HeaderActions/index.tsxindex 1a21cbffb..1868d20d0 100644--- a/desktop-app/ui/src/components/HeaderActions/index.tsx+++ b/desktop-app/ui/src/components/HeaderActions/index.tsx@@ -455,8 +455,10 @@ export const HeaderActions = React.memo(function HeaderActions({void ensurePluginsAppsLoaded()}, [ensurePluginsAppsLoaded, hasSearch, searchOpen])+ const Container = titlebarPlacement ? 'div' : 'header'+return (- <header className={`top-bar${titlebarPlacement ? ' top-bar--titlebar' : ''}`}>+ <Container className={`top-bar${titlebarPlacement ? ' top-bar--titlebar' : ''}`}><div className="header-left"><divclassName={`global-search${titlebarPlacement ? ' global-search--titlebar' : ''}${@@ -946,6 +948,6 @@ export const HeaderActions = React.memo(function HeaderActions({)}</div></div>- </header>+ </Container>)})