Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

refactor(desktop-ui): flatten sidebar Resources menu to Agents/Connectors/Plugins

Diego Zacarias3dc7aead74a1
diff --git a/desktop-app/package.json b/desktop-app/package.json
index d8633b0e9..93bb96dfd 100644
--- a/desktop-app/package.json
+++ b/desktop-app/package.json
@@ -23,9 +23,7 @@
"qa:recorder:navigation": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-navigation.spec.ts",
"qa:recorder:agents": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-agents.spec.ts",
"qa:recorder:connectors": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-connectors.spec.ts",
- "qa:recorder:contexts": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-contexts.spec.ts",
"qa:recorder:shared-files": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-shared-files.spec.ts",
- "qa:recorder:teams": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-teams.spec.ts",
"qa:recorder:plugins": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-plugins.spec.ts",
"qa:recorder:apps": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-apps.spec.ts",
"qa:recorder:settings": "npm run build && playwright test --config test/e2e-playwright/playwright.qa-recorder.config.ts qa-recorder-settings.spec.ts",
diff --git a/desktop-app/test/e2e-playwright/navigationHelpers.ts b/desktop-app/test/e2e-playwright/navigationHelpers.ts
index 9e7fda0f7..0c40089d5 100644
--- a/desktop-app/test/e2e-playwright/navigationHelpers.ts
+++ b/desktop-app/test/e2e-playwright/navigationHelpers.ts
@@ -2,6 +2,9 @@ import { type Page, expect } from '@playwright/test'
export async function openResourcesNavItem(page: Page, itemTestId: string): Promise<void> {
const item = page.getByTestId(itemTestId)
+ // Top-level items (e.g. nav-files) are always visible; the data items
+ // (nav-agents / nav-mcp-servers / nav-workflows) now hang directly off the
+ // footer Settings popover — there is no intermediate "Resources" submenu.
if (!(await item.isVisible().catch(() => false))) {
const settingsMenu = page.getByTestId('nav-settings-menu')
await expect(settingsMenu).toBeVisible({ timeout: 15_000 })
@@ -9,12 +12,6 @@ export async function openResourcesNavItem(page: Page, itemTestId: string): Prom
await settingsMenu.click()
}
await expect(settingsMenu).toHaveAttribute('aria-expanded', 'true', { timeout: 15_000 })
-
- const resourcesMenu = page.getByTestId('nav-data-menu')
- await expect(resourcesMenu).toBeVisible({ timeout: 15_000 })
- if (!(await item.isVisible().catch(() => false))) {
- await resourcesMenu.click()
- }
}
await expect(item).toBeVisible({ timeout: 15_000 })
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-contexts.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-contexts.spec.ts
deleted file mode 100644
index 9c9ae6c0f..000000000
--- a/desktop-app/test/e2e-playwright/qa-recorder-contexts.spec.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { type ElectronApplication, type Page, expect, test } from '@playwright/test'
-import {
- EXTERNAL_REST_API_BASE_URL,
- RPC_PROXY_BASE_URL,
- assertAllowedTarget,
- desktopCredentials,
- finalizeRecording,
- launchDesktopApp,
- login,
- openResourcesNavItem,
- screenshotAndLog,
-} from './qa-recorder-helpers'
-
-// Read-only journey: Resources -> Contexts list, then a context detail.
-// No chat, no writes, no paid calls — so no confirm flag is required. The
-// loopback + health guard still runs for both targets.
-test('optional QA recorder: Desktop contexts list and detail journey', async ({}, testInfo) => {
- await assertAllowedTarget('EXTERNAL_REST_API_BASE_URL', EXTERNAL_REST_API_BASE_URL)
- await assertAllowedTarget('RPC_PROXY_BASE_URL', RPC_PROXY_BASE_URL)
-
- const credentials = desktopCredentials()
- let app: ElectronApplication | undefined
- let page: Page | undefined
-
- try {
- const launched = await launchDesktopApp(testInfo)
- app = launched.app
- page = launched.page
-
- await login(page, credentials)
- await openResourcesNavItem(page, 'nav-contexts')
-
- // (1) Contexts list shell renders.
- const contextsHeading = page.getByRole('heading', { name: 'Contexts', exact: true })
- await expect(contextsHeading).toBeVisible({ timeout: 20_000 })
- await expect(page.locator('.contexts-board-card')).toBeVisible({ timeout: 20_000 })
-
- // Wait for the list to resolve to a known fixture row OR an explicit
- // empty / error state. Resilient to loading, empty, and error seeds — we
- // only hard-assert on fixture identities we know exist.
- const devRow = page.getByRole('button', { name: 'Open context development' })
- const moneyRow = page.getByRole('button', { name: 'Open context moneymaking' })
- const emptyState = page.getByText('No contexts').first()
- const errorBox = page.locator('.contexts-board-card .composer-error')
- await expect(devRow.or(moneyRow).or(emptyState).or(errorBox).first()).toBeVisible({
- timeout: 20_000,
- })
-
- await screenshotAndLog(page, testInfo, 'desktop-contexts-list')
-
- // (2) Open a context detail using an exact known fixture (development
- // preferred, moneymaking as a still-exact fallback). Skip-with-success when
- // no fixture row is present — the list shell assertions above already prove
- // the journey for empty/error seeds.
- const targetRow = (await devRow.isVisible().catch(() => false))
- ? devRow
- : (await moneyRow.isVisible().catch(() => false))
- ? moneyRow
- : null
-
- if (targetRow) {
- const targetId = targetRow === devRow ? 'development' : 'moneymaking'
- await targetRow.click()
-
- // Detail shell + tabs nav render.
- const tabsNav = page.locator('nav.context-tabs')
- await expect(tabsNav).toBeVisible({ timeout: 20_000 })
- await expect(
- page.getByRole('heading', { name: targetId, exact: true, level: 3 })
- ).toBeVisible({ timeout: 20_000 })
-
- // Default tab is Agents; its panel must render.
- await expect(tabsNav.getByRole('button', { name: 'Agents', exact: true })).toBeVisible()
- await expect(page.locator('.context-resource-list').first()).toBeVisible()
-
- // Exercise the remaining detail tabs. Each renders a .context-resource-list
- // panel (table or explicit empty state) regardless of how much is seeded.
- for (const tabName of ['Connectors', 'Teams', 'Members', 'Agent Files']) {
- const tab = tabsNav.getByRole('button', { name: tabName, exact: true })
- await expect(tab).toBeVisible()
- await tab.click()
- await expect(page.locator('.context-resource-list').first()).toBeVisible({
- timeout: 20_000,
- })
- }
-
- await screenshotAndLog(page, testInfo, 'desktop-contexts-detail')
- }
- } finally {
- await finalizeRecording(app, page)
- }
-})
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-helpers.ts b/desktop-app/test/e2e-playwright/qa-recorder-helpers.ts
index dc8ea515f..341578e36 100644
--- a/desktop-app/test/e2e-playwright/qa-recorder-helpers.ts
+++ b/desktop-app/test/e2e-playwright/qa-recorder-helpers.ts
@@ -228,9 +228,11 @@ export async function visitSettingsTab(
await expect(page.getByRole('tabpanel')).toContainText(expectedContent)
}
-/** Expand footer Resources submenu and click one of its items by test id. */
+/** Open a footer data item (Agents / Connectors / Plugins) by test id. */
export async function openResourcesNavItem(page: Page, itemTestId: string): Promise<void> {
const item = page.getByTestId(itemTestId)
+ // Top-level items (e.g. nav-files) are always visible; the data items now
+ // hang directly off the footer Settings popover — no "Resources" submenu.
if (!(await item.isVisible().catch(() => false))) {
const settingsMenu = page.getByTestId('nav-settings-menu')
await expect(settingsMenu).toBeVisible({ timeout: 15_000 })
@@ -238,12 +240,6 @@ export async function openResourcesNavItem(page: Page, itemTestId: string): Prom
await settingsMenu.click()
}
await expect(settingsMenu).toHaveAttribute('aria-expanded', 'true', { timeout: 15_000 })
-
- const resourcesMenu = page.getByTestId('nav-data-menu')
- await expect(resourcesMenu).toBeVisible({ timeout: 15_000 })
- if (!(await item.isVisible().catch(() => false))) {
- await resourcesMenu.click()
- }
}
await expect(item).toBeVisible({ timeout: 15_000 })
await item.click()
@@ -264,13 +260,10 @@ export async function openExactAgentChat(page: Page, hostRef: string): Promise<v
await settingsMenu.click()
}
- const resourcesMenu = page.getByTestId('nav-data-menu')
- await expect(resourcesMenu).toBeVisible()
- if ((await resourcesMenu.getAttribute('aria-expanded')) !== 'true') {
- await resourcesMenu.click()
- }
-
- await page.getByTestId('nav-agents').click()
+ // Agents now sits directly inside the Settings popover (no Resources submenu).
+ const agentsItem = page.getByTestId('nav-agents')
+ await expect(agentsItem).toBeVisible({ timeout: 15_000 })
+ await agentsItem.click()
const chatInput = page.getByRole('textbox', { name: 'Agent message composer' })
const exactAgent = page.locator('.agents-table-row-clickable', { hasText: hostRef }).first()
const emptyState = page.getByText('No agents available')
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-navigation.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-navigation.spec.ts
index c82bab7a4..6cb83cf99 100644
--- a/desktop-app/test/e2e-playwright/qa-recorder-navigation.spec.ts
+++ b/desktop-app/test/e2e-playwright/qa-recorder-navigation.spec.ts
@@ -77,15 +77,9 @@ test('optional QA recorder: Desktop navigation journey — footer settings menu'
}
await expect(settingsMenu).toHaveAttribute('aria-expanded', 'true')
- // Resources submenu expands and exposes the data-route destinations.
- const resourcesMenu = page.getByTestId('nav-data-menu')
- await expect(resourcesMenu).toBeVisible({ timeout: 20_000 })
- if ((await resourcesMenu.getAttribute('aria-expanded')) !== 'true') {
- await resourcesMenu.click()
- }
- await expect(resourcesMenu).toHaveAttribute('aria-expanded', 'true')
-
- for (const itemTestId of ['nav-agents', 'nav-contexts', 'nav-teams', 'nav-mcp-servers']) {
+ // The data-route destinations hang directly off the Settings popover — the
+ // intermediate "Resources" submenu (and the Contexts/Teams entries) is gone.
+ for (const itemTestId of ['nav-agents', 'nav-mcp-servers', 'nav-workflows']) {
await expect(page.getByTestId(itemTestId)).toBeVisible({ timeout: 20_000 })
}
@@ -121,24 +115,18 @@ test('optional QA recorder: Desktop navigation journey — resources pages', asy
timeout: 20_000,
})
- // Contexts page shell.
- await openResourcesNavItem(page, 'nav-contexts')
- await expect(page.getByRole('heading', { name: 'Contexts', exact: true })).toBeVisible({
- timeout: 20_000,
- })
-
- // Teams page heading reads "Members & Teams".
- await openResourcesNavItem(page, 'nav-teams')
- await expect(page.getByRole('heading', { name: /Members & Teams/ })).toBeVisible({
- timeout: 20_000,
- })
-
// Connectors (MCP servers) page shell.
await openResourcesNavItem(page, 'nav-mcp-servers')
await expect(page.getByRole('heading', { name: 'Connectors', exact: true })).toBeVisible({
timeout: 20_000,
})
+ // Plugins (workflows) page shell.
+ await openResourcesNavItem(page, 'nav-workflows')
+ await expect(page.getByRole('heading', { name: 'Plugins', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
await screenshotAndLog(page, testInfo, 'desktop-nav-resources-pages')
} finally {
await finalizeRecording(app, page)
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-teams.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-teams.spec.ts
deleted file mode 100644
index 6cbab6d27..000000000
--- a/desktop-app/test/e2e-playwright/qa-recorder-teams.spec.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import { type ElectronApplication, type Page, expect, test } from '@playwright/test'
-import {
- EXTERNAL_REST_API_BASE_URL,
- RPC_PROXY_BASE_URL,
- assertAllowedTarget,
- desktopCredentials,
- finalizeRecording,
- launchDesktopApp,
- login,
- openResourcesNavItem,
- screenshotAndLog,
-} from './qa-recorder-helpers'
-
-// Read-only journey: Resources -> Teams directory, then a team detail.
-// No chat, no writes, no paid calls — so no confirm flag is required. The
-// loopback + health guard still runs for both targets.
-test('optional QA recorder: Desktop teams journey', async ({}, testInfo) => {
- await assertAllowedTarget('EXTERNAL_REST_API_BASE_URL', EXTERNAL_REST_API_BASE_URL)
- await assertAllowedTarget('RPC_PROXY_BASE_URL', RPC_PROXY_BASE_URL)
-
- const credentials = desktopCredentials()
- let app: ElectronApplication | undefined
- let page: Page | undefined
-
- try {
- const launched = await launchDesktopApp(testInfo)
- app = launched.app
- page = launched.page
-
- await login(page, credentials)
- await openResourcesNavItem(page, 'nav-teams')
-
- // (1) Teams directory shell renders.
- const teamsHeading = page.getByRole('heading', { name: 'Members & Teams', exact: true })
- await expect(teamsHeading).toBeVisible({ timeout: 20_000 })
- await expect(page.locator('.teams-board-card')).toBeVisible({ timeout: 20_000 })
-
- // The shell is proven as soon as ANY directory state renders. Wait for a
- // known fixture row OR an explicit empty / loading / error state. Resilient
- // to loading, empty, and error seeds — we only hard-assert on fixture
- // identities we know exist (dev team, The Golden Kingdom).
- const devTeamRow = page.locator('.da-table__row--clickable', { hasText: 'dev team' })
- const goldenRow = page.locator('.da-table__row--clickable', { hasText: 'The Golden Kingdom' })
- const emptyState = page.getByRole('heading', { name: 'No teams', exact: true })
- const loadingState = page.getByText('Fetching teams and members...')
- const errorBox = page.locator('.teams-board-card .composer-error')
- await expect(
- devTeamRow.or(goldenRow).or(emptyState).or(loadingState).or(errorBox).first()
- ).toBeVisible({ timeout: 20_000 })
-
- await screenshotAndLog(page, testInfo, 'desktop-teams-directory')
-
- // (2) Settle to a terminal state (rows / empty / error) — not the transient
- // loading state — before deciding whether a known fixture row is present to
- // open. Skip-with-success when no fixture row is present; the directory
- // shell assertions above already prove the journey for empty/error seeds.
- await expect(devTeamRow.or(goldenRow).or(emptyState).or(errorBox).first()).toBeVisible({
- timeout: 20_000,
- })
-
- const targetRow = (await devTeamRow.isVisible().catch(() => false))
- ? devTeamRow
- : (await goldenRow.isVisible().catch(() => false))
- ? goldenRow
- : null
-
- if (targetRow) {
- const targetName = targetRow === devTeamRow ? 'dev team' : 'The Golden Kingdom'
-
- // Click the team-name span (plain text) to avoid the member avatar
- // buttons in the Members cell, which stop propagation.
- await targetRow.locator('.team-list-name').click()
-
- // Detail shell + the team's own heading render.
- await expect(
- page.getByRole('heading', { name: targetName, exact: true, level: 3 })
- ).toBeVisible({ timeout: 20_000 })
-
- // The three detail tabs render (Members / Contexts / Agents).
- const tabsNav = page.locator('.team-tabs')
- await expect(tabsNav).toBeVisible({ timeout: 20_000 })
- await expect(tabsNav.getByRole('button', { name: 'Members', exact: true })).toBeVisible()
- await expect(tabsNav.getByRole('button', { name: 'Contexts', exact: true })).toBeVisible()
- await expect(tabsNav.getByRole('button', { name: 'Agents', exact: true })).toBeVisible()
-
- // Default tab is Members; its panel must render (member table or an
- // explicit "No members" empty state).
- await expect(page.locator('.team-resource-list').first()).toBeVisible({ timeout: 20_000 })
-
- await screenshotAndLog(page, testInfo, 'desktop-team-detail')
- }
- } finally {
- await finalizeRecording(app, page)
- }
-})
diff --git a/desktop-app/ui/src/components/SidebarNav/icons.tsx b/desktop-app/ui/src/components/SidebarNav/icons.tsx
index 66a1cdfe8..2a50332ec 100644
--- a/desktop-app/ui/src/components/SidebarNav/icons.tsx
+++ b/desktop-app/ui/src/components/SidebarNav/icons.tsx
@@ -150,16 +150,6 @@ export function IconPlus(props: IconProps) {
)
}
-export function IconData(props: IconProps) {
- return (
- <svg viewBox="0 0 24 24" aria-hidden="true" {...BASE_STROKE_PROPS} {...props}>
- <ellipse cx="12" cy="5" rx="7" ry="3" />
- <path d="M5 5v6c0 1.66 3.13 3 7 3s7-1.34 7-3V5" />
- <path d="M5 11v6c0 1.66 3.13 3 7 3s7-1.34 7-3v-6" />
- </svg>
- )
-}
-
export function IconWorkflows(props: IconProps) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" {...BASE_STROKE_PROPS} {...props}>
diff --git a/desktop-app/ui/src/components/SidebarNav/index.tsx b/desktop-app/ui/src/components/SidebarNav/index.tsx
index 4828dbea5..b3ec8d7f2 100644
--- a/desktop-app/ui/src/components/SidebarNav/index.tsx
+++ b/desktop-app/ui/src/components/SidebarNav/index.tsx
@@ -18,12 +18,10 @@ import {
IconChevronRight,
IconConnectors,
IconContexts,
- IconData,
IconMoreHorizontal,
IconNewChat,
IconSandboxUi,
IconSettings,
- IconTeams,
IconWorkflows,
} from './icons'
import type { SidebarNavProps } from './types'
@@ -58,7 +56,6 @@ export function SidebarNav({
const { selectedAgent, handleSelectChatAgent: onSelectChatAgent } = useNavigationContext()
const [settingsMenuOpen, setSettingsMenuOpen] = useState(false)
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
- const [dataSubmenuOpen, setDataSubmenuOpen] = useState(false)
const [chatSessionsOpen, setChatSessionsOpen] = useState(true)
const [appsOpen, setAppsOpen] = useState(true)
const [sessionMenuId, setSessionMenuId] = useState<string | null>(null)
@@ -87,7 +84,6 @@ export function SidebarNav({
useClickOutside(settingsMenuRef, settingsMenuOpen, () => {
updateSettingsMenuOpen(false)
- setDataSubmenuOpen(false)
})
useClickOutside(sidebarRef, mobileMenuOpen, () => setMobileMenuOpen(false))
useClickOutside(sessionsRef, Boolean(sessionMenuId), () => setSessionMenuId(null))
@@ -159,44 +155,29 @@ export function SidebarNav({
icon: React.ReactNode
}> = useMemo(
() => [
- {
- id: DESKTOP_ROUTES.plugins,
- label: 'Plugins',
- testId: 'nav-workflows',
- icon: <IconWorkflows />,
- },
{
id: DESKTOP_ROUTES.agents,
label: 'Agents',
testId: 'nav-agents',
icon: <IconAgents />,
},
- {
- id: DESKTOP_ROUTES.contexts,
- label: 'Contexts',
- testId: 'nav-contexts',
- icon: <IconContexts />,
- },
- {
- id: DESKTOP_ROUTES.teams,
- label: 'Teams',
- testId: 'nav-teams',
- icon: <IconTeams />,
- },
{
id: DESKTOP_ROUTES.connectors,
label: 'Connectors',
testId: 'nav-mcp-servers',
icon: <IconConnectors />,
},
+ {
+ id: DESKTOP_ROUTES.plugins,
+ label: 'Plugins',
+ testId: 'nav-workflows',
+ icon: <IconWorkflows />,
+ },
],
[]
)
- const dataMenuActive =
- dataRouteItems.some(item => item.id === navItem) ||
- navItem === DESKTOP_ROUTES.contextDetails ||
- navItem === DESKTOP_ROUTES.teamDetails
+ const dataMenuActive = dataRouteItems.some(item => item.id === navItem)
const settingsMenuActive = navItem === DESKTOP_ROUTES.settings || dataMenuActive
const visibleLatestChatSessions = useMemo(
() => latestChatSessions.slice(0, SIDEBAR_SESSION_PREVIEW_LIMIT),
@@ -208,7 +189,6 @@ export function SidebarNav({
onSelect(item)
setMobileMenuOpen(false)
updateSettingsMenuOpen(false)
- setDataSubmenuOpen(false)
setSessionMenuId(null)
}
@@ -245,7 +225,6 @@ export function SidebarNav({
if (isMobileSidebarViewport()) {
setMobileMenuOpen(open => !open)
updateSettingsMenuOpen(false)
- setDataSubmenuOpen(false)
return
}
handleSelect(DESKTOP_ROUTES.chat)
@@ -253,7 +232,6 @@ export function SidebarNav({
const closeSettingsMenuWithFocus = () => {
updateSettingsMenuOpen(false)
- setDataSubmenuOpen(false)
settingsTriggerRef.current?.focus()
}
@@ -279,7 +257,6 @@ export function SidebarNav({
onClick={() => {
setMobileMenuOpen(false)
updateSettingsMenuOpen(false)
- setDataSubmenuOpen(false)
}}
/>
<div className="sidebar-logo">
@@ -604,7 +581,6 @@ export function SidebarNav({
className={`nav-link sidebar-settings-trigger${settingsMenuOpen ? ' open' : ''}`}
onClick={() => {
updateSettingsMenuOpen(!settingsMenuOpen)
- setDataSubmenuOpen(false)
}}
aria-haspopup="menu"
aria-expanded={settingsMenuOpen}
@@ -641,52 +617,19 @@ export function SidebarNav({
</div>
</div>
- <div
- className={`sidebar-settings-menu-item-wrapper sidebar-settings-menu-item-wrapper--data${
- dataSubmenuOpen ? ' is-open' : ''
- }`}
- >
+ {dataRouteItems.map(item => (
<MenuItem
- data-testid="nav-data-menu"
- active={dataMenuActive}
+ key={item.id}
+ data-testid={item.testId}
+ active={navItem === item.id}
className="sidebar-settings-menu-item sidebar-settings-route"
- onClick={() => setDataSubmenuOpen(open => !open)}
+ onClick={() => handleSelect(item.id)}
role="menuitem"
- aria-haspopup="menu"
- aria-expanded={dataSubmenuOpen}
- leadingIcon={<IconData />}
- trailingIcon={
- <span className="sidebar-settings-menu-arrow" aria-hidden="true">
- <svg viewBox="0 0 16 16">
- <path d="m6 4.5 3.5 3.5L6 11.5" />
- </svg>
- </span>
- }
+ leadingIcon={item.icon}
>
- Resources
+ {item.label}
</MenuItem>
- <div className="sidebar-data-submenu" role="menu" aria-label="Resources">
- {dataRouteItems.map(item => (
- <MenuItem
- key={item.id}
- data-testid={item.testId}
- active={
- navItem === item.id ||
- (item.id === DESKTOP_ROUTES.contexts &&
- navItem === DESKTOP_ROUTES.contextDetails) ||
- (item.id === DESKTOP_ROUTES.teams &&
- navItem === DESKTOP_ROUTES.teamDetails)
- }
- className="sidebar-settings-menu-item sidebar-settings-route"
- onClick={() => handleSelect(item.id)}
- role="menuitem"
- leadingIcon={item.icon}
- >
- {item.label}
- </MenuItem>
- ))}
- </div>
- </div>
+ ))}
<MenuItem
data-testid="nav-settings"
@@ -706,7 +649,6 @@ export function SidebarNav({
onClick={() => {
updateSettingsMenuOpen(false)
setMobileMenuOpen(false)
- setDataSubmenuOpen(false)
onLogout()
}}
disabled={busy}
diff --git a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
index 4f936b008..abf3b83e1 100644
--- a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
+++ b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
@@ -114,9 +114,10 @@ describe('SidebarNav logo', () => {
expect(filesItem.textContent).toContain('Files')
expect(filesItem.textContent).not.toContain('Global File System')
- // Files is no longer nested under the Settings → Resources submenu.
+ // Files is a top-level nav item, never nested inside the Settings popover.
fireEvent.click(screen.getByTestId('nav-settings-menu'))
- expect(screen.getByTestId('nav-data-menu').textContent).not.toContain('Global File System')
+ const settingsMenu = document.querySelector('.sidebar-settings-menu')
+ expect(settingsMenu?.querySelector('[data-testid="nav-files"]')).toBeNull()
})
it('mounts the GFS solid-folder SVG inside the Files nav item so the icon is visible', () => {
@@ -221,3 +222,78 @@ describe('SidebarNav new-chat affordance', () => {
expect(screen.queryByTestId('nav-new-chat')).toBeNull()
})
})
+
+describe('SidebarNav flattened resources menu', () => {
+ beforeEach(() => {
+ vi.clearAllMocks()
+ if (!window.matchMedia) {
+ Object.defineProperty(window, 'matchMedia', {
+ writable: true,
+ configurable: true,
+ value: vi.fn().mockImplementation((query: string) => ({
+ matches: false,
+ media: query,
+ onchange: null,
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ dispatchEvent: vi.fn(),
+ })),
+ })
+ }
+ })
+
+ afterEach(() => {
+ cleanup()
+ })
+
+ it('exposes only Agents, Connectors and Plugins as data items, directly under Settings', () => {
+ render(<SidebarNav {...baseProps()} />)
+
+ // The three data items live inside the Settings popover, so open it first.
+ fireEvent.click(screen.getByTestId('nav-settings-menu'))
+
+ expect(screen.getByTestId('nav-agents')).not.toBeNull()
+ expect(screen.getByTestId('nav-mcp-servers')).not.toBeNull()
+ expect(screen.getByTestId('nav-workflows')).not.toBeNull()
+ })
+
+ it('no longer renders the Contexts or Teams menu entries', () => {
+ render(<SidebarNav {...baseProps()} />)
+ fireEvent.click(screen.getByTestId('nav-settings-menu'))
+
+ expect(screen.queryByTestId('nav-contexts')).toBeNull()
+ expect(screen.queryByTestId('nav-teams')).toBeNull()
+ })
+
+ it('removes the intermediate "Resources" submenu level entirely', () => {
+ const { container } = render(<SidebarNav {...baseProps()} />)
+ fireEvent.click(screen.getByTestId('nav-settings-menu'))
+
+ // The "Resources" trigger and its submenu container are gone; the three
+ // items hang directly off the Settings popover.
+ expect(screen.queryByTestId('nav-data-menu')).toBeNull()
+ expect(container.querySelector('.sidebar-data-submenu')).toBeNull()
+ })
+
+ it('renders the three data items as direct children of the Settings popover menu', () => {
+ render(<SidebarNav {...baseProps()} />)
+ fireEvent.click(screen.getByTestId('nav-settings-menu'))
+
+ const settingsMenu = document.querySelector('.sidebar-settings-menu')
+ expect(settingsMenu).not.toBeNull()
+ // Direct descendants (no wrapping submenu element between them and the popover).
+ for (const testId of ['nav-agents', 'nav-mcp-servers', 'nav-workflows']) {
+ const item = screen.getByTestId(testId)
+ expect(item.closest('.sidebar-data-submenu')).toBeNull()
+ expect(settingsMenu?.contains(item)).toBe(true)
+ }
+ })
+
+ it('marks the Settings popover active when on a data route', () => {
+ render(<SidebarNav {...baseProps({ navItem: 'agents' })} />)
+ const trigger = screen.getByTestId('nav-settings-menu')
+ expect(trigger.classList.contains('active')).toBe(true)
+ })
+})
diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.css
index dda77adb9..c16226d52 100644
--- a/desktop-app/ui/src/styles.css
+++ b/desktop-app/ui/src/styles.css
@@ -1664,29 +1664,6 @@ h3 {
white-space: nowrap;
}
-.sidebar-data-submenu {
- position: absolute;
- left: calc(100% - 1px);
- top: auto;
- bottom: 0;
- width: 220px;
- display: none;
- gap: var(--space-0-5);
- border: 1px solid rgba(var(--edge-rgb), 0.4);
- border-radius: var(--radius-lg);
- background: var(--panel);
- box-shadow: 0 16px 28px rgba(var(--overlay-rgb), 0.4);
- backdrop-filter: none;
- padding: var(--space-1-5);
- z-index: calc(var(--sidebar-flyout-layer) + 30);
-}
-
-.sidebar-settings-menu-item-wrapper--data:hover .sidebar-data-submenu,
-.sidebar-settings-menu-item-wrapper--data:focus-within .sidebar-data-submenu,
-.sidebar-settings-menu-item-wrapper--data.is-open .sidebar-data-submenu {
- display: grid;
-}
-
.sidebar-footer-row {
display: flex;
align-items: center;
@@ -2101,11 +2078,6 @@ h3 {
z-index: calc(var(--sidebar-flyout-layer) + 60);
}
-.left-nav.collapsed .sidebar-data-submenu {
- top: auto;
- bottom: 0;
-}
-
.left-nav.collapsed .sidebar-profile-menu-wrapper {
flex: 0 0 auto;
}
@@ -10811,21 +10783,6 @@ pre {
box-shadow: none;
}
- .sidebar-data-submenu {
- position: static;
- width: auto;
- margin-top: var(--space-1);
- box-shadow: none;
- }
-
- .sidebar-settings-menu-item-wrapper--data:not(.is-open) .sidebar-data-submenu {
- display: none;
- }
-
- .sidebar-settings-menu-item-wrapper--data.is-open .sidebar-data-submenu {
- display: grid;
- }
-
.nav-tooltip {
display: none;
}