Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(gfs): restore outlined document icon next to text and pdf files
Miguelon Peluchon8bfc2412b3ad
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex d91f60b9a..87f1ebffa 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -10962,13 +10962,14 @@ textarea.cu-input {stroke-linejoin: round;}-/* Allow the new solid SVG icons (folder, copy, …) to honour their- inline fill="currentColor" / stroke-width="0" inside the GFS row- + breadcrumb containers. The above rule defaults to outline-only;- these selectors bring the solid filled glyphs back. */-.cu-gfs-breadcrumb__drive-icon svg[fill='currentColor'],-.cu-gfs-list__icon svg[fill='currentColor'],-.cu-gfs-list__copy svg[fill='currentColor'] {+/* Allow the new solid SVG icons (folder, copy, image, video, …) to+ honour their inline fill="currentColor" / stroke-width="0" inside+ the GFS row + breadcrumb containers. The above rule defaults to+ outline-only; `data-solid="true"` opts a glyph into the filled+ treatment. */+.cu-gfs-breadcrumb__drive-icon svg[data-solid='true'],+.cu-gfs-list__icon svg[data-solid='true'],+.cu-gfs-list__copy svg[data-solid='true'] {fill: currentColor;stroke: none;stroke-width: 0;diff --git a/control-ui/components/Sidebar/icons.tsx b/control-ui/components/Sidebar/icons.tsxindex 585f512cb..c26ddc52e 100644--- a/control-ui/components/Sidebar/icons.tsx+++ b/control-ui/components/Sidebar/icons.tsx@@ -7,6 +7,7 @@ export function IconCopy(props: React.SVGProps<SVGSVGElement>) {viewBox="0 0 384 384"fill="currentColor"aria-hidden="true"+ data-solid="true"{...props}><path d="M280 64H112c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h168c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM32 224c0-35.3 28.7-64 64-64h192c35.3 0 64 28.7 64 64v128c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V224zm128 48c-8.8 0-16 7.2-16 16 0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16 0-8.8-7.2-16-16-16H160z" />@@ -101,6 +102,7 @@ export function IconFolder() {viewBox="0 0 512 512"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"+ data-solid="true"><path d="M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z" /></svg>@@ -370,6 +372,7 @@ export function IconImage() {fill="currentColor"stroke="currentColor"strokeWidth="0"+ data-solid="true"><g><path d="M18.435,3.06H5.565a2.5,2.5,0,0,0-2.5,2.5V18.44a2.507,2.507,0,0,0,2.5,2.5h12.87a2.507,2.507,0,0,0,2.5-2.5V5.56A2.5,2.5,0,0,0,18.435,3.06ZM4.065,5.56a1.5,1.5,0,0,1,1.5-1.5h12.87a1.5,1.5,0,0,1,1.5,1.5v8.66l-3.88-3.88a1.509,1.509,0,0,0-2.12,0l-4.56,4.57a.513.513,0,0,1-.71,0l-.56-.56a1.522,1.522,0,0,0-2.12,0l-1.92,1.92Zm15.87,12.88a1.5,1.5,0,0,1-1.5,1.5H5.565a1.5,1.5,0,0,1-1.5-1.5v-.75L6.7,15.06a.5.5,0,0,1,.35-.14.524.524,0,0,1,.36.14l.55.56a1.509,1.509,0,0,0,2.12,0l4.57-4.57a.5.5,0,0,1,.71,0l4.58,4.58Z" />@@ -389,6 +392,7 @@ export function IconVideo() {fill="currentColor"stroke="currentColor"strokeWidth="0"+ data-solid="true"><path d="M0 4.75C0 3.784.784 3 1.75 3h20.5c.966 0 1.75.784 1.75 1.75v14.5A1.75 1.75 0 0 1 22.25 21H1.75A1.75 1.75 0 0 1 0 19.25Zm1.75-.25a.25.25 0 0 0-.25.25v14.5c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25Z" /><path d="M9 15.584V8.416a.5.5 0 0 1 .77-.42l5.576 3.583a.5.5 0 0 1 0 .842L9.77 16.005a.5.5 0 0 1-.77-.42Z" />diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsxindex 718767edf..93b9d46b8 100644--- a/control-ui/components/__tests__/GfsBrowser.test.tsx+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx@@ -201,10 +201,28 @@ describe('GfsBrowser', () => {expect(folderSvg?.getAttribute('viewBox')).toBe('0 0 512 512')expect(folderSvg?.getAttribute('fill')).toBe('currentColor')expect(folderSvg?.getAttribute('stroke-width')).toBe('0')+ expect(folderSvg?.getAttribute('data-solid')).toBe('true')const path = folderSvg?.querySelector('path')expect(path?.getAttribute('d')).toContain('M464 128H272l-64-64H48C21.49 64')})+ it('keeps the outlined document glyph visible next to .pdf files', async () => {+ mockApiGet.mockResolvedValueOnce({+ items: [child('report.pdf', 'file', 2)],+ nextCursor: null,+ })+ renderBrowser()++ const list = await screen.findByRole('list', { name: 'Current folder resources' })+ const fileSvg = list.querySelector('.cu-gfs-list__icon svg')+ // Document glyph is outline-only — should NOT receive the solid opt-in.+ expect(fileSvg?.getAttribute('data-solid')).not.toBe('true')+ expect(fileSvg?.getAttribute('viewBox')).toBe('0 0 512 512')+ const path = fileSvg?.querySelector('path')+ expect(path?.getAttribute('fill')).toBe('none')+ expect(path?.getAttribute('stroke-width')).toBe('32')+ })+it('uses the paperclip header, labels the root as main, and ignores current-crumb clicks', async () => {mockApiGet.mockResolvedValueOnce({ items: [], nextCursor: null })renderBrowser()diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 875b41811..f82798ed4 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.442",+ "version": "0.1.443","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.442",+ "version": "0.1.443","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/llm-providers": "file:../packages/llm-providers",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 903f97ff5..930743b63 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.442",+ "version": "0.1.443","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/desktop-app/ui/src/components/SidebarNav/icons.tsx b/desktop-app/ui/src/components/SidebarNav/icons.tsxindex 77f976aa6..d81428b0b 100644--- a/desktop-app/ui/src/components/SidebarNav/icons.tsx+++ b/desktop-app/ui/src/components/SidebarNav/icons.tsx@@ -55,6 +55,7 @@ export function IconContexts(props: IconProps) {strokeWidth="0"viewBox="0 0 512 512"aria-hidden="true"+ data-solid="true"{...props}><path d="M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z" />@@ -84,7 +85,7 @@ export function IconAttachFile(props: IconProps) {// solid). Used by the GFS image and text/markdown preview modals.export function IconCopy(props: IconProps) {return (- <svg viewBox="0 0 384 384" fill="currentColor" aria-hidden="true" {...props}>+ <svg viewBox="0 0 384 384" fill="currentColor" aria-hidden="true" data-solid="true" {...props}><path d="M280 64H112c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h168c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM32 224c0-35.3 28.7-64 64-64h192c35.3 0 64 28.7 64 64v128c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V224zm128 48c-8.8 0-16 7.2-16 16 0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16 0-8.8-7.2-16-16-16H160z" /></svg>)@@ -345,6 +346,7 @@ export function IconImage(props: IconProps) {fill="currentColor"stroke="currentColor"strokeWidth="0"+ data-solid="true"{...props}><g>@@ -363,6 +365,7 @@ export function IconVideo(props: IconProps) {fill="currentColor"stroke="currentColor"strokeWidth="0"+ data-solid="true"{...props}><path d="M0 4.75C0 3.784.784 3 1.75 3h20.5c.966 0 1.75.784 1.75 1.75v14.5A1.75 1.75 0 0 1 22.25 21H1.75A1.75 1.75 0 0 1 0 19.25Zm1.75-.25a.25.25 0 0 0-.25.25v14.5c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25Z" />diff --git a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsxindex 6ae4b1b3f..cc0a2c619 100644--- a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx+++ b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx@@ -1250,6 +1250,12 @@ describe('FilesPage', () => {for (const row of documentRows) {const iconSvg = row?.querySelector('.da-gfs-list__icon svg')expect(iconSvg?.getAttribute('viewBox')).toBe('0 0 512 512')+ // The document glyph is outlined — paths carry fill="none" and a+ // real stroke width; the SVG itself must NOT receive the+ // data-solid="true" opt-in we use for filled icons.+ expect(iconSvg?.getAttribute('data-solid')).not.toBe('true')+ const path = iconSvg?.querySelector('path')+ expect(path?.getAttribute('fill')).toBe('none')}const clipRow = screen.getByRole('button', { name: 'archive.zip' }).closest('.da-grid__row')