Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(gfs): polish file actions and share styling
M66516fcbc905
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex c1ab5a31a..41052f425 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -12324,8 +12324,9 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-list-frame {- --cu-gfs-list-columns: 2.25rem minmax(0, 1fr) minmax(4.5rem, auto) 5rem;+ --cu-gfs-list-columns: 2.25rem minmax(0, 1fr) minmax(4.5rem, auto) 9.5rem;+ container-type: inline-size;display: flex;min-width: 0;min-height: 0;@@ -12514,20 +12515,20 @@ button.cu-gfs-tree__button:focus-visible,flex-wrap: nowrap;}-.cu-gfs-list__row .cu-gfs-list__download.cu-btn {+.cu-gfs-list__row .cu-gfs-list__row-action.cu-btn {opacity: 0;pointer-events: none;transition: opacity var(--cu-motion-fast);}-.cu-gfs-list__row:hover .cu-gfs-list__download.cu-btn,-.cu-gfs-list__row:focus-within .cu-gfs-list__download.cu-btn,-.cu-gfs-list__row .cu-gfs-list__download.cu-btn:focus-visible {+.cu-gfs-list__row:hover .cu-gfs-list__row-action.cu-btn,+.cu-gfs-list__row:focus-within .cu-gfs-list__row-action.cu-btn,+.cu-gfs-list__row .cu-gfs-list__row-action.cu-btn:focus-visible {opacity: 1;pointer-events: auto;}-.cu-gfs-list__download.cu-btn {+.cu-gfs-list__row-action.cu-btn {width: 2rem;min-width: 2rem;height: 2rem;@@ -12537,7 +12538,7 @@ button.cu-gfs-tree__button:focus-visible,color: var(--cu-text-soft);}-.cu-gfs-list__download.cu-btn:hover:not(:disabled) {+.cu-gfs-list__row-action.cu-btn:hover:not(:disabled) {border-color: rgba(var(--cu-accent-rgb), 0.26);background: rgba(var(--cu-accent-rgb), 0.1);color: var(--cu-accent);@@ -12955,6 +12956,16 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-manage-dialog {+ /* Share is intentionally monochromatic: remap semantic accents locally so+ recipients, inherited access, errors, and destructive controls all stay+ within the blue family without changing those colors elsewhere. */+ --cu-success: var(--cu-accent);+ --cu-success-rgb: var(--cu-accent-rgb);+ --cu-warning: var(--cu-accent-hover);+ --cu-warning-rgb: var(--cu-accent-rgb);+ --cu-danger: var(--cu-link);+ --cu-danger-hover: var(--cu-accent-hover);+ --cu-danger-rgb: var(--cu-accent-rgb);width: min(45rem, 96vw);max-height: min(47.5rem, 92vh);display: grid;@@ -13944,7 +13955,7 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-list-frame {- --cu-gfs-list-columns: 2.25rem minmax(0, 1fr) 5rem;+ --cu-gfs-list-columns: 2.25rem minmax(0, 1fr) 9.5rem;}.cu-gfs-list__head > :nth-child(3),@@ -13992,6 +14003,18 @@ button.cu-gfs-tree__button:focus-visible,}}+@container (max-width: 720px) {+ .cu-gfs-list-frame .cu-gfs-list__head,+ .cu-gfs-list-frame .cu-gfs-list__row {+ --cu-gfs-list-columns: 2.25rem minmax(0, 1fr) 9.5rem;+ }++ .cu-gfs-list-frame .cu-gfs-list__head > :nth-child(3),+ .cu-gfs-list-frame .cu-gfs-list__row > .cu-gfs-list__value {+ display: none;+ }+}+@media (max-width: 560px) {.cu-gfs-image-preview-modal,.cu-gfs-markdown-preview-modal {diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsxindex d82509554..02839cc19 100644--- a/control-ui/components/GfsBrowser.tsx+++ b/control-ui/components/GfsBrowser.tsx@@ -14,7 +14,15 @@ import {IconVideo,} from '@components/Sidebar/icons'import { useToast } from '@components/Toast'-import { IconChevronRight, IconDownload, IconPaperclip, IconUpload, IconX } from '@components/icons'+import {+ IconChevronRight,+ IconDownload,+ IconPaperclip,+ IconPencil,+ IconShare,+ IconUpload,+ IconX,+} from '@components/icons'import { Button } from '@components/ui'import { apiGet, apiSend, gfsDownload, isSilentApiError } from '@lib/api'import { isGfsDocumentFile } from '@lib/gfsDocumentFile'@@ -1342,9 +1350,21 @@ export function GfsBrowser(): React.JSX.Element {{child.kind === 'directory' ? '—' : formatBytes(child.bytes)}</span><span className="cu-gfs-list__actions">+ <Button+ className="cu-gfs-list__row-action"+ icon+ size="sm"+ variant="ghost"+ title={`Share ${child.name}`}+ aria-label={`Share ${child.name}`}+ onClick={() => openManage(child)}+ >+ <IconShare width={16} height={16} />+ </Button>{child.kind !== 'directory' ? (<Button- className="cu-gfs-list__download"+ className="cu-gfs-list__download cu-gfs-list__row-action"+ iconsize="sm"variant="ghost"title={`Download ${child.name}`}@@ -1355,6 +1375,17 @@ export function GfsBrowser(): React.JSX.Element {<IconDownload width={18} height={18} /></Button>) : null}+ <Button+ className="cu-gfs-list__row-action"+ icon+ size="sm"+ variant="ghost"+ title={`Rename ${child.name}`}+ aria-label={`Rename ${child.name}`}+ onClick={() => openRowRename(child)}+ >+ <IconPencil width={16} height={16} />+ </Button><GfsResourceMenuresourceName={child.name}resourceUri={child.gfsUri}diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsxindex 355a93884..beee07308 100644--- a/control-ui/components/__tests__/GfsBrowser.test.tsx+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx@@ -950,6 +950,31 @@ describe('GfsBrowser', () => {await waitFor(() => expect(mockGfsDownload).toHaveBeenCalledWith('r2', 'report.md'))})+ it('shows share and rename row actions beside download', async () => {+ mockApiGet.mockResolvedValueOnce({+ items: [child('report.md', 'file', 2)],+ nextCursor: null,+ })+ renderBrowser()++ const currentResources = await screen.findByRole('list', { name: 'Current folder resources' })+ const reportRow = within(currentResources).getByText('report.md').closest('li')+ expect(reportRow).toBeTruthy()+ expect(within(reportRow!).getByRole('button', { name: 'Share report.md' })).toBeTruthy()+ expect(within(reportRow!).getByRole('button', { name: 'Download report.md' })).toBeTruthy()+ expect(within(reportRow!).getByRole('button', { name: 'Rename report.md' })).toBeTruthy()+ expect(+ Array.from(reportRow!.querySelectorAll('.cu-gfs-list__actions button')).map(button =>+ button.getAttribute('aria-label')+ )+ ).toEqual([+ 'Share report.md',+ 'Download report.md',+ 'Rename report.md',+ 'Actions for report.md',+ ])+ })+it('surfaces download failures through the toast stack', async () => {mockApiGet.mockResolvedValueOnce({items: [child('report.md', 'file', 2)],diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex c5cdd591f..f52e28a76 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.503",+ "version": "0.1.504","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.503",+ "version": "0.1.504","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 5f77ef42a..75d634af4 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.503",+ "version": "0.1.504","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex e62095cb2..57b3c9475 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -14605,6 +14605,7 @@ pre {}.da-gfs-drive__grid {+ container-type: inline-size;min-height: 0;flex: 1 1 auto;width: auto;@@ -15171,6 +15172,14 @@ pre {}.da-gfs-manage-dialog {+ /* Keep every Share-dialog accent in the blue family while preserving the+ global semantic palette used by the rest of Desktop. */+ --success: var(--accent);+ --success-rgb: var(--accent-rgb);+ --warning: var(--accent-strong);+ --warning-rgb: var(--accent-rgb);+ --danger: var(--accent-strong);+ --danger-rgb: var(--accent-rgb);width: min(720px, 96vw);max-height: min(760px, 92vh);display: grid;@@ -15946,11 +15955,7 @@ pre {.da-gfs-drive__grid .da-grid__head,.da-gfs-drive__grid .da-grid__row {- grid-template-columns: calc(var(--space-5) + var(--space-1)) minmax(0, 1fr) 4.5rem;- }-- .da-gfs-list__actions {- flex-wrap: wrap;+ grid-template-columns: calc(var(--space-5) + var(--space-1)) minmax(0, 1fr) 9.5rem;}.da-gfs-drive__size-column,@@ -15968,6 +15973,18 @@ pre {}}+@container (max-width: 720px) {+ .da-gfs-drive__grid .da-grid__head,+ .da-gfs-drive__grid .da-grid__row {+ grid-template-columns: calc(var(--space-5) + var(--space-1)) minmax(0, 1fr) 9.5rem;+ }++ .da-gfs-drive__size-column,+ .da-gfs-drive__size {+ display: none;+ }+}+@media (max-width: 560px) {.da-gfs-image-preview-modal,.da-gfs-markdown-preview-modal,