Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop): make the active breadcrumb crumb a live drop target
M2e63a760407a
diff --git a/desktop-app/ui/src/pages/FilesPage.tsx b/desktop-app/ui/src/pages/FilesPage.tsxindex 3d0d5ae93..220c4565b 100644--- a/desktop-app/ui/src/pages/FilesPage.tsx+++ b/desktop-app/ui/src/pages/FilesPage.tsx@@ -2151,7 +2151,12 @@ export function FilesPage({: ''}`}color="neutral"- disabled={index === crumbs.length - 1}+ // The ACTIVE crumb stays a live drop target (Control UI+ // parity): a listing row dropped here is the same-parent+ // no-op ("already in"), and an item dragged from another+ // surface (the sidebar tree) moves INTO the open folder.+ // Only the click is inert — you are already here.+ aria-current={index === crumbs.length - 1 ? 'page' : undefined}title={gfsDropVerdictReason(dropStatesById[crumb.resourceId]) !== undefined? gfsDropVerdictLiveAnnouncement(@@ -2163,19 +2168,18 @@ export function FilesPage({}data-drop-state={dropStatesById[crumb.resourceId]?.state}data-drop-reason={gfsDropVerdictReason(dropStatesById[crumb.resourceId])}- onClick={() => ctrl.goToCrumb(index)}+ onClick={+ index === crumbs.length - 1 ? undefined : () => ctrl.goToCrumb(index)+ }onDragEnter={event => handleCrumbDragOver(event, crumb, index)}onDragOver={event => handleCrumbDragOver(event, crumb, index)}onDragLeave={handleFolderDragLeave}- onDrop={- index === crumbs.length - 1- ? undefined- : event =>- void handleFolderDrop(event, {- resourceId: crumb.resourceId,- name: crumb.name,- kind: 'directory',- })+ onDrop={event =>+ void handleFolderDrop(event, {+ resourceId: crumb.resourceId,+ name: crumb.name,+ kind: 'directory',+ })}variant="text">diff --git a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsxindex 8d717d3ba..ef757267e 100644--- a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx+++ b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx@@ -6907,7 +6907,9 @@ describe('FilesPage — folder drag-and-drop', () => {// Breadcrumb crumb drop targets (Control UI parity): the trail inside a// nested folder — folder-0 "Product" is an enabled ancestor crumb, folder-1- // "Child" is the active (disabled) crumb and the rows' parent.+ // "Child" is the ACTIVE crumb (a live drop target: same-parent no-op for+ // its own listing rows, a real move for items from other surfaces) and the+ // rows' parent.function crumbDragHarness(options: {destinationHeld?: string[]@@ -7088,6 +7090,28 @@ describe('FilesPage — folder drag-and-drop', () => {expect(screen.queryByRole('dialog')).toBeNull()})+ it('dropping a listing row onto the ACTIVE crumb explains it is already there', async () => {+ const { pushToast, moveResource } = crumbDragHarness()+ const sourceRow = screen.getByRole('button', { name: 'Open Projects' })+ const activeCrumb = screen.getByRole('button', { name: 'Child' })+ expect(activeCrumb.getAttribute('aria-current')).toBe('page')+ const dataTransfer = crumbDragDataTransfer()++ fireEvent.dragStart(sourceRow, { dataTransfer })+ fireEvent.dragOver(activeCrumb, { dataTransfer })+ await waitFor(() => {+ expect(activeCrumb.getAttribute('data-drop-state')).toBe('denied')+ })+ expect(activeCrumb.getAttribute('data-drop-reason')).toBe('same-parent')++ fireEvent.drop(activeCrumb, { dataTransfer })+ await waitFor(() =>+ expect(pushToast).toHaveBeenCalledWith('Projects is already in Child.', 'info')+ )+ expect(moveResource).not.toHaveBeenCalled()+ expect(screen.queryByRole('dialog')).toBeNull()+ })+it('a file conflict resolves with a numbered whole-resource rename (CU parity)', async () => {const pushToast = vi.fn()let conflicted = falsediff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 431df0850..f6f68dc8d 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -15373,9 +15373,11 @@ pre {white-space: nowrap;}-.da-gfs-drive__breadcrumb.ui-button:disabled {+.da-gfs-drive__breadcrumb.ui-button[aria-current='page'] {color: var(--text);opacity: 1;+ background: rgba(var(--accent-rgb), 0.1);+ cursor: default;}/* Breadcrumb drop-move verdict tints (drop-move parity, refusal UX matrix):