Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(gfs): address review follow-ups
M59041681a872
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex ad203e71e..4d517e657 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.548",+ "version": "0.1.549","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.548",+ "version": "0.1.549","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/image-policy": "file:../packages/image-policy",diff --git a/control-api/package.json b/control-api/package.jsonindex 1efcd543b..76164cfd8 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.548",+ "version": "0.1.549","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/routes.externalGfs.test.ts b/control-api/test/routes.externalGfs.test.tsindex 0289e4a76..5dabe1865 100644--- a/control-api/test/routes.externalGfs.test.ts+++ b/control-api/test/routes.externalGfs.test.ts@@ -872,7 +872,7 @@ describe('indexed upload relay canonical drive', () => {})describe('PUT /external/gfs/grants (user delegation via existing engine)', () => {- it('honors a user-session grant when the caller holds manage_acl (no-escalation OK)', async () => {+ it('honors a user-session grant and preserves false when inherit is omitted', async () => {auth()// The user holds manage_acl + read on R directly → may grant read.dbReturning([@@ -892,12 +892,12 @@ describe('PUT /external/gfs/grants (user delegation via existing engine)', () =>resourceId: R,subject: { type: 'user', id: U2 },permissions: ['read'],- inherit: false,})expect(res.status).toBe(200)expect(res.body.ok).toBe(true)// The INSERT recorded the caller as the user (granted_by user:user-1).const insert = mockQuery.mock.calls.find(c => String(c[0]).includes('INSERT INTO gfs_grants'))+ expect(insert?.[1]?.[5]).toBe(false)expect(insert?.[1]?.[6]).toBe(`user:${U1}`)const audit = mockQuery.mock.calls.find(c => String(c[0]).includes('INSERT INTO gfs_audit'))expect(audit?.[1]?.[1]).toBeNull()diff --git a/control-ui/components/GfsResourceMenu/index.tsx b/control-ui/components/GfsResourceMenu/index.tsxindex e0e30143a..703ae59f2 100644--- a/control-ui/components/GfsResourceMenu/index.tsx+++ b/control-ui/components/GfsResourceMenu/index.tsx@@ -316,7 +316,7 @@ export function GfsResourceMenu({disabled={action.disabled}ref={action.submenu ? shareTriggerRef : undefined}title={action.key === 'copy-link' ? resourceUri : undefined}- onMouseEnter={() => setShareOpen(action.submenu === true)}+ onMouseEnter={action.submenu ? () => setShareOpen(true) : undefined}onClick={event => {event.stopPropagation()if (action.submenu) {diff --git a/control-ui/components/__tests__/GfsResourceMenu.test.tsx b/control-ui/components/__tests__/GfsResourceMenu.test.tsxindex 7b17bd22f..c329d4b41 100644--- a/control-ui/components/__tests__/GfsResourceMenu.test.tsx+++ b/control-ui/components/__tests__/GfsResourceMenu.test.tsx@@ -62,6 +62,8 @@ describe('GfsResourceMenu', () => {.querySelector('[data-gfs-action="share-access"] .cu-gfs-resource-menu__icon path')?.getAttribute('d')).toBe('M5 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0')+ fireEvent.mouseEnter(within(menu).getByRole('menuitem', { name: 'Preview' }))+ expect(screen.getByRole('menu', { name: 'Share options for report.txt' })).toBeTruthy()fireEvent.click(within(shareMenu).getByRole('menuitem', { name: 'Share' }))expect(onManage).toHaveBeenCalledOnce()expect(screen.queryByRole('menu', { name: 'Actions for report.txt' })).toBeNull()diff --git a/control-ui/lib/gfsResourceName.ts b/control-ui/lib/gfsResourceName.tsindex 779382b14..e4897b3c3 100644--- a/control-ui/lib/gfsResourceName.ts+++ b/control-ui/lib/gfsResourceName.ts@@ -25,6 +25,7 @@ function truncatedBaseForSuffix(base: string, suffix: string): string {* Returns the first available sibling name using the familiar `(1)`, `(2)`* suffix convention. The extension stays at the end and the result remains* within the same limit as normalizeGfsResourceName.+ * Precondition: `name` has already passed through normalizeGfsResourceName.*/export function nextAvailableGfsResourceName(name: string,diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 41e577c2d..72a2f6ee1 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.564",+ "version": "0.1.565","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.564",+ "version": "0.1.565","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 48f6afc2f..82f1c7427 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.564",+ "version": "0.1.565","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/desktop-app/ui/src/components/GfsResourceMenu/GfsResourceMenu.test.tsx b/desktop-app/ui/src/components/GfsResourceMenu/GfsResourceMenu.test.tsxindex 28a6cb1ab..ddf0cafc0 100644--- a/desktop-app/ui/src/components/GfsResourceMenu/GfsResourceMenu.test.tsx+++ b/desktop-app/ui/src/components/GfsResourceMenu/GfsResourceMenu.test.tsx@@ -76,6 +76,8 @@ describe('GfsResourceMenu', () => {.querySelector('[data-gfs-action="share-access"] .ui-menu-item__icon path')?.getAttribute('d')).toBe('M5 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0')+ fireEvent.mouseEnter(within(menu).getByRole('menuitem', { name: 'Preview' }))+ expect(screen.getByRole('menu', { name: 'Share options for report.txt' })).toBeTruthy()fireEvent.click(within(shareMenu).getByRole('menuitem', { name: 'Share' }))expect(onManage).toHaveBeenCalledOnce()expect(screen.queryByRole('menu', { name: 'Actions for report.txt' })).toBeNull()diff --git a/desktop-app/ui/src/components/GfsResourceMenu/index.tsx b/desktop-app/ui/src/components/GfsResourceMenu/index.tsxindex 47347181b..94146a0c9 100644--- a/desktop-app/ui/src/components/GfsResourceMenu/index.tsx+++ b/desktop-app/ui/src/components/GfsResourceMenu/index.tsx@@ -376,7 +376,7 @@ export function GfsResourceMenu({role="menuitem"ref={action.submenu ? shareTriggerRef : undefined}trailingIcon={action.submenu ? <IconChevronRight /> : undefined}- onMouseEnter={() => setShareOpen(action.submenu === true)}+ onMouseEnter={action.submenu ? () => setShareOpen(true) : undefined}onClick={() => {if (action.submenu) {action.onClick()diff --git a/desktop-app/ui/src/gfs/resourceName.ts b/desktop-app/ui/src/gfs/resourceName.tsindex 779382b14..e4897b3c3 100644--- a/desktop-app/ui/src/gfs/resourceName.ts+++ b/desktop-app/ui/src/gfs/resourceName.ts@@ -25,6 +25,7 @@ function truncatedBaseForSuffix(base: string, suffix: string): string {* Returns the first available sibling name using the familiar `(1)`, `(2)`* suffix convention. The extension stays at the end and the result remains* within the same limit as normalizeGfsResourceName.+ * Precondition: `name` has already passed through normalizeGfsResourceName.*/export function nextAvailableGfsResourceName(name: string,