Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(desktop): promote Files to top-level nav and simplify GFS table
Miguelon Peluchon8fc49504c432
diff --git a/desktop-app/ui/src/components/SidebarNav/icons.tsx b/desktop-app/ui/src/components/SidebarNav/icons.tsxindex ad91189f5..af43f69d8 100644--- a/desktop-app/ui/src/components/SidebarNav/icons.tsx+++ b/desktop-app/ui/src/components/SidebarNav/icons.tsx@@ -312,3 +312,19 @@ export function IconThemeMoon(props: IconProps) {</svg>)}++export function IconEye(props: IconProps) {+ return (+ <svg+ viewBox="0 0 512 512"+ aria-hidden="true"+ fill="currentColor"+ stroke="currentColor"+ strokeWidth="0"+ {...props}+ >+ <circle cx="256" cy="256" r="64" />+ <path d="M394.82 141.18C351.1 111.2 304.31 96 255.76 96c-43.69 0-86.28 13-126.59 38.48C88.52 160.23 48.67 207 16 256c26.42 44 62.56 89.24 100.2 115.18C159.38 400.92 206.33 416 255.76 416c49 0 95.85-15.07 139.3-44.79C433.31 345 469.71 299.82 496 256c-26.38-43.43-62.9-88.56-101.18-114.82M256 352a96 96 0 1 1 96-96 96.11 96.11 0 0 1-96 96" />+ </svg>+ )+}diff --git a/desktop-app/ui/src/components/SidebarNav/index.tsx b/desktop-app/ui/src/components/SidebarNav/index.tsxindex 87a547924..6761e05e3 100644--- a/desktop-app/ui/src/components/SidebarNav/index.tsx+++ b/desktop-app/ui/src/components/SidebarNav/index.tsx@@ -176,12 +176,6 @@ export function SidebarNav({testId: 'nav-mcp-servers',icon: <IconConnectors />,},- {- id: DESKTOP_ROUTES.files,- label: 'Global File System',- testId: 'nav-files',- icon: <IconAttachFile />,- },],[])@@ -561,6 +555,27 @@ export function SidebarNav({)}</React.Fragment>))}++ <div+ className={`nav-link${navItem === DESKTOP_ROUTES.files ? ' active' : ''}`}+ title={collapsed ? 'Files' : undefined}+ data-tooltip="Files"+ >+ <NavItemControl+ data-testid="nav-files"+ className="nav-link-main"+ onClick={() => handleSelect(DESKTOP_ROUTES.files)}+ aria-label="Files"+ leadingIcon={<IconAttachFile />}+ trailingIcon={+ <span className="nav-tooltip" role="tooltip">+ Files+ </span>+ }+ >+ Files+ </NavItemControl>+ </div></nav><div className="sidebar-footer">diff --git a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsxindex b424bfeb5..540d46b56 100644--- a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx+++ b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx@@ -105,13 +105,17 @@ describe('SidebarNav logo', () => {expect(container.querySelector('.sidebar-logo-copy')).toBeNull()})- it('labels the Files destination as Global File System in Resources', () => {+ it('renders Files as a top-level nav item labelled Files (not under Resources)', () => {render(<SidebarNav {...baseProps()} />)- fireEvent.click(screen.getByTestId('nav-settings-menu'))+ // Files is always visible as a primary nav destination — no menu opening needed.+ const filesItem = screen.getByTestId('nav-files')+ expect(filesItem.textContent).toContain('Files')+ expect(filesItem.textContent).not.toContain('Global File System')- expect(screen.getByTestId('nav-files').textContent).toContain('Global File System')- expect(screen.queryByRole('menuitem', { name: 'Files' })).toBeNull()+ // Files is no longer nested under the Settings → Resources submenu.+ fireEvent.click(screen.getByTestId('nav-settings-menu'))+ expect(screen.getByTestId('nav-data-menu').textContent).not.toContain('Global File System')})})diff --git a/desktop-app/ui/src/pages/FilesPage.tsx b/desktop-app/ui/src/pages/FilesPage.tsxindex b6f5c738a..ad2075de2 100644--- a/desktop-app/ui/src/pages/FilesPage.tsx+++ b/desktop-app/ui/src/pages/FilesPage.tsx@@ -11,6 +11,7 @@ import {IconConnectors,IconContexts,IconDownload,+ IconEye,} from '@components/SidebarNav/icons'import { desktopQueryKeys } from '@hooks/domain/queryKeys'import { useGfsBrowserController } from '@hooks/domain/useGfsBrowserController'@@ -104,11 +105,6 @@ function agentSubjectOptions(agents: MyAgentEntry[] | undefined): GfsAgentSubjecreturn [...options.values()].sort((left, right) => left.name.localeCompare(right.name))}-function resourceSource(resource: GfsDriveResource, currentFolderName?: string): string {- if (currentFolderName) return currentFolderName- return resource.sources?.length ? resource.sources.join(' + ') : 'Shared'-}-function pickErrorMessage(error: unknown): string | null {if (!error) return nullreturn error instanceof Error ? error.message : String(error)@@ -540,6 +536,7 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:size="sm"variant="outline">+ <IconEye width={16} height={16} />Open GFS link</Button>{current && !currentIsFile ? (@@ -632,14 +629,13 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:className="da-grid da-gfs-drive__grid"style={{'--da-grid-cols':- 'calc(var(--space-5) + var(--space-1)) minmax(12rem, 1fr) minmax(5rem, 0.35fr) minmax(7rem, 0.55fr) 4.5rem',+ 'calc(var(--space-5) + var(--space-1)) minmax(12rem, 1fr) minmax(5rem, 0.35fr) 4.5rem',}}><div className="da-grid__head"><span className="da-grid__col-header" aria-hidden="true" /><span className="da-grid__col-header">Name</span><span className="da-grid__col-header da-gfs-drive__type-column">Type</span>- <span className="da-grid__col-header da-gfs-drive__source-column">Source</span><span className="da-grid__col-header da-grid__col-header--right">Actions</span></div><div className="da-grid__body">@@ -670,9 +666,6 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:<span className="da-gfs-drive__type da-grid__cell">{resource.kind === 'directory' ? 'Folder' : 'File'}</span>- <span className="da-gfs-drive__source da-grid__cell">- {resourceSource(resource, currentIsFolder ? current?.name : undefined)}- </span><span className="da-gfs-list__actions da-grid__cell da-grid__cell--right">{resource.kind === 'file' ? (<IconButtondiff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 51c3e3ab2..adc40b219 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -13928,8 +13928,7 @@ pre {font-size: var(--font-size-sm);}-.da-gfs-drive__type,-.da-gfs-drive__source {+.da-gfs-drive__type {min-width: 0;overflow: hidden;color: var(--text-muted);@@ -14636,9 +14635,7 @@ pre {}.da-gfs-drive__type-column,- .da-gfs-drive__source-column,- .da-gfs-drive__type,- .da-gfs-drive__source {+ .da-gfs-drive__type {display: none;}