Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

feat(evendrive): active-folder breadcrumb menu, EvenDrive rename, file-list scroll fix

M6e587ff86173
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index 3b55fa072..969231f0c 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -12337,7 +12337,11 @@ button.cu-gfs-tree__button:focus-visible,
border: 1px solid var(--cu-border-subtle);
border-radius: var(--cu-radius-sm);
background: var(--cu-bg-elevated);
- overflow: visible;
+ /* The viewport-fill card clips overflow and the app layout locks page
+ scrolling, so this frame is the file list's scroll container (same
+ contract as `.cu-table-wrap` for semantic tables). Without it, long
+ listings overflow visibly and get cut off at the card edge. */
+ overflow: auto;
}
.cu-gfs-loading {
@@ -12400,6 +12404,9 @@ button.cu-gfs-tree__button:focus-visible,
}
.cu-gfs-list__head {
+ position: sticky;
+ top: 0;
+ z-index: 2;
padding: var(--cu-space-2) var(--cu-space-3);
padding-inline: calc(var(--cu-space-3) + var(--cu-space-2));
border-bottom: 1px solid var(--cu-border-subtle);
@@ -13892,6 +13899,19 @@ button.cu-gfs-tree__button:focus-visible,
font-weight: 500;
}
+.cu-gfs-existing-access__item--inherited .cu-gfs-existing-access__subject {
+ color: var(--cu-text-soft);
+ font-weight: 400;
+}
+
+.cu-gfs-existing-access__inherited-from {
+ overflow: hidden;
+ color: var(--cu-text-muted);
+ font-size: var(--cu-font-size-xs);
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
.cu-gfs-existing-access__chips {
display: inline-flex;
flex-wrap: wrap;
diff --git a/control-ui/components/ControlAdminsPanel/index.tsx b/control-ui/components/ControlAdminsPanel/index.tsx
index d4cf5a19e..aebd8a13e 100644
--- a/control-ui/components/ControlAdminsPanel/index.tsx
+++ b/control-ui/components/ControlAdminsPanel/index.tsx
@@ -234,8 +234,8 @@ export function ControlAdminsPanel({
async function handleRevokeGfsOperatorLink(admin: ControlAdminListItem) {
const label = admin.email ? `${admin.username} (${admin.email})` : admin.username
const shouldRevoke = await confirm({
- title: 'Revoke Desktop GFS operator access',
- message: `Revoke Desktop GFS operator access for ${label}? The Control Admin, both passwords, and unrelated Control Plane access will remain unchanged.`,
+ title: 'Revoke Desktop EvenDrive operator access',
+ message: `Revoke Desktop EvenDrive operator access for ${label}? The Control Admin, both passwords, and unrelated Control Plane access will remain unchanged.`,
confirmLabel: 'Revoke access',
tone: 'danger',
})
@@ -246,7 +246,9 @@ export function ControlAdminsPanel({
try {
const link = admin.gfsOperatorLink
if (!link || link.status !== 'active' || !Number.isInteger(link.rowVersion)) {
- throw new Error('The current GFS operator-link version is unavailable; refresh and retry.')
+ throw new Error(
+ 'The current EvenDrive operator-link version is unavailable; refresh and retry.'
+ )
}
const result = await revokeControlAdminGfsOperatorLink(admin.id, {
rowVersion: link.rowVersion,
@@ -272,15 +274,15 @@ export function ControlAdminsPanel({
)
showToast(
result.revoked
- ? 'Desktop GFS operator access revoked.'
- : 'Desktop GFS operator access was already revoked.',
+ ? 'Desktop EvenDrive operator access revoked.'
+ : 'Desktop EvenDrive operator access was already revoked.',
{ tone: 'success' }
)
} catch (revokeError) {
setError(
revokeError instanceof Error
? revokeError.message
- : 'Failed to revoke Desktop GFS operator access'
+ : 'Failed to revoke Desktop EvenDrive operator access'
)
} finally {
setRevokingGfsLinkAdminId(null)
@@ -290,8 +292,8 @@ export function ControlAdminsPanel({
async function handleReactivateGfsOperatorLink(admin: ControlAdminListItem) {
const label = admin.email ? `${admin.username} (${admin.email})` : admin.username
const shouldReactivate = await confirm({
- title: 'Reactivate Desktop GFS operator access',
- message: `Reactivate Desktop GFS operator access for ${label}? This creates a new audited link generation without changing passwords or unrelated access.`,
+ title: 'Reactivate Desktop EvenDrive operator access',
+ message: `Reactivate Desktop EvenDrive operator access for ${label}? This creates a new audited link generation without changing passwords or unrelated access.`,
confirmLabel: 'Reactivate access',
tone: 'default',
})
@@ -299,7 +301,7 @@ export function ControlAdminsPanel({
const link = admin.gfsOperatorLink
if (!link || link.status !== 'revoked' || !Number.isInteger(link.rowVersion)) {
- setError('The revoked GFS operator-link version is unavailable; refresh and retry.')
+ setError('The revoked EvenDrive operator-link version is unavailable; refresh and retry.')
return
}
setReactivatingGfsLinkAdminId(admin.id)
@@ -329,15 +331,15 @@ export function ControlAdminsPanel({
)
showToast(
result.reactivated
- ? 'Desktop GFS operator access reactivated.'
- : 'Desktop GFS operator access remains revoked.',
+ ? 'Desktop EvenDrive operator access reactivated.'
+ : 'Desktop EvenDrive operator access remains revoked.',
{ tone: 'success' }
)
} catch (reactivateError) {
setError(
reactivateError instanceof Error
? reactivateError.message
- : 'Failed to reactivate Desktop GFS operator access'
+ : 'Failed to reactivate Desktop EvenDrive operator access'
)
} finally {
setReactivatingGfsLinkAdminId(null)
@@ -458,7 +460,7 @@ export function ControlAdminsPanel({
/>
<TableHeaderCell
activeDirection={adminSort.key === 'gfs' ? adminSort.direction : null}
- label="Desktop GFS access"
+ label="Desktop EvenDrive access"
onSort={() => adminSort.sortBy('gfs')}
/>
<TableHeaderCell
@@ -548,8 +550,8 @@ export function ControlAdminsPanel({
key: 'revoke-gfs',
label:
revokingGfsLinkAdminId === admin.id
- ? 'Revoking GFS…'
- : 'Revoke GFS',
+ ? 'Revoking EvenDrive…'
+ : 'Revoke EvenDrive',
disabled: revokingGfsLinkAdminId === admin.id,
onClick: () => void handleRevokeGfsOperatorLink(admin),
danger: true,
@@ -562,8 +564,8 @@ export function ControlAdminsPanel({
key: 'reactivate-gfs',
label:
reactivatingGfsLinkAdminId === admin.id
- ? 'Reactivating GFS…'
- : 'Reactivate GFS',
+ ? 'Reactivating EvenDrive…'
+ : 'Reactivate EvenDrive',
disabled: reactivatingGfsLinkAdminId === admin.id,
onClick: () => void handleReactivateGfsOperatorLink(admin),
},
diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsx
index 83de3bf29..468426faf 100644
--- a/control-ui/components/GfsBrowser.tsx
+++ b/control-ui/components/GfsBrowser.tsx
@@ -14,6 +14,7 @@ import { FileUploadModal } from '@components/FileUploadModal'
import { GfsImagePreview } from '@components/GfsImagePreview'
import { GfsMarkdownPreview } from '@components/GfsMarkdownPreview'
import { GfsMoveDialog } from '@components/GfsMoveDialog'
+import { GfsOpenLinkModal } from '@components/GfsOpenLinkModal'
import { GfsVideoPreview } from '@components/GfsVideoPreview'
import {
IconDocumentText,
@@ -77,6 +78,11 @@ interface Crumb {
id: string | null
rid: string | null
name: string
+ /** Folder crumbs carry the identity their ⋯ menu actions need; the
+ * synthetic root has none and gets no menu. */
+ kind?: 'directory'
+ gfsUri?: string
+ version?: number
}
const DRIVE = 'main'
@@ -220,6 +226,10 @@ export function GfsBrowser(): React.JSX.Element {
const [renameName, setRenameName] = useState('')
const [renaming, setRenaming] = useState(false)
const [deleteOpen, setDeleteOpen] = useState(false)
+ // "Open EvenDrive link" dialog launched from the folder ⋯ menus.
+ const [openLinkOpen, setOpenLinkOpen] = useState(false)
+ const [openLinkResolving, setOpenLinkResolving] = useState(false)
+ const [openLinkError, setOpenLinkError] = useState<string | null>(null)
// New-folder dialog (replaces the native window.prompt flow).
const [newFolderOpen, setNewFolderOpen] = useState(false)
const [creatingFolder, setCreatingFolder] = useState(false)
@@ -353,7 +363,7 @@ export function GfsBrowser(): React.JSX.Element {
if (!isSilentApiError(err)) {
// Background revalidation keeps the (stale) rows visible but still
// surfaces the failure instead of silently ignoring it.
- setError(err instanceof Error ? err.message : 'Failed to load the Global File System')
+ setError(err instanceof Error ? err.message : 'Failed to load EvenDrive')
}
} finally {
if (seq === loadSeqRef.current) {
@@ -477,7 +487,17 @@ export function GfsBrowser(): React.JSX.Element {
function openDirectory(child: GfsChild): void {
if (child.kind !== 'directory') return
setRenameTarget(null)
- setCrumbs(prev => [...prev, { id: child.resourceId, rid: child.rid, name: child.name }])
+ setCrumbs(prev => [
+ ...prev,
+ {
+ id: child.resourceId,
+ rid: child.rid,
+ name: child.name,
+ kind: 'directory',
+ gfsUri: child.gfsUri,
+ version: child.version,
+ },
+ ])
const cached = childCacheRef.current.get(child.resourceId)
if (cached) {
// Render the cached listing instantly; the effect-driven background
@@ -532,9 +552,9 @@ export function GfsBrowser(): React.JSX.Element {
async function copyGfsUri(uri: string): Promise<void> {
try {
await navigator.clipboard.writeText(uri)
- showToast('GFS link copied.', { tone: 'success' })
+ showToast('EvenDrive link copied.', { tone: 'success' })
} catch {
- showToast('Could not copy the GFS link.', { tone: 'error' })
+ showToast('Could not copy the EvenDrive link.', { tone: 'error' })
}
}
@@ -981,6 +1001,80 @@ export function GfsBrowser(): React.JSX.Element {
setRenameName(child.name)
}
+ /** Adapt a folder crumb for the row-action handlers (share, rename, move,
+ * delete) so a breadcrumb menu acts on exactly the same shape a
+ * parent-view row does. Returns null for the synthetic root. */
+ function crumbToChild(crumb: Crumb): GfsChild | null {
+ if (!crumb.id || !crumb.rid || crumb.kind !== 'directory') return null
+ return {
+ resourceId: crumb.id,
+ rid: crumb.rid,
+ gfsUri: crumb.gfsUri ?? `gfs://${DRIVE}/${crumb.rid}`,
+ name: crumb.name,
+ kind: crumb.kind,
+ path: null,
+ bytes: 0,
+ version: crumb.version ?? 0,
+ }
+ }
+
+ /** Single construction path for a FOLDER's ⋯ menu. Parent-view rows and
+ * breadcrumb crumb menus both build their props here, so their option
+ * lists cannot drift apart. File-only actions stay on the file rows. */
+ function folderMenuProps(folder: GfsChild) {
+ return {
+ resourceName: folder.name,
+ resourceUri: folder.gfsUri,
+ onManage: () => openManage(folder),
+ onCopyLink: () => void copyGfsUri(folder.gfsUri),
+ onOpenLink: () => setOpenLinkOpen(true),
+ onRename: () => openRowRename(folder),
+ onMove: () => openMove(folder),
+ onDelete: () => openManage(folder, 'delete'),
+ }
+ }
+
+ /** "Open EvenDrive link": resolve a pasted gfs:// URI through control-api
+ * and navigate the breadcrumb straight to that folder, mirroring the
+ * Desktop Files flow. */
+ async function openEvenDriveLink(uri: string): Promise<void> {
+ setOpenLinkError(null)
+ setOpenLinkResolving(true)
+ try {
+ const view = (await apiGet('/api/v1/gfs/resolve', { uri })) as {
+ resourceId: string
+ rid: string
+ gfsUri: string
+ name: string
+ kind: string
+ }
+ if (view.kind !== 'directory') {
+ setOpenLinkError('Only folder links can be opened here.')
+ return
+ }
+ setRenameTarget(null)
+ setSelected(null)
+ setRenameOpen(false)
+ setDeleteOpen(false)
+ setCrumbs([
+ { id: null, rid: null, name: '/' },
+ {
+ id: view.resourceId,
+ rid: view.rid,
+ name: view.name,
+ kind: 'directory',
+ gfsUri: view.gfsUri,
+ },
+ ])
+ setLoading(true)
+ setOpenLinkOpen(false)
+ } catch (err) {
+ setOpenLinkError(err instanceof Error ? err.message : 'Could not open the EvenDrive link.')
+ } finally {
+ setOpenLinkResolving(false)
+ }
+ }
+
async function renameResource(child: GfsChild, requestedName: string): Promise<void> {
if (!requestedName.trim() || renaming) return
setRenaming(true)
@@ -998,6 +1092,11 @@ export function GfsBrowser(): React.JSX.Element {
{ drive: DRIVE }
)
showToast('Resource renamed.', { tone: 'success' })
+ // A crumb rename must retitle the breadcrumb segment too, not just the
+ // listing rows refreshed below.
+ setCrumbs(prev =>
+ prev.map(crumb => (crumb.id === child.resourceId ? { ...crumb, name } : crumb))
+ )
setRenameOpen(false)
setRenameTarget(null)
setSelected(null)
@@ -1113,6 +1212,13 @@ export function GfsBrowser(): React.JSX.Element {
if (child.kind === 'directory') childCacheRef.current.delete(child.resourceId)
showToast('Resource deleted.', { tone: 'success' })
setSelected(null)
+ // Deleting a breadcrumb folder removes the open location with it —
+ // navigate up to its parent instead of refreshing a dead trail.
+ const crumbIndex = crumbs.findIndex(crumb => crumb.id === child.resourceId)
+ if (crumbIndex >= 0) {
+ goToCrumb(crumbIndex - 1)
+ return
+ }
await refreshCurrent()
} catch (err) {
showToast(err instanceof Error ? err.message : 'Could not delete resource.', {
@@ -1121,10 +1227,19 @@ export function GfsBrowser(): React.JSX.Element {
}
}
+ /** Move-dialog navigation context. Rows keep the full trail; a crumb target
+ * ends the trail at ITS parent so the dialog's current-location pill and
+ * no-op guard match the parent-view row semantics. */
+ const moveTargetCrumbIndex = moveTarget
+ ? crumbs.findIndex(crumb => crumb.id === moveTarget.resourceId)
+ : -1
+ const moveDialogCrumbs =
+ moveTargetCrumbIndex >= 0 ? crumbs.slice(0, moveTargetCrumbIndex) : crumbs
+
return (
<section
className="cu-gfs"
- aria-label="Global File System browser"
+ aria-label="EvenDrive browser"
aria-busy={loading || droppedUploadCount > 0 || movingResourceId !== null}
>
<div
@@ -1137,7 +1252,7 @@ export function GfsBrowser(): React.JSX.Element {
<TablePanelHeader
title={
<>
- <IconPaperclip /> Global File System
+ <IconPaperclip /> EvenDrive
</>
}
subtitle="Browse and manage drive resources and access grants from the admin plane."
@@ -1162,30 +1277,37 @@ export function GfsBrowser(): React.JSX.Element {
<div className="cu-gfs-panel">
<div className="cu-gfs-panel__toolbar">
<nav aria-label="Breadcrumb" className="cu-gfs-breadcrumb">
- {crumbs.map((crumb, index) => (
- <span className="cu-gfs-breadcrumb__item" key={`${crumb.id ?? 'root'}-${index}`}>
- {index > 0 ? <IconChevronRight width={14} height={14} /> : null}
- <button
- className={`cu-gfs-breadcrumb__button${
- crumb.name === '/' ? ' cu-gfs-breadcrumb__button--root' : ''
- }`}
- type="button"
- onClick={() => goToCrumb(index)}
- aria-current={index === crumbs.length - 1 ? 'page' : undefined}
- >
- {crumb.name === '/' ? (
- <>
- <span className="cu-gfs-breadcrumb__drive-icon" aria-hidden="true">
- <IconFolder />
- </span>
- <span>{DRIVE}</span>
- </>
- ) : (
- crumb.name
- )}
- </button>
- </span>
- ))}
+ {crumbs.map((crumb, index) => {
+ // Only the ACTIVE folder segment carries a ⋯ menu — mounted to
+ // the right of its name, mirroring the Desktop Files pattern.
+ // The synthetic drive root and ancestor crumbs stay plain.
+ const activeFolder = index === crumbs.length - 1 ? crumbToChild(crumb) : null
+ return (
+ <span className="cu-gfs-breadcrumb__item" key={`${crumb.id ?? 'root'}-${index}`}>
+ {index > 0 ? <IconChevronRight width={14} height={14} /> : null}
+ <button
+ className={`cu-gfs-breadcrumb__button${
+ crumb.name === '/' ? ' cu-gfs-breadcrumb__button--root' : ''
+ }`}
+ type="button"
+ onClick={() => goToCrumb(index)}
+ aria-current={index === crumbs.length - 1 ? 'page' : undefined}
+ >
+ {crumb.name === '/' ? (
+ <>
+ <span className="cu-gfs-breadcrumb__drive-icon" aria-hidden="true">
+ <IconFolder />
+ </span>
+ <span>{DRIVE}</span>
+ </>
+ ) : (
+ crumb.name
+ )}
+ </button>
+ {activeFolder ? <GfsResourceMenu {...folderMenuProps(activeFolder)} /> : null}
+ </span>
+ )
+ })}
</nav>
<div className="cu-gfs-panel__actions">
<Button
@@ -1386,27 +1508,27 @@ export function GfsBrowser(): React.JSX.Element {
>
<IconPencil width={16} height={16} />
</Button>
- <GfsResourceMenu
- resourceName={child.name}
- resourceUri={child.gfsUri}
- downloading={downloadingIds.has(child.resourceId)}
- onManage={() => openManage(child)}
- onPreview={
- isGfsPreviewFile(child.name) ? () => openFilePreview(child) : undefined
- }
- onDownload={
- child.kind !== 'directory' ? () => void downloadFile(child) : undefined
- }
- onReplace={
- child.kind !== 'directory'
- ? file => void replaceFile(child, file)
- : undefined
- }
- onCopyLink={() => void copyGfsUri(child.gfsUri)}
- onRename={() => openRowRename(child)}
- onMove={() => openMove(child)}
- onDelete={() => openManage(child, 'delete')}
- />
+ {child.kind === 'directory' ? (
+ <GfsResourceMenu {...folderMenuProps(child)} />
+ ) : (
+ <GfsResourceMenu
+ resourceName={child.name}
+ resourceUri={child.gfsUri}
+ downloading={downloadingIds.has(child.resourceId)}
+ onManage={() => openManage(child)}
+ onPreview={
+ isGfsPreviewFile(child.name)
+ ? () => openFilePreview(child)
+ : undefined
+ }
+ onDownload={() => void downloadFile(child)}
+ onReplace={file => void replaceFile(child, file)}
+ onCopyLink={() => void copyGfsUri(child.gfsUri)}
+ onRename={() => openRowRename(child)}
+ onMove={() => openMove(child)}
+ onDelete={() => openManage(child, 'delete')}
+ />
+ )}
</span>
</li>
)
@@ -1502,6 +1624,7 @@ export function GfsBrowser(): React.JSX.Element {
name: selected.name,
gfsUri: selected.gfsUri,
kind: selected.kind,
+ path: selected.path,
}}
/>
</section>
@@ -1557,10 +1680,22 @@ export function GfsBrowser(): React.JSX.Element {
/>
) : null}
+ {openLinkOpen ? (
+ <GfsOpenLinkModal
+ pending={openLinkResolving}
+ error={openLinkError}
+ onOpen={uri => void openEvenDriveLink(uri)}
+ onCancel={() => {
+ setOpenLinkOpen(false)
+ setOpenLinkError(null)
+ }}
+ />
+ ) : null}
+
{moveTarget ? (
<GfsMoveDialog
busy={movingResourceId === moveTarget.resourceId}
- initialCrumbs={crumbs}
+ initialCrumbs={moveDialogCrumbs}
onClose={() => setMoveTarget(null)}
onMove={async (destinationId, destinationName) => {
await moveResource(
diff --git a/control-ui/components/GfsMoveDialog/index.tsx b/control-ui/components/GfsMoveDialog/index.tsx
index a10d77091..dd0483c7c 100644
--- a/control-ui/components/GfsMoveDialog/index.tsx
+++ b/control-ui/components/GfsMoveDialog/index.tsx
@@ -305,8 +305,12 @@ export function GfsMoveDialog({
</div>
) : null}
- <div className="cu-gfs-move-dialog__tree-heading">Global File System</div>
- <div className="cu-gfs-move-dialog__tree" role="tree" aria-label="GFS destination folders">
+ <div className="cu-gfs-move-dialog__tree-heading">EvenDrive</div>
+ <div
+ className="cu-gfs-move-dialog__tree"
+ role="tree"
+ aria-label="EvenDrive destination folders"
+ >
{rootResourceId && rootResourceId !== target.resourceId ? (
<div
aria-expanded="true"
diff --git a/control-ui/components/GfsOpenLinkModal/index.tsx b/control-ui/components/GfsOpenLinkModal/index.tsx
new file mode 100644
index 000000000..ab4d54229
--- /dev/null
+++ b/control-ui/components/GfsOpenLinkModal/index.tsx
@@ -0,0 +1,104 @@
+'use client'
+
+import { useEffect, useId, useState } from 'react'
+import { Button, Field, TextInput } from '@components/ui'
+import type { GfsOpenLinkModalProps } from './types'
+
+/**
+ * Operator dialog for the breadcrumb folder menu's "Open EvenDrive link"
+ * action. It mirrors the Desktop Files flow: paste an EvenDrive (gfs://) link
+ * and jump directly to that folder. The dialog is presentational — it hands
+ * the trimmed URI back to the owning GfsBrowser, which resolves it through
+ * control-api and navigates the breadcrumb.
+ */
+export function GfsOpenLinkModal({
+ pending,
+ error,
+ onOpen,
+ onCancel,
+}: GfsOpenLinkModalProps): React.JSX.Element {
+ const titleId = useId()
+ const descriptionId = useId()
+ const inputId = useId()
+ const [uri, setUri] = useState('')
+
+ useEffect(() => {
+ const previousActiveElement =
+ document.activeElement instanceof HTMLElement ? document.activeElement : null
+ function onKeyDown(event: KeyboardEvent): void {
+ if (event.key === 'Escape' && !pending) onCancel()
+ }
+ window.addEventListener('keydown', onKeyDown)
+ return () => {
+ window.removeEventListener('keydown', onKeyDown)
+ previousActiveElement?.focus()
+ }
+ }, [onCancel, pending])
+
+ const trimmed = uri.trim()
+ const canSubmit = trimmed.length > 0 && !pending
+
+ function submit(): void {
+ if (!canSubmit) return
+ onOpen(trimmed)
+ }
+
+ return (
+ <div
+ className="cu-modal-backdrop"
+ role="presentation"
+ onMouseDown={event => {
+ if (event.target === event.currentTarget && !pending) onCancel()
+ }}
+ >
+ <section
+ className="cu-modal-panel cu-modal-panel--narrow"
+ role="dialog"
+ aria-modal="true"
+ aria-labelledby={titleId}
+ aria-describedby={descriptionId}
+ onMouseDown={event => event.stopPropagation()}
+ >
+ <div className="cu-modal-panel__head">
+ <h3 id={titleId} className="cu-modal-panel__title">
+ Open EvenDrive link
+ </h3>
+ </div>
+ <p id={descriptionId} className="cu-modal-copy">
+ Paste an EvenDrive link to jump directly to a folder.
+ </p>
+ <Field label="EvenDrive link" htmlFor={inputId}>
+ <TextInput
+ id={inputId}
+ autoFocus
+ autoComplete="off"
+ spellCheck={false}
+ disabled={pending}
+ value={uri}
+ placeholder="gfs://main/…"
+ onChange={event => setUri(event.target.value)}
+ onKeyDown={event => {
+ if (event.key === 'Enter' && canSubmit) {
+ event.preventDefault()
+ submit()
+ }
+ }}
+ />
+ </Field>
+ {error ? (
+ <p className="cu-field__error" role="alert">
+ {error}
+ </p>
+ ) : null}
+ <div className="cu-modal-panel__foot">
+ <Button variant="ghost" disabled={pending} onClick={onCancel}>
+ Cancel
+ </Button>
+ <Button variant="primary" disabled={!canSubmit} onClick={submit}>
+ {pending ? 'Opening…' : 'Open'}
+ </Button>
+ </div>
+ </section>
+ </div>
+ )
+}
diff --git a/control-ui/components/GfsOpenLinkModal/types.ts b/control-ui/components/GfsOpenLinkModal/types.ts
new file mode 100644
index 000000000..1ff654294
--- /dev/null
+++ b/control-ui/components/GfsOpenLinkModal/types.ts
@@ -0,0 +1,6 @@
+export interface GfsOpenLinkModalProps {
+ pending: boolean
+ error: string | null
+ onOpen: (uri: string) => void
+ onCancel: () => void
+}
diff --git a/control-ui/components/GfsResourceMenu/index.tsx b/control-ui/components/GfsResourceMenu/index.tsx
index 703ae59f2..f604f4846 100644
--- a/control-ui/components/GfsResourceMenu/index.tsx
+++ b/control-ui/components/GfsResourceMenu/index.tsx
@@ -10,6 +10,7 @@ import {
IconDotsVertical,
IconDownload,
IconEye,
+ IconPaperclip,
IconPencil,
IconShare,
IconTrash,
@@ -48,6 +49,7 @@ export function GfsResourceMenu({
onDownload,
onManage,
onMove,
+ onOpenLink,
onPreview,
onRename,
onReplace,
@@ -234,6 +236,7 @@ export function GfsResourceMenu({
{ submenu: true }
),
onManage ? null : menuAction('copy-link', 'Copy link', <IconCopy />, onCopyLink),
+ menuAction('open-link', 'Open EvenDrive link', <IconPaperclip />, onOpenLink),
menuAction('preview', 'Preview', <IconEye />, onPreview),
].filter(isMenuAction),
[
diff --git a/control-ui/components/GfsResourceMenu/types.ts b/control-ui/components/GfsResourceMenu/types.ts
index 2a4b5b96f..d13dd23b9 100644
--- a/control-ui/components/GfsResourceMenu/types.ts
+++ b/control-ui/components/GfsResourceMenu/types.ts
@@ -5,6 +5,9 @@ export interface GfsResourceMenuProps {
onDownload?: () => void
onManage?: () => void
onMove?: () => void
+ /** Open a pasted EvenDrive link (jump-to-resource flow). Present on the
+ * folder menus shared between parent-view rows and breadcrumb crumbs. */
+ onOpenLink?: () => void
onPreview?: () => void
onRename: () => void
onReplace?: (file: File) => void
diff --git a/control-ui/components/Sidebar/constants.tsx b/control-ui/components/Sidebar/constants.tsx
index b19dc5444..3e25f0f12 100644
--- a/control-ui/components/Sidebar/constants.tsx
+++ b/control-ui/components/Sidebar/constants.tsx
@@ -64,7 +64,7 @@ export const SIDEBAR_TABS: Record<SidebarTab, SidebarItem> = {
icon: <IconFolder />,
children: [
{
- label: 'Global File System',
+ label: 'EvenDrive',
href: CONTROL_ROUTES.globalFileSystem,
icon: <IconPaperclip />,
},
diff --git a/control-ui/components/__tests__/ControlAdminsPanel.gfsOperatorLink.test.tsx b/control-ui/components/__tests__/ControlAdminsPanel.gfsOperatorLink.test.tsx
index 580ba2345..e2c000bf5 100644
--- a/control-ui/components/__tests__/ControlAdminsPanel.gfsOperatorLink.test.tsx
+++ b/control-ui/components/__tests__/ControlAdminsPanel.gfsOperatorLink.test.tsx
@@ -111,7 +111,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
name: 'Actions for initial-admin ([email protected])',
})
)
- fireEvent.click(screen.getByRole('menuitem', { name: 'Revoke GFS' }))
+ fireEvent.click(screen.getByRole('menuitem', { name: 'Revoke EvenDrive' }))
await waitFor(() =>
expect(revokeControlAdminGfsOperatorLink).toHaveBeenCalledWith('admin-1', {
@@ -119,7 +119,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
reason: 'control_ui_revoke',
})
)
- expect(showToastMock).toHaveBeenCalledWith('Desktop GFS operator access revoked.', {
+ expect(showToastMock).toHaveBeenCalledWith('Desktop EvenDrive operator access revoked.', {
tone: 'success',
})
expect(screen.getByTestId('gfs-operator-link-admin-1')).toHaveTextContent('Revoked')
@@ -133,7 +133,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
name: 'Actions for initial-admin ([email protected])',
})
fireEvent.click(actionsButton)
- fireEvent.click(screen.getByRole('menuitem', { name: 'Revoke GFS' }))
+ fireEvent.click(screen.getByRole('menuitem', { name: 'Revoke EvenDrive' }))
await waitFor(() => expect(confirmMock).toHaveBeenCalled())
expect(revokeControlAdminGfsOperatorLink).not.toHaveBeenCalled()
@@ -322,7 +322,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
expect(screen.queryByText('retired-admin')).not.toBeInTheDocument()
expect(
screen.queryByRole('button', {
- name: /Reactivate Desktop GFS operator access for retired-admin/,
+ name: /Reactivate Desktop EvenDrive operator access for retired-admin/,
})
).not.toBeInTheDocument()
})
@@ -352,7 +352,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
})
)
const reactivateItem = screen.getByRole('menuitem', {
- name: 'Reactivate GFS',
+ name: 'Reactivate EvenDrive',
})
fireEvent.click(reactivateItem)
@@ -362,7 +362,7 @@ describe('ControlAdminsPanel GFS operator link lifecycle', () => {
reason: 'control_ui_reactivate',
})
)
- expect(showToastMock).toHaveBeenCalledWith('Desktop GFS operator access reactivated.', {
+ expect(showToastMock).toHaveBeenCalledWith('Desktop EvenDrive operator access reactivated.', {
tone: 'success',
})
expect(screen.getByTestId('gfs-operator-link-admin-1')).toHaveTextContent('Active')
diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsx
index 36deb76fb..d5f7cc7a9 100644
--- a/control-ui/components/__tests__/GfsBrowser.test.tsx
+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx
@@ -312,7 +312,7 @@ describe('GfsBrowser', () => {
renderBrowser()
await screen.findByText('No resources are visible in this folder.')
- const title = screen.getByText('Global File System').closest('.cu-panel-title')
+ const title = screen.getByText('EvenDrive').closest('.cu-panel-title')
expect(title?.querySelector('path')).toHaveAttribute(
'd',
'm21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'
@@ -465,7 +465,7 @@ describe('GfsBrowser', () => {
renderBrowser()
await screen.findByText('No resources are visible in this folder.')
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const image = new File(['operator image'], 'diagram.png', { type: 'image/png' })
const markdown = new File(['# Operator notes'], 'notes.md', { type: 'text/markdown' })
const pdf = new File(['%PDF operator report'], 'report.pdf', { type: 'application/pdf' })
@@ -515,7 +515,7 @@ describe('GfsBrowser', () => {
renderBrowser()
await screen.findByText('report.txt')
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
fireEvent.drop(browser.querySelector('.cu-gfs-card')!, {
dataTransfer: {
dropEffect: 'none',
@@ -874,7 +874,7 @@ describe('GfsBrowser', () => {
renderBrowser()
await screen.findByText('No resources are visible in this folder.')
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const file = new File(['resume data'], 'resume.md', {
type: 'text/markdown',
lastModified,
@@ -914,7 +914,7 @@ describe('GfsBrowser', () => {
renderBrowser()
await screen.findByText('No resources are visible in this folder.')
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
fireEvent.drop(browser.querySelector('.cu-gfs-card')!, {
dataTransfer: {
dropEffect: 'none',
@@ -1047,7 +1047,7 @@ describe('GfsBrowser', () => {
Object.defineProperty(oversized, 'size', { value: GFS_FILE_UPLOAD_PROTOCOL_MAX_BYTES + 1 })
const arrayBuffer = vi.spyOn(oversized, 'arrayBuffer')
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
fireEvent.drop(browser.querySelector('.cu-gfs-card')!, {
dataTransfer: { dropEffect: 'none', files: [oversized], types: ['Files'] },
})
@@ -1427,6 +1427,77 @@ describe('GfsBrowser', () => {
)
})
+ it('shows the ⋯ menu only on the active breadcrumb folder and opens pasted EvenDrive links', async () => {
+ const orgFolder = child('org', 'directory', 1)
+ const nestedFolder = child('nested', 'directory', 3)
+ mockApiGet.mockImplementation(async (path: string) => {
+ if (path === '/api/v1/gfs/tree') {
+ return { items: [orgFolder], nextCursor: null }
+ }
+ if (path === '/api/v1/gfs/resources/id-1/children') {
+ return { items: [nestedFolder], nextCursor: null }
+ }
+ if (path === '/api/v1/gfs/resolve') {
+ return {
+ resourceId: 'id-3',
+ rid: 'r3',
+ gfsUri: 'gfs://main/r3',
+ name: 'nested',
+ kind: 'directory',
+ }
+ }
+ return { items: [], nextCursor: null }
+ })
+ renderBrowser()
+
+ fireEvent.click(await screen.findByRole('button', { name: 'org' }))
+ await screen.findByText('nested')
+
+ const breadcrumb = screen.getByRole('navigation', { name: 'Breadcrumb' })
+ // Only the ACTIVE folder (org) carries a menu. The synthetic drive root
+ // and non-active segments — and the nested ROW, which lives in the listing
+ // rather than the breadcrumb — do not render breadcrumb menus.
+ expect(within(breadcrumb).queryByRole('button', { name: 'Actions for main' })).toBeNull()
+ expect(within(breadcrumb).queryByRole('button', { name: 'Actions for nested' })).toBeNull()
+ const activeTrigger = within(breadcrumb).getByRole('button', { name: 'Actions for org' })
+ // The menu sits to the RIGHT of the active folder's name: its wrapper is
+ // the breadcrumb label button's next sibling within the segment.
+ const activeWrapper = activeTrigger.closest('.cu-gfs-resource-menu')
+ expect(activeWrapper?.previousElementSibling).toBe(
+ within(breadcrumb).getByRole('button', { name: 'org' })
+ )
+
+ // The active folder menu lists the same options as that folder's row menu
+ // in its parent view.
+ await openResourceMenu('nested')
+ const rowOptions = screen.getAllByRole('menuitem').map(item => item.textContent)
+ fireEvent.keyDown(document, { key: 'Escape' })
+ await openResourceMenu('org')
+ expect(screen.getAllByRole('menuitem').map(item => item.textContent)).toEqual(rowOptions)
+ expect(rowOptions).toEqual(['Share', 'Open EvenDrive link', 'Rename', 'Move to…', 'Delete'])
+
+ // "Open EvenDrive link" resolves the pasted URI and navigates to it; the
+ // menu then follows the newly active folder.
+ 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: 'gfs://main/r3' },
+ })
+ fireEvent.click(within(dialog).getByRole('button', { name: 'Open' }))
+
+ await waitFor(() =>
+ expect(mockApiGet).toHaveBeenCalledWith('/api/v1/gfs/resolve', { uri: 'gfs://main/r3' })
+ )
+ await waitFor(() =>
+ expect(within(breadcrumb).getByRole('button', { name: 'nested' })).toBeTruthy()
+ )
+ await waitFor(() =>
+ expect(within(breadcrumb).getByRole('button', { name: 'Actions for nested' })).toBeTruthy()
+ )
+ expect(within(breadcrumb).queryByRole('button', { name: 'Actions for org' })).toBeNull()
+ expect(screen.queryByRole('dialog', { name: 'Open EvenDrive link' })).toBeNull()
+ })
+
it('does not fall back to legacy when replacing a persisted resumable session', async () => {
const lastModified = 1_725_000_000_000
const uploadId = '66666666-6666-4666-8666-666666666666'
diff --git a/control-ui/components/__tests__/Sidebar.test.tsx b/control-ui/components/__tests__/Sidebar.test.tsx
index db24a8fe1..075d54848 100644
--- a/control-ui/components/__tests__/Sidebar.test.tsx
+++ b/control-ui/components/__tests__/Sidebar.test.tsx
@@ -104,7 +104,7 @@ describe('Sidebar publisher gating', () => {
it.each([
['/agent-outputs/recipe-artifacts', 'Agent Outputs', '/agent-outputs/recipe-artifacts'],
['/agent-outputs/desktop-app-artifacts', 'Agent Outputs', '/agent-outputs/recipe-artifacts'],
- ['/global-file-system', 'Global File System', '/global-file-system'],
+ ['/global-file-system', 'EvenDrive', '/global-file-system'],
])('selects the matching Files child for %s', (pathname, label, href) => {
vi.mocked(hook.usePublishScope).mockReturnValue(
publishScopeState({ scope: null, loading: false, error: false })
@@ -126,7 +126,7 @@ describe('Sidebar publisher gating', () => {
)
render(<Sidebar currentTab="directories" />)
- for (const label of ['Agent Outputs', 'Global File System']) {
+ for (const label of ['Agent Outputs', 'EvenDrive']) {
const child = screen.getByRole('link', { name: label })
expect(child.querySelector('.cu-sidebar__subitem-icon svg')).toBeInTheDocument()
}
@@ -185,7 +185,7 @@ describe('Sidebar publisher gating', () => {
navigationState.pathname = '/global-file-system'
render(<Sidebar currentTab="directories" />)
- const globalFileSystem = screen.getByRole('link', { name: 'Global File System' })
+ const globalFileSystem = screen.getByRole('link', { name: 'EvenDrive' })
expect(globalFileSystem.querySelector('path')).toHaveAttribute(
'd',
'm21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'
@@ -211,7 +211,7 @@ describe('Sidebar publisher gating', () => {
'LLM Prices',
])
expect(SIDEBAR_TABS.directories.children?.map(child => child.label)).toEqual([
- 'Global File System',
+ 'EvenDrive',
'Agent Outputs',
])
})
diff --git a/control-ui/e2e/clerum-dev-smoke.spec.ts b/control-ui/e2e/clerum-dev-smoke.spec.ts
index e2dc71ed2..4d1e11c6e 100644
--- a/control-ui/e2e/clerum-dev-smoke.spec.ts
+++ b/control-ui/e2e/clerum-dev-smoke.spec.ts
@@ -168,7 +168,7 @@ test.describe('example-dev — cluster smoke', () => {
test('S7. GFS — sidebar navigation loads through Control UI proxy and live cluster resources exist', async () => {
await login(page)
await page.goto(BASE_UI)
- const globalFileSystemLink = page.getByRole('link', { name: /Global File System/i })
+ const globalFileSystemLink = page.getByRole('link', { name: /EvenDrive/i })
await expect(globalFileSystemLink).toBeVisible()
const treeResponse = page.waitForResponse(
@@ -179,7 +179,7 @@ test.describe('example-dev — cluster smoke', () => {
await globalFileSystemLink.click()
await expect(page).toHaveURL(/\/global-file-system$/)
- await expect(page.getByRole('heading', { name: 'Global File System' })).toBeVisible()
+ await expect(page.getByRole('heading', { name: 'EvenDrive' })).toBeVisible()
await expect(page.getByText('Drive', { exact: true })).toBeVisible()
await expect(page.getByText('main', { exact: true }).first()).toBeVisible()
diff --git a/control-ui/e2e/gfs-operator-journey.spec.ts b/control-ui/e2e/gfs-operator-journey.spec.ts
index d3c83d52d..65edc7fa7 100644
--- a/control-ui/e2e/gfs-operator-journey.spec.ts
+++ b/control-ui/e2e/gfs-operator-journey.spec.ts
@@ -45,7 +45,7 @@ test.describe('GFS operator journey', () => {
await test.step('operator remains on the GFS page with the seeded folder visible', async () => {
await expect(page).toHaveURL(/\/global-file-system(?:$|\?)/, { timeout: 15_000 })
await expect(page).not.toHaveURL(/\?next=%2Fgfs/)
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
await expect(
page
.getByRole('list', { name: 'Current folder resources' })
diff --git a/control-ui/e2e/qa-recorder-global-fs.spec.ts b/control-ui/e2e/qa-recorder-global-fs.spec.ts
index 7e0037152..881da1567 100644
--- a/control-ui/e2e/qa-recorder-global-fs.spec.ts
+++ b/control-ui/e2e/qa-recorder-global-fs.spec.ts
@@ -73,7 +73,7 @@ test.describe('optional QA recorder: Control UI Global File System', () => {
test('Global file system — folder + upload + rename', async ({ page }, testInfo) => {
requireRecorderConfirm(
'QA_RECORDER_CONFIRM_MUTATIONS',
- 'This journey creates a folder, uploads a file, and renames it in the Global File System.'
+ 'This journey creates a folder, uploads a file, and renames it in EvenDrive.'
)
assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
diff --git a/control-ui/e2e/support/gfs-bulk-operator-journey.test.ts b/control-ui/e2e/support/gfs-bulk-operator-journey.test.ts
index 7fbb30a60..5de7a17bd 100644
--- a/control-ui/e2e/support/gfs-bulk-operator-journey.test.ts
+++ b/control-ui/e2e/support/gfs-bulk-operator-journey.test.ts
@@ -69,7 +69,7 @@ export async function exerciseGfsBulkOperatorJourney(page: Page): Promise<void>
await loginControlUi(page)
await openGlobalFileSystemFromSidebar(page)
await expect(page).toHaveURL(/\/global-file-system(?:$|\?)/, { timeout: 15_000 })
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
})
await exerciseGfsResourceCrudJourney({
@@ -172,7 +172,7 @@ export async function exerciseGfsBulkOperatorJourney(page: Page): Promise<void>
await page.reload()
await expect(page).toHaveURL(/\/global-file-system(?:$|\?)/, { timeout: 15_000 })
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
const row = folderRow(fixture.name)
await expect(row).toBeVisible({ timeout: 20_000 })
await row.getByRole('button', { name: `Actions for ${fixture.name}` }).click()
diff --git a/control-ui/e2e/support/gfs-control-ui-session.ts b/control-ui/e2e/support/gfs-control-ui-session.ts
index 6afa1e26c..afd405649 100644
--- a/control-ui/e2e/support/gfs-control-ui-session.ts
+++ b/control-ui/e2e/support/gfs-control-ui-session.ts
@@ -80,7 +80,7 @@ export async function openGlobalFileSystemFromSidebar(page: Page): Promise<void>
await expect(directoriesSection).toBeVisible()
await directoriesSection.click()
const globalFileSystem = page.getByRole('link', {
- name: 'Global File System',
+ name: 'EvenDrive',
exact: true,
})
await expect(globalFileSystem).toBeVisible()
@@ -94,7 +94,7 @@ export async function openGfsFilePanel(
await loginControlUi(page)
await openGlobalFileSystemFromSidebar(page)
await expect(page).toHaveURL(/\/global-file-system(?:$|\?)/, { timeout: 15_000 })
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
const resources = page.getByRole('list', { name: 'Current folder resources' })
await resources.getByRole('button', { name: fixture.name, exact: true }).click()
const actions = resources.getByRole('button', {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 6e19a7ac7..03eccd756 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.576",
+ "version": "0.1.577",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.576",
+ "version": "0.1.577",
"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.json
index 3d70dd5e1..3028160ce 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.576",
+ "version": "0.1.577",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --git a/desktop-app/src/desktopCommands.ts b/desktop-app/src/desktopCommands.ts
index f4f5bb3ef..cd978d9c5 100644
--- a/desktop-app/src/desktopCommands.ts
+++ b/desktop-app/src/desktopCommands.ts
@@ -354,8 +354,8 @@ const definitions = [
},
{
id: 'navigate.files',
- label: 'Go to Global File System',
- description: 'Open the Global File System browser.',
+ label: 'Go to EvenDrive',
+ description: 'Open the EvenDrive browser.',
group: 'Navigation',
order: 220,
defaultBinding: null,
diff --git a/desktop-app/test/e2e-playwright/gfs-agent-copy.test.ts b/desktop-app/test/e2e-playwright/gfs-agent-copy.test.ts
index 47a40cc34..aa6805951 100644
--- a/desktop-app/test/e2e-playwright/gfs-agent-copy.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-agent-copy.test.ts
@@ -220,7 +220,7 @@ function comparableTree(root: ReturnType<typeof getGfsTreeSnapshot>) {
async function openFilesBrowser(page: Page): Promise<Locator> {
await openResourcesNavItem(page, 'nav-files')
- const browser = page.getByRole('region', { name: 'Global File System browser' })
+ const browser = page.getByRole('region', { name: 'EvenDrive browser' })
await expect(browser).toBeVisible({ timeout: 20_000 })
return browser
}
diff --git a/desktop-app/test/e2e-playwright/gfs-agent-delegation.test.ts b/desktop-app/test/e2e-playwright/gfs-agent-delegation.test.ts
index 951290afe..cf4e670fa 100644
--- a/desktop-app/test/e2e-playwright/gfs-agent-delegation.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-agent-delegation.test.ts
@@ -327,7 +327,7 @@ async function expectNoDisclosureDenial(
async function openFilesBrowser(page: Page): Promise<Locator> {
await openResourcesNavItem(page, 'nav-files')
- const browser = page.getByRole('region', { name: 'Global File System browser' })
+ const browser = page.getByRole('region', { name: 'EvenDrive browser' })
await expect(browser).toBeVisible({ timeout: 20_000 })
return browser
}
diff --git a/desktop-app/test/e2e-playwright/gfs-agent-file-read.test.ts b/desktop-app/test/e2e-playwright/gfs-agent-file-read.test.ts
index d010e37b9..dabf23fbb 100644
--- a/desktop-app/test/e2e-playwright/gfs-agent-file-read.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-agent-file-read.test.ts
@@ -181,9 +181,10 @@ test.describe('GFS agent file read (issue #775)', () => {
await expect(page.getByRole('heading', { name: 'Files', exact: true })).toBeVisible({
timeout: 20_000,
})
- await expect(
- page.getByRole('region', { name: 'Global File System browser' })
- ).toContainText(fixtures.granted.fileName, { timeout: 20_000 })
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toContainText(
+ fixtures.granted.fileName,
+ { timeout: 20_000 }
+ )
})
let expandBtn: import('@playwright/test').Locator
diff --git a/desktop-app/test/e2e-playwright/gfs-desktop-operator-parity.test.ts b/desktop-app/test/e2e-playwright/gfs-desktop-operator-parity.test.ts
index 3d31fe280..c4a8dcb57 100644
--- a/desktop-app/test/e2e-playwright/gfs-desktop-operator-parity.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-desktop-operator-parity.test.ts
@@ -225,7 +225,7 @@ test.describe.serial('GFS Desktop linked-operator parity', () => {
await ensureOperatorRoot(desktopPage)
await expect(desktopPage.getByTestId('gfs-view-operator')).toBeVisible()
const root = desktopPage.getByTestId('gfs-root-operator')
- await expect(root).toHaveText('Global File System')
+ await expect(root).toHaveText('EvenDrive')
await expect(root).toHaveAttribute('data-resource-id', rootResourceId)
await expect(desktopPage.getByTestId('gfs-manage-access-action')).toBeVisible()
})
@@ -623,11 +623,11 @@ test.describe.serial('GFS Desktop linked-operator parity', () => {
// After revocation the session remains valid for ordinary-user GFS access,
// so the operator-root URI is a resource-scoped generic 403 and must stay
// local to the dialog rather than revoking the whole Desktop session.
- await page.getByRole('button', { name: 'Open GFS link' }).click()
- const linkDialog = page.getByRole('dialog', { name: 'Open GFS link' })
+ await page.getByRole('button', { name: 'Open EvenDrive link' }).click()
+ const linkDialog = page.getByRole('dialog', { name: 'Open EvenDrive link' })
await expect(linkDialog).toBeVisible()
await linkDialog
- .getByLabel('gfs URI')
+ .getByLabel('EvenDrive link')
.fill(`gfs://main/${operatorJourney.rootResourceId!.replace(/-/g, '')}`)
await linkDialog.getByRole('button', { name: 'Open', exact: true }).click()
@@ -635,7 +635,7 @@ test.describe.serial('GFS Desktop linked-operator parity', () => {
await expect(page.getByTestId('gfs-error-unauthorized')).toHaveCount(0)
await expect(page.getByTestId('gfs-create-folder-action')).toBeVisible()
await expect(page.getByTestId('gfs-upload-action')).toBeVisible()
- await linkDialog.getByRole('button', { name: 'Close GFS link dialog' }).click()
+ await linkDialog.getByRole('button', { name: 'Close EvenDrive link dialog' }).click()
await expect(linkDialog).toHaveCount(0)
await expect
.poll(() =>
@@ -713,10 +713,10 @@ test.describe.serial('GFS Desktop linked-operator parity', () => {
// Re-open the link through the visible Desktop action. The session remains
// ordinary-user authenticated after revoke, so there is no session-level
// retry banner; the reactivated server link must return the operator root.
- await page.getByRole('button', { name: 'Open GFS link' }).click()
- const reactivatedLinkDialog = page.getByRole('dialog', { name: 'Open GFS link' })
+ await page.getByRole('button', { name: 'Open EvenDrive link' }).click()
+ const reactivatedLinkDialog = page.getByRole('dialog', { name: 'Open EvenDrive link' })
await reactivatedLinkDialog
- .getByLabel('gfs URI')
+ .getByLabel('EvenDrive link')
.fill(`gfs://main/${operatorJourney.rootResourceId!.replace(/-/g, '')}`)
await reactivatedLinkDialog.getByRole('button', { name: 'Open', exact: true }).click()
await expect(page.getByTestId('gfs-view-operator')).toBeVisible({ timeout: 30_000 })
diff --git a/desktop-app/test/e2e-playwright/gfs-upload-v2.test.ts b/desktop-app/test/e2e-playwright/gfs-upload-v2.test.ts
index d99b764d0..ec0e28151 100644
--- a/desktop-app/test/e2e-playwright/gfs-upload-v2.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-upload-v2.test.ts
@@ -240,7 +240,7 @@ async function openFolder(
const openFilesAttempt = async (timeout: number): Promise<void> => {
await openResourcesNavItem(page, 'nav-files')
await expect(filesHeading).toBeVisible({ timeout })
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible({
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible({
timeout,
})
}
@@ -259,7 +259,7 @@ async function openFolder(
throw firstNavigationError
}
}
- const browser = page.getByRole('region', { name: 'Global File System browser' })
+ const browser = page.getByRole('region', { name: 'EvenDrive browser' })
await expect(browser.getByRole('button', { name: folderName, exact: true })).toBeVisible({
timeout: 60_000,
})
diff --git a/desktop-app/test/e2e-playwright/gfs-user-journey.test.ts b/desktop-app/test/e2e-playwright/gfs-user-journey.test.ts
index 043147340..b3e0e5661 100644
--- a/desktop-app/test/e2e-playwright/gfs-user-journey.test.ts
+++ b/desktop-app/test/e2e-playwright/gfs-user-journey.test.ts
@@ -75,9 +75,9 @@ async function loginControlUi(page: Page): Promise<void> {
async function openControlGfs(page: Page): Promise<void> {
await loginControlUi(page)
await page.getByRole('button', { name: 'Directories', exact: true }).click()
- await page.getByRole('link', { name: /Global File System/i }).click()
+ await page.getByRole('link', { name: /EvenDrive/i }).click()
await expect(page).toHaveURL(/\/global-file-system(?:$|\?)/, { timeout: 15_000 })
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
}
async function expectCopyButtonWritesClipboard(
@@ -365,9 +365,9 @@ test.describe('GFS Desktop user journey', () => {
await expect(
ownerSession.page.getByRole('region', { name: 'GFS resources shared with you' })
).toBeVisible()
- await expect(ownerSession.page.getByLabel('gfs URI')).toBeVisible()
+ await expect(ownerSession.page.getByLabel('EvenDrive link')).toBeVisible()
await expect(
- ownerSession.page.getByText(/Automatic GFS discovery is not available/i)
+ ownerSession.page.getByText(/Automatic EvenDrive discovery is not available/i)
).toHaveCount(0)
})
@@ -394,7 +394,7 @@ test.describe('GFS Desktop user journey', () => {
})
await shared.getByRole('button', { name: fixture.name, exact: true }).click()
const browser = ownerSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toBeVisible({ timeout: 30_000 })
await expect(
@@ -413,10 +413,10 @@ test.describe('GFS Desktop user journey', () => {
})
await test.step('user can still open a direct gfs:// link manually', async () => {
- await ownerSession.page.getByLabel('gfs URI').fill(fixture.uri)
+ await ownerSession.page.getByLabel('EvenDrive link').fill(fixture.uri)
await ownerSession.page.getByRole('button', { name: 'Open', exact: true }).click()
const browser = ownerSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toContainText(fixture.childName, { timeout: 30_000 })
})
@@ -435,7 +435,7 @@ test.describe('GFS Desktop user journey', () => {
await test.step('user creates, uploads, renames, replaces, and deletes with their own GFS permissions', async () => {
const browser = ownerSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser.getByRole('button', { name: 'New folder' })).toBeVisible()
await expect(browser.locator('label:has-text("Upload file")')).toBeVisible()
@@ -559,7 +559,7 @@ test.describe('GFS Desktop user journey', () => {
.toMatchObject({ deleted: true })
await expect(browser.getByRole('heading', { name: renamedName })).toHaveCount(0)
- await ownerSession.page.getByLabel('gfs URI').fill(fixture.uri)
+ await ownerSession.page.getByLabel('EvenDrive link').fill(fixture.uri)
await ownerSession.page.getByRole('button', { name: 'Open', exact: true }).click()
await expect(browser).toContainText(fixture.childName, { timeout: 30_000 })
})
@@ -597,7 +597,7 @@ test.describe('GFS Desktop user journey', () => {
})
await shared.getByRole('button', { name: shareChainFixture.name, exact: true }).click()
const browser = ownerSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toContainText(shareChainFixture.childName, { timeout: 30_000 })
@@ -611,7 +611,7 @@ test.describe('GFS Desktop user journey', () => {
})
await shared.getByRole('button', { name: teamFixture.name, exact: true }).click()
const browser = ownerSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toContainText(teamFixture.childName, { timeout: 30_000 })
@@ -662,7 +662,7 @@ test.describe('GFS Desktop user journey', () => {
delegateSession.page.getByRole('heading', { name: 'Files', exact: true })
).toBeVisible({ timeout: 20_000 })
await expect(
- delegateSession.page.getByText(/Automatic GFS discovery is not available/i)
+ delegateSession.page.getByText(/Automatic EvenDrive discovery is not available/i)
).toHaveCount(0)
const shared = delegateSession.page.getByRole('region', {
name: 'GFS resources shared with you',
@@ -684,7 +684,7 @@ test.describe('GFS Desktop user journey', () => {
})
await shared.getByRole('button', { name: fixture.childName, exact: true }).click()
const browser = delegateSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toBeVisible({ timeout: 30_000 })
await expect(browser).toContainText(fixture.childName)
@@ -700,10 +700,10 @@ test.describe('GFS Desktop user journey', () => {
})
await test.step('second user opens an authorized share from a direct gfs:// URI', async () => {
- await delegateSession.page.getByLabel('gfs URI').fill(fixture.childUri)
+ await delegateSession.page.getByLabel('EvenDrive link').fill(fixture.childUri)
await delegateSession.page.getByRole('button', { name: 'Open', exact: true }).click()
const browser = delegateSession.page.getByRole('region', {
- name: 'Global File System browser',
+ name: 'EvenDrive browser',
})
await expect(browser).toContainText(fixture.childName, { timeout: 30_000 })
const delegation = delegateSession.page.getByRole('region', { name: 'Delegate access' })
@@ -728,7 +728,7 @@ test.describe('GFS Desktop user journey', () => {
})
await test.step('second user cannot open an unrelated direct file link', async () => {
- await delegateSession.page.getByLabel('gfs URI').fill(fileFixture.fileUri)
+ await delegateSession.page.getByLabel('EvenDrive link').fill(fileFixture.fileUri)
await delegateSession.page.getByRole('button', { name: 'Open', exact: true }).click()
await expect(delegateSession.page.getByText(/forbidden|denied|403/i)).toBeVisible({
timeout: 20_000,
diff --git a/desktop-app/test/e2e-playwright/helpers/gfsDesktopOperatorParityFixtures.ts b/desktop-app/test/e2e-playwright/helpers/gfsDesktopOperatorParityFixtures.ts
index 8a6e0f4da..ebd46b520 100644
--- a/desktop-app/test/e2e-playwright/helpers/gfsDesktopOperatorParityFixtures.ts
+++ b/desktop-app/test/e2e-playwright/helpers/gfsDesktopOperatorParityFixtures.ts
@@ -963,7 +963,7 @@ export class GfsDesktopOperatorJourney {
await expect(page.getByRole('heading', { name: 'Files', exact: true })).toBeVisible({
timeout: 30_000,
})
- await expect(page.getByRole('region', { name: 'Global File System browser' })).toBeVisible()
+ await expect(page.getByRole('region', { name: 'EvenDrive browser' })).toBeVisible()
}
private requiredControlPage(): Page {
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-shared-files.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-shared-files.spec.ts
index c855c9462..ff0a4089b 100644
--- a/desktop-app/test/e2e-playwright/qa-recorder-shared-files.spec.ts
+++ b/desktop-app/test/e2e-playwright/qa-recorder-shared-files.spec.ts
@@ -59,9 +59,11 @@ test('optional QA recorder: Desktop shared files browser journey', async ({}, te
timeout: 20_000,
})
- // The "Open GFS link" affordance lives in the card header and is always
+ // The "Open EvenDrive link" affordance lives in the card header and is always
// present — a stable proof that the browse/open affordances rendered.
- await expect(page.getByRole('button', { name: 'Open GFS link', exact: true })).toBeVisible({
+ await expect(
+ page.getByRole('button', { name: 'Open EvenDrive link', exact: true })
+ ).toBeVisible({
timeout: 20_000,
})
diff --git a/desktop-app/ui/src/components/GfsResourceMenu/index.tsx b/desktop-app/ui/src/components/GfsResourceMenu/index.tsx
index 94146a0c9..4753b4b8d 100644
--- a/desktop-app/ui/src/components/GfsResourceMenu/index.tsx
+++ b/desktop-app/ui/src/components/GfsResourceMenu/index.tsx
@@ -298,7 +298,7 @@ export function GfsResourceMenu({
),
onManage ? null : menuAction('copy-link', 'Copy link', <IconCopy />, onCopyLink),
menuAction('open-folder', 'Open folder', <IconContexts />, onOpen),
- menuAction('open-gfs-link', 'Open GFS link', <IconConnectors />, onOpenGfsLink),
+ menuAction('open-gfs-link', 'Open EvenDrive link', <IconConnectors />, onOpenGfsLink),
menuAction('preview', 'Preview', <IconEye />, onPreview),
].filter(isMenuAction),
[
diff --git a/desktop-app/ui/src/components/SidebarNav/index.tsx b/desktop-app/ui/src/components/SidebarNav/index.tsx
index b3ec8d7f2..34412e141 100644
--- a/desktop-app/ui/src/components/SidebarNav/index.tsx
+++ b/desktop-app/ui/src/components/SidebarNav/index.tsx
@@ -548,22 +548,22 @@ export function SidebarNav({
<div
className={`nav-link${navItem === DESKTOP_ROUTES.files ? ' active' : ''}`}
- title={collapsed ? 'Files' : undefined}
- data-tooltip="Files"
+ title={collapsed ? 'EvenDrive' : undefined}
+ data-tooltip="EvenDrive"
>
<NavItemControl
data-testid="nav-files"
className="nav-link-main"
onClick={() => handleSelect(DESKTOP_ROUTES.files)}
- aria-label="Files"
+ aria-label="EvenDrive"
leadingIcon={<IconContexts />}
trailingIcon={
<span className="nav-tooltip" role="tooltip">
- Files
+ EvenDrive
</span>
}
>
- Files
+ EvenDrive
</NavItemControl>
</div>
</nav>
diff --git a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
index abf3b83e1..2caff1891 100644
--- a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
+++ b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx
@@ -106,12 +106,12 @@ describe('SidebarNav logo', () => {
expect(container.querySelector('.sidebar-logo-copy')).toBeNull()
})
- it('renders Files as a top-level nav item labelled Files (not under Resources)', () => {
+ it('renders EvenDrive as a top-level nav item labelled EvenDrive (not under Resources)', () => {
render(<SidebarNav {...baseProps()} />)
- // Files is always visible as a primary nav destination — no menu opening needed.
+ // EvenDrive is always visible as a primary nav destination — no menu opening needed.
const filesItem = screen.getByTestId('nav-files')
- expect(filesItem.textContent).toContain('Files')
+ expect(filesItem.textContent).toContain('EvenDrive')
expect(filesItem.textContent).not.toContain('Global File System')
// Files is a top-level nav item, never nested inside the Settings popover.
diff --git a/desktop-app/ui/src/components/agents/ComposerGlobalFilesModal/index.tsx b/desktop-app/ui/src/components/agents/ComposerGlobalFilesModal/index.tsx
index b2fa28099..805636ae8 100644
--- a/desktop-app/ui/src/components/agents/ComposerGlobalFilesModal/index.tsx
+++ b/desktop-app/ui/src/components/agents/ComposerGlobalFilesModal/index.tsx
@@ -63,7 +63,7 @@ export function ComposerGlobalFilesModal({ onAdd, onClose }: ComposerGlobalFiles
<IconContexts />
</span>
<span className="composer-global-files-heading">
- <span className="composer-global-files-eyebrow">Global File System</span>
+ <span className="composer-global-files-eyebrow">EvenDrive</span>
<h3 id="composer-global-files-title">Choose files for this message</h3>
<span className="muted">Browse shared folders and select multiple files.</span>
</span>
@@ -195,7 +195,7 @@ export function ComposerGlobalFilesModal({ onAdd, onClose }: ComposerGlobalFiles
body={
ctrl.current
? 'Choose another folder to continue browsing.'
- : 'Files shared with you through the Global File System will appear here.'
+ : 'Files shared with you through EvenDrive will appear here.'
}
/>
)}
diff --git a/desktop-app/ui/src/components/agents/ComposerPanel.tsx b/desktop-app/ui/src/components/agents/ComposerPanel.tsx
index 265800452..1c26b2c67 100644
--- a/desktop-app/ui/src/components/agents/ComposerPanel.tsx
+++ b/desktop-app/ui/src/components/agents/ComposerPanel.tsx
@@ -705,7 +705,7 @@ export function ComposerPanel({ inline = false, agentSelector }: ComposerPanelPr
onClick={openGlobalFilesModal}
role="menuitem"
>
- Global File System
+ EvenDrive
</MenuItem>
) : null}
<MenuItem
diff --git a/desktop-app/ui/src/gfs/__tests__/moveDialog.test.tsx b/desktop-app/ui/src/gfs/__tests__/moveDialog.test.tsx
index 05885915f..af8b40c3d 100644
--- a/desktop-app/ui/src/gfs/__tests__/moveDialog.test.tsx
+++ b/desktop-app/ui/src/gfs/__tests__/moveDialog.test.tsx
@@ -126,7 +126,7 @@ describe('GfsMoveDialog pagination', () => {
renderDialog({ listAccessible, listChildren }, { onMove })
const dialog = await screen.findByRole('dialog', { name: 'Move file notes.txt' })
- const tree = within(dialog).getByRole('tree', { name: 'GFS destination folders' })
+ const tree = within(dialog).getByRole('tree', { name: 'EvenDrive destination folders' })
expect(await within(tree).findByRole('button', { name: 'Product' })).toBeTruthy()
await fireEvent.click(within(tree).getByRole('button', { name: 'Expand Product' }))
diff --git a/desktop-app/ui/src/gfs/filePicker.tsx b/desktop-app/ui/src/gfs/filePicker.tsx
index 5020a2ea0..b6bd3fe40 100644
--- a/desktop-app/ui/src/gfs/filePicker.tsx
+++ b/desktop-app/ui/src/gfs/filePicker.tsx
@@ -33,7 +33,7 @@ export function GfsFilePicker({
void submit()
}}
>
- <Field label="GFS URI" htmlFor="gfs-uri-input">
+ <Field label="EvenDrive link" htmlFor="gfs-uri-input">
<div className="da-gfs-file-picker__row">
<div className="da-gfs-file-picker__input">
<span className="da-gfs-file-picker__scheme" aria-hidden="true">
@@ -42,7 +42,7 @@ export function GfsFilePicker({
<TextInput
autoFocus
id="gfs-uri-input"
- aria-label="gfs URI"
+ aria-label="EvenDrive link"
placeholder="gfs://main/<rid>"
value={uri}
onChange={e => setUri(e.target.value)}
diff --git a/desktop-app/ui/src/gfs/moveDialog.tsx b/desktop-app/ui/src/gfs/moveDialog.tsx
index b774e73e7..70842f03f 100644
--- a/desktop-app/ui/src/gfs/moveDialog.tsx
+++ b/desktop-app/ui/src/gfs/moveDialog.tsx
@@ -349,7 +349,7 @@ export function GfsMoveDialog({
<div
className="da-gfs-move-dialog__tree"
role="tree"
- aria-label="GFS destination folders"
+ aria-label="EvenDrive destination folders"
>
{loadingRoots ? (
<p className="muted" role="status">
diff --git a/desktop-app/ui/src/pages/FilesPage.tsx b/desktop-app/ui/src/pages/FilesPage.tsx
index 7b8c38569..44e913da4 100644
--- a/desktop-app/ui/src/pages/FilesPage.tsx
+++ b/desktop-app/ui/src/pages/FilesPage.tsx
@@ -34,6 +34,7 @@ import {
IconShare,
IconUpload,
} from '@components/SidebarNav/icons'
+import { GFS_DRIVE_MAIN } from '@constants/gfsBrowser'
import { desktopQueryKeys } from '@hooks/domain/queryKeys'
import { type GfsCrumb, useGfsBrowserController } from '@hooks/domain/useGfsBrowserController'
import { isEventFromNestedInteractive } from '@lib/clickableRowProps'
@@ -573,10 +574,12 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
const handleCopyLink = async (uri: string) => {
try {
await navigator.clipboard.writeText(uri)
- pushToast?.('GFS link copied', 'success')
+ pushToast?.('EvenDrive link copied', 'success')
} catch (clipboardError) {
pushToast?.(
- clipboardError instanceof Error ? clipboardError.message : 'Could not copy the GFS link',
+ clipboardError instanceof Error
+ ? clipboardError.message
+ : 'Could not copy the EvenDrive link',
'error'
)
}
@@ -1003,6 +1006,42 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
setRenameDraft(target.name)
}
+ /** Adapt the open folder crumb for the row-action handlers so the active
+ * folder's menu (the one beside the breadcrumb) runs on the same shape a
+ * parent-view row does. */
+ const crumbAsResource = (crumb: GfsCrumb): GfsDriveResource => ({
+ resourceId: crumb.resourceId,
+ rid: crumb.resourceId.replace(/-/g, '').toLowerCase(),
+ gfsUri: crumb.gfsUri,
+ drive: GFS_DRIVE_MAIN,
+ parentResourceId: null,
+ name: crumb.name,
+ kind: 'directory',
+ path: null,
+ version: crumb.version,
+ bytes: crumb.bytes,
+ })
+
+ /** Single construction path for a FOLDER's ⋯ menu. The parent-view row menu
+ * and the active folder's breadcrumb menu both build their props here, so
+ * their option lists cannot drift apart; only the gates (permission source)
+ * and the open-navigation action differ per surface. */
+ const folderMenuPropsFor = (
+ folder: GfsDriveResource,
+ gates: { canManage: boolean; canRename: boolean; canDelete: boolean },
+ actions: { onOpen?: () => void; onOpenChange?: (open: boolean) => void } = {}
+ ) => ({
+ resourceName: folder.name,
+ onManage: gates.canManage ? () => openManage(folder) : undefined,
+ onCopyLink: () => void handleCopyLink(folder.gfsUri),
+ onOpen: actions.onOpen,
+ onOpenGfsLink: () => setOpenLinkOpen(true),
+ onOpenChange: actions.onOpenChange,
+ onRename: gates.canRename ? () => openRenameTarget(folder) : undefined,
+ onMove: () => setMoveTarget(folder),
+ onDelete: gates.canDelete ? () => setDeleteTarget(folder) : undefined,
+ })
+
const visibleResources = useMemo<GfsDriveResource[]>(() => {
const resources = currentIsFolder ? items : currentIsFile ? [] : accessibleResources
return [...resources].sort((left, right) => {
@@ -1068,7 +1107,7 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
<div className="page-layout da-gfs-layout">
<section
className="page-card da-gfs-drive"
- aria-label="Global File System browser"
+ aria-label="EvenDrive browser"
aria-busy={visibleLoading || droppedUploadCount > 0}
onDragEnter={handleGfsDragEnter}
onDragLeave={handleGfsDragLeave}
@@ -1135,22 +1174,11 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
) : null}
{current && !currentIsFile && !currentIsBeingRenamed ? (
<GfsResourceMenu
- resourceName={current.name}
- onManage={
- canManageCurrent
- ? () => {
- setCreateFolderOpen(false)
- setRenameOpen(false)
- setDeleteOpen(false)
- setManageOpen(true)
- }
- : undefined
- }
- onCopyLink={() => void handleCopyLink(current.gfsUri)}
- onDelete={canDeleteCurrent ? () => setDeleteTarget(current) : undefined}
- onOpenGfsLink={() => setOpenLinkOpen(true)}
- onRename={canWriteCurrent ? () => openRenameTarget(current) : undefined}
- onMove={requestMoveCurrent}
+ {...folderMenuPropsFor(crumbAsResource(current), {
+ canManage: canManageCurrent,
+ canRename: canWriteCurrent,
+ canDelete: canDeleteCurrent,
+ })}
/>
) : null}
</div>
@@ -1275,7 +1303,7 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
<p className="muted">
{currentPreviewAvailable
? 'Preview this file again or use the menu to manage and download it.'
- : 'Use the menu to manage, download, or copy this file’s GFS link.'}
+ : 'Use the menu to manage, download, or copy this file’s EvenDrive link.'}
</p>
</div>
</div>
@@ -1436,34 +1464,53 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
<IconEdit width={16} height={16} />
</IconButton>
) : null}
- <GfsResourceMenu
- resourceName={resource.name}
- onManage={rowCanManage(resource) ? () => openManage(resource) : undefined}
- onCopyLink={() => void handleCopyLink(resource.gfsUri)}
- onDelete={
- rowCanDelete(resource) ? () => setDeleteTarget(resource) : undefined
- }
- onOpen={
- resource.kind === 'directory' ? () => openResource(resource) : undefined
- }
- onOpenChange={open =>
- ctrl.setRowAffordancesResourceId(open ? resource.resourceId : null)
- }
- onRename={
- rowCanRename(resource) ? () => openRenameTarget(resource) : undefined
- }
- onMove={() => setMoveTarget(resource)}
- onPreview={
- isGfsPreviewFile(resource.name)
- ? () => void openFilePreview(resource)
- : undefined
- }
- onDownload={
- resource.kind === 'file'
- ? () => void handleDownload(resource.gfsUri, resource.name)
- : undefined
- }
- />
+ {resource.kind === 'directory' ? (
+ <GfsResourceMenu
+ {...folderMenuPropsFor(
+ resource,
+ {
+ canManage: rowCanManage(resource),
+ canRename: rowCanRename(resource),
+ canDelete: rowCanDelete(resource),
+ },
+ {
+ onOpen: () => openResource(resource),
+ onOpenChange: open =>
+ ctrl.setRowAffordancesResourceId(
+ open ? resource.resourceId : null
+ ),
+ }
+ )}
+ />
+ ) : (
+ <GfsResourceMenu
+ resourceName={resource.name}
+ onManage={
+ rowCanManage(resource) ? () => openManage(resource) : undefined
+ }
+ onCopyLink={() => void handleCopyLink(resource.gfsUri)}
+ onDelete={
+ rowCanDelete(resource) ? () => setDeleteTarget(resource) : undefined
+ }
+ onOpenChange={open =>
+ ctrl.setRowAffordancesResourceId(open ? resource.resourceId : null)
+ }
+ onRename={
+ rowCanRename(resource) ? () => openRenameTarget(resource) : undefined
+ }
+ onMove={() => setMoveTarget(resource)}
+ onPreview={
+ isGfsPreviewFile(resource.name)
+ ? () => void openFilePreview(resource)
+ : undefined
+ }
+ onDownload={
+ resource.kind === 'file'
+ ? () => void handleDownload(resource.gfsUri, resource.name)
+ : undefined
+ }
+ />
+ )}
</span>
</div>
)
@@ -1507,13 +1554,13 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
</span>
<span className="da-gfs-link-dialog__heading">
<span className="da-gfs-eyebrow">Direct access</span>
- <h3 id="gfs-link-dialog-title">Open GFS link</h3>
+ <h3 id="gfs-link-dialog-title">Open EvenDrive link</h3>
<span className="muted">
- Paste a GFS URI to jump directly to a shared resource.
+ Paste an EvenDrive link to jump directly to a shared resource.
</span>
</span>
<IconButton
- label="Close GFS link dialog"
+ label="Close EvenDrive link dialog"
onClick={() => setOpenLinkOpen(false)}
size="sm"
variant="ghost"
@@ -1664,8 +1711,11 @@ export function FilesPage({ pushToast, pendingGfsUri, onPendingGfsUriHandled }:
<GfsGrantList
agents={agentSubjects}
error={grantsError}
+ inheritedItems={ctrl.inheritedAccess}
items={ctrl.grants}
- loading={ctrl.loadingGrants || ctrl.loadingShares}
+ loading={
+ ctrl.loadingGrants || ctrl.loadingShares || ctrl.loadingInheritedAccess
+ }
onChangeRole={affordances?.canDelegate ? handleAccessRoleChange : undefined}
onRevoke={(item, label) => void handleRevokeGrant(item.id, label)}
onRevokeShare={(item, label) => void handleRevokeShare(item.id, label)}
diff --git a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
index c9830e808..019b402ff 100644
--- a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
+++ b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
@@ -137,12 +137,12 @@ describe('FilesPage', () => {
hookMock.useGfsBrowserController.mockReturnValue({
...baseController(),
accessibleNotice:
- 'Automatic GFS discovery is not available in this desktop runtime. You can still open any GFS link you have.',
+ 'Automatic EvenDrive discovery is not available in this desktop runtime. You can still open any EvenDrive link you have.',
})
renderFilesPage()
- const notice = screen.getByText(/Automatic GFS discovery is not available/i)
+ const notice = screen.getByText(/Automatic EvenDrive discovery is not available/i)
expect(notice.closest('.status-banner')?.className).toContain('tone-info')
expect(screen.queryByText(/window\.clerum/i)).toBeNull()
expect(screen.queryByText(/listAccessible is not a function/i)).toBeNull()
@@ -158,7 +158,7 @@ describe('FilesPage', () => {
expect(
screen.getByText('Resources shared directly with you or your teams will appear here.')
).toBeTruthy()
- expect(screen.queryByText(/Automatic GFS discovery is not available/i)).toBeNull()
+ expect(screen.queryByText(/Automatic EvenDrive discovery is not available/i)).toBeNull()
expect(screen.queryByText(/Error invoking remote method/i)).toBeNull()
})
@@ -641,12 +641,12 @@ describe('FilesPage', () => {
const uploadButton = screen.getByRole('button', { name: 'Upload file' })
expect(toolbar?.contains(newFolderButton)).toBe(true)
expect(toolbar?.contains(uploadButton)).toBe(true)
- expect(screen.queryByRole('button', { name: 'Open GFS link' })).toBeNull()
+ expect(screen.queryByRole('button', { name: 'Open EvenDrive link' })).toBeNull()
fireEvent.click(screen.getByRole('button', { name: 'Options for Team folder' }))
- fireEvent.click(screen.getByRole('menuitem', { name: 'Open GFS link' }))
- expect(screen.getByRole('dialog', { name: 'Open GFS link' })).toBeTruthy()
- fireEvent.click(screen.getByRole('button', { name: 'Close GFS link dialog' }))
+ fireEvent.click(screen.getByRole('menuitem', { name: 'Open EvenDrive link' }))
+ expect(screen.getByRole('dialog', { name: 'Open EvenDrive link' })).toBeTruthy()
+ fireEvent.click(screen.getByRole('button', { name: 'Close EvenDrive link dialog' }))
fireEvent.click(newFolderButton)
const newFolderDialog = screen.getByRole('dialog', { name: 'New folder' })
@@ -741,7 +741,7 @@ describe('FilesPage', () => {
})
renderFilesPage(pushToast)
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const image = new File(['desktop image'], 'diagram.png', { type: 'image/png' })
const markdown = new File(['# Desktop notes'], 'notes.markdown', { type: 'text/markdown' })
const video = new File(['desktop video'], 'clip.mov', { type: 'video/quicktime' })
@@ -807,7 +807,7 @@ describe('FilesPage', () => {
})
renderFilesPage(pushToast)
- fireEvent.drop(screen.getByRole('region', { name: 'Global File System browser' }), {
+ fireEvent.drop(screen.getByRole('region', { name: 'EvenDrive browser' }), {
dataTransfer: {
dropEffect: 'none',
files: [
@@ -906,7 +906,7 @@ describe('FilesPage', () => {
})
renderFilesPage(pushToast)
- fireEvent.drop(screen.getByRole('region', { name: 'Global File System browser' }), {
+ fireEvent.drop(screen.getByRole('region', { name: 'EvenDrive browser' }), {
dataTransfer: {
dropEffect: 'none',
files: [new File(['report'], 'report.txt', { type: 'text/plain' })],
@@ -948,7 +948,7 @@ describe('FilesPage', () => {
})
renderFilesPage(pushToast)
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const firstDrop = {
dropEffect: 'none',
files: [new File(['# First'], 'first.md', { type: 'text/markdown' })],
@@ -1026,7 +1026,7 @@ describe('FilesPage', () => {
hookMock.useGfsBrowserController.mockImplementation(useChangingFolderController)
renderFilesPage()
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const dataTransfer = {
dropEffect: 'none',
files: [
@@ -1070,7 +1070,7 @@ describe('FilesPage', () => {
const arrayBuffer = vi.spyOn(oversized, 'arrayBuffer')
renderFilesPage(pushToast)
- fireEvent.drop(screen.getByRole('region', { name: 'Global File System browser' }), {
+ fireEvent.drop(screen.getByRole('region', { name: 'EvenDrive browser' }), {
dataTransfer: { dropEffect: 'none', files: [oversized], types: ['Files'] },
})
@@ -1106,7 +1106,7 @@ describe('FilesPage', () => {
})
renderFilesPage()
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const dataTransfer = {
dropEffect: 'none',
files: [new File(['# Notes'], 'notes.md', { type: 'text/markdown' })],
@@ -1143,7 +1143,7 @@ describe('FilesPage', () => {
})
renderFilesPage(pushToast)
- const browser = screen.getByRole('region', { name: 'Global File System browser' })
+ const browser = screen.getByRole('region', { name: 'EvenDrive browser' })
const image = new File(['desktop image'], 'restricted.png', { type: 'image/png' })
const dataTransfer = { dropEffect: 'none', files: [image], types: ['Files'] }
const reason =
@@ -3038,17 +3038,19 @@ describe('FilesPage', () => {
hookMock.useGfsBrowserController.mockReturnValue({ ...baseController(), openUri })
renderFilesPage()
- expect(screen.queryByRole('button', { name: 'Open GFS link' })).toBeNull()
+ expect(screen.queryByRole('button', { name: 'Open EvenDrive link' })).toBeNull()
fireEvent.click(screen.getByRole('button', { name: 'Options for Shared with me' }))
- fireEvent.click(screen.getByRole('menuitem', { name: 'Open GFS link' }))
- const dialog = await screen.findByRole('dialog', { name: 'Open GFS link' })
- fireEvent.change(within(dialog).getByLabelText('gfs URI'), {
+ 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: 'gfs://main/resource-1' },
})
fireEvent.click(within(dialog).getByRole('button', { name: 'Open' }))
await waitFor(() => expect(openUri).toHaveBeenCalledWith('gfs://main/resource-1'))
- await waitFor(() => expect(screen.queryByRole('dialog', { name: 'Open GFS link' })).toBeNull())
+ await waitFor(() =>
+ expect(screen.queryByRole('dialog', { name: 'Open EvenDrive link' })).toBeNull()
+ )
})
it('opens an SVG GFS link in preview without leaving the browser on a file-only route', async () => {
@@ -3095,9 +3097,9 @@ describe('FilesPage', () => {
renderFilesPage()
fireEvent.click(screen.getByRole('button', { name: 'Options for Shared with me' }))
- fireEvent.click(screen.getByRole('menuitem', { name: 'Open GFS link' }))
- const linkDialog = await screen.findByRole('dialog', { name: 'Open GFS link' })
- fireEvent.change(within(linkDialog).getByLabelText('gfs URI'), {
+ fireEvent.click(screen.getByRole('menuitem', { name: 'Open EvenDrive link' }))
+ const linkDialog = await screen.findByRole('dialog', { name: 'Open EvenDrive link' })
+ fireEvent.change(within(linkDialog).getByLabelText('EvenDrive link'), {
target: { value: 'gfs://main/svg-1' },
})
fireEvent.click(within(linkDialog).getByRole('button', { name: 'Open' }))
@@ -3108,7 +3110,7 @@ describe('FilesPage', () => {
)
expect(download).toHaveBeenCalledWith('gfs://main/svg-1')
expect(createObjectURL).toHaveBeenCalledWith(expect.objectContaining({ type: 'image/svg+xml' }))
- expect(screen.queryByRole('dialog', { name: 'Open GFS link' })).toBeNull()
+ expect(screen.queryByRole('dialog', { name: 'Open EvenDrive link' })).toBeNull()
fireEvent.click(within(preview).getByRole('button', { name: 'Close image preview' }))
expect(screen.queryByRole('heading', { name: 'architecture.svg' })).toBeNull()
@@ -3155,6 +3157,159 @@ describe('FilesPage', () => {
expect(reset).toHaveBeenCalledOnce()
})
+ it('mounts the ⋯ menu only on the active folder beside the breadcrumb, never on crumbs or the open file', async () => {
+ const fullBits = {
+ held: ['read', 'write', 'delete', 'manage_acl'],
+ canDelegate: false,
+ grantableBits: [],
+ canCreateShare: false,
+ }
+ const parentViewRowOptions = [
+ 'Share',
+ 'Open folder',
+ 'Open EvenDrive link',
+ 'Rename',
+ 'Move to…',
+ 'Delete',
+ ]
+ // The active folder is already open, so its menu is the row menu minus the
+ // navigation item — exactly the pre-existing beside-the-breadcrumb menu.
+ const activeFolderOptions = parentViewRowOptions.filter(option => option !== 'Open folder')
+
+ // Phase 1 — the parent view: a fully-permissioned folder row's ⋯ menu.
+ hookMock.useGfsBrowserController.mockReturnValue({
+ ...baseController(),
+ current: {
+ resourceId: 'folder-1',
+ gfsUri: 'gfs://main/folder-1',
+ name: 'Product',
+ kind: 'directory',
+ version: 1,
+ },
+ crumbs: [
+ {
+ resourceId: 'folder-1',
+ gfsUri: 'gfs://main/folder-1',
+ name: 'Product',
+ kind: 'directory',
+ version: 1,
+ },
+ ],
+ items: [
+ {
+ resourceId: 'folder-2',
+ rid: 'folder-2',
+ gfsUri: 'gfs://main/folder-2',
+ drive: 'main',
+ parentResourceId: 'folder-1',
+ name: 'Team folder',
+ kind: 'directory' as const,
+ path: '/Product/Team folder',
+ version: 2,
+ bytes: 0,
+ },
+ ],
+ rowAffordancesByResourceId: { 'folder-2': fullBits },
+ })
+ const parentView = renderFilesPage()
+ await act(async () => {
+ fireEvent.click(screen.getByRole('button', { name: 'Options for Team folder' }))
+ })
+ expect(screen.getAllByRole('menuitem').map(item => item.textContent)).toEqual(
+ parentViewRowOptions
+ )
+ parentView.unmount()
+
+ // Phase 2 — a file is open: no crumb (folder or file) carries a menu in
+ // the breadcrumb, and the breadcrumb title row has none for the file.
+ hookMock.useGfsBrowserController.mockReturnValue({
+ ...baseController(),
+ current: {
+ resourceId: 'file-1',
+ gfsUri: 'gfs://main/file-1',
+ name: 'report.md',
+ kind: 'file',
+ version: 3,
+ },
+ crumbs: [
+ {
+ resourceId: 'folder-1',
+ gfsUri: 'gfs://main/folder-1',
+ name: 'Product',
+ kind: 'directory',
+ version: 1,
+ },
+ {
+ resourceId: 'file-1',
+ gfsUri: 'gfs://main/file-1',
+ name: 'report.md',
+ kind: 'file',
+ version: 3,
+ },
+ ],
+ })
+ renderFilesPage()
+
+ let breadcrumbs = screen.getByRole('navigation', { name: 'File location' })
+ let titleRow = document.querySelector('.da-gfs-drive__title-row')
+ expect(within(breadcrumbs).queryByRole('button', { name: 'Options for Product' })).toBeNull()
+ expect(within(breadcrumbs).queryByRole('button', { name: 'Options for report.md' })).toBeNull()
+ expect(within(titleRow!).queryByRole('button', { name: 'Options for report.md' })).toBeNull()
+ cleanup()
+
+ // Phase 3 — a folder is open: exactly one ⋯ menu, for the ACTIVE folder,
+ // sitting to the right of the breadcrumb (after the nav), while the
+ // ancestor folder crumb stays plain.
+ hookMock.useGfsBrowserController.mockReturnValue({
+ ...baseController(),
+ current: {
+ resourceId: 'folder-2',
+ gfsUri: 'gfs://main/folder-2',
+ name: 'Nested',
+ kind: 'directory',
+ version: 2,
+ },
+ crumbs: [
+ {
+ resourceId: 'folder-1',
+ gfsUri: 'gfs://main/folder-1',
+ name: 'Product',
+ kind: 'directory',
+ version: 1,
+ },
+ {
+ resourceId: 'folder-2',
+ gfsUri: 'gfs://main/folder-2',
+ name: 'Nested',
+ kind: 'directory',
+ version: 2,
+ },
+ ],
+ affordances: fullBits,
+ })
+ renderFilesPage()
+
+ breadcrumbs = screen.getByRole('navigation', { name: 'File location' })
+ titleRow = document.querySelector('.da-gfs-drive__title-row')
+ expect(within(breadcrumbs).queryByRole('button', { name: 'Options for Product' })).toBeNull()
+ expect(within(breadcrumbs).queryByRole('button', { name: 'Options for Nested' })).toBeNull()
+
+ const activeMenuTrigger = within(titleRow!).getByRole('button', { name: 'Options for Nested' })
+ const activeMenuWrapper = activeMenuTrigger.closest('.da-gfs-resource-menu')
+ expect(activeMenuWrapper?.previousElementSibling).toBe(breadcrumbs)
+
+ await act(async () => {
+ fireEvent.click(activeMenuTrigger)
+ })
+ expect(screen.getAllByRole('menuitem').map(item => item.textContent)).toEqual(
+ activeFolderOptions
+ )
+
+ // "Open EvenDrive link" is present and opens the link dialog.
+ fireEvent.click(screen.getByRole('menuitem', { name: 'Open EvenDrive link' }))
+ expect(screen.getByRole('dialog', { name: 'Open EvenDrive link' })).toBeTruthy()
+ })
+
it('opens nested folders and exposes open and copy actions in the resource menu', async () => {
const openChild = vi.fn()
const writeText = vi.fn(async () => undefined)