Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): preserve same-folder link state for R8-H2
Josuéd45f1fa03236
diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsxindex 4f452a73d..135fd3223 100644--- a/control-ui/components/GfsBrowser.tsx+++ b/control-ui/components/GfsBrowser.tsx@@ -1873,7 +1873,6 @@ export function GfsBrowser(): React.JSX.Element {// trail this link-open just replaced.trailReconstructionEpochRef.current += 1setCrumbs([{ id: null, rid: null, name: '/' }, folderResourceToCrumb(view)])- setLoading(true)setOpenLinkOpen(false)} catch (err) {setOpenLinkError(err instanceof Error ? err.message : 'Could not open the EvenDrive link.')diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsxindex 4b58ac10b..87d9733ee 100644--- a/control-ui/components/__tests__/GfsBrowser.test.tsx+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx@@ -2734,6 +2734,43 @@ describe('GfsBrowser', () => {expect(screen.queryByRole('dialog', { name: 'Open EvenDrive link' })).toBeNull()})+ it('keeps the current list visible when an EvenDrive link resolves to the same folder', async () => {+ const folder = listedFolder('11111111-1111-1111-1111-111111111111', 'org', '/org', 4)+ const childFile = child('nested.txt', 'file', 2)+ mockApiGet.mockImplementation(async (path: string) => {+ if (path === '/api/v1/gfs/tree') return { items: [folder], nextCursor: null }+ if (path === `/api/v1/gfs/resources/${folder.resourceId}/children`) {+ return { items: [childFile], nextCursor: null }+ }+ if (path === '/api/v1/gfs/resolve') {+ return resolvedFolderView(folder.resourceId, folder.name, folder.path!, folder.version)+ }+ return { items: [], nextCursor: null }+ })++ renderBrowser()+ fireEvent.click(await screen.findByRole('button', { name: 'org' }))+ await screen.findByText('nested.txt')+ const breadcrumb = screen.getByRole('navigation', { name: 'Breadcrumb' })+ fireEvent.click(within(breadcrumb).getByRole('button', { name: 'Actions for org' }))+ fireEvent.click(screen.getByRole('menuitem', { name: 'Open EvenDrive link' }))+ const dialog = await screen.findByRole('dialog', { name: 'Open EvenDrive link' })+ fireEvent.change(within(dialog).getByLabelText('EvenDrive link'), {+ target: { value: folder.gfsUri },+ })+ fireEvent.click(within(dialog).getByRole('button', { name: 'Open' }))++ await waitFor(() =>+ expect(+ mockApiGet.mock.calls.filter(+ ([path]) => path === `/api/v1/gfs/resources/${folder.resourceId}/children`+ ).length+ ).toBeGreaterThan(1)+ )+ await waitFor(() => expect(screen.getByText('nested.txt')).toBeVisible())+ expect(screen.queryByRole('status', { name: 'Loading files' })).toBeNull()+ })+// R5-M1: moving the folder the breadcrumb is INSIDE changes its ancestry, so// patching the moved crumb in place would leave the trail pointing at the// old location. The trail must be rebuilt from the folder's new location.diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 6b9428ce5..9f2bbd129 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.690",+ "version": "0.1.691","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.690",+ "version": "0.1.691","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 83d7c5dc5..78a3f4770 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.690",+ "version": "0.1.691","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",