Skip to content

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

TypeScript

feat(control-ui): map move-drag refusals with matrix copy and warning tone

M4549af4ab6aa
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index b264e45a9..89ff7397c 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -4849,6 +4849,11 @@ td.cu-registry-description {
border-color: rgba(var(--cu-danger-rgb), 0.42);
}
+.cu-toast--warning {
+ color: var(--cu-warning);
+ border-color: rgba(var(--cu-warning-rgb), 0.42);
+}
+
.cu-toast__text {
font-size: 0.8125rem;
line-height: 1.35;
@@ -12677,6 +12682,56 @@ button.cu-gfs-tree__button:focus-visible,
height: 100%;
}
+/* Drop-move verdicts on breadcrumb crumbs (plan §3.3): only an allowed
+ target paints the blue affordance; checking stays neutral; ordinary
+ denials read as error; unavailable reads as warning; the same-parent
+ no-op reads neutral/info. The reason rides along on data-drop-reason. */
+.cu-gfs-breadcrumb__button[data-drop-state='allowed'] {
+ outline: 2px solid rgba(var(--cu-accent-rgb), 0.72);
+ outline-offset: -2px;
+ background: rgba(var(--cu-accent-rgb), 0.14);
+}
+
+.cu-gfs-breadcrumb__button[data-drop-state='checking'] {
+ outline: 2px dashed rgba(var(--cu-accent-rgb), 0.4);
+ outline-offset: -2px;
+ background: var(--cu-surface-hover);
+}
+
+.cu-gfs-breadcrumb__button[data-drop-state='denied'] {
+ outline: 2px solid rgba(var(--cu-danger-rgb), 0.6);
+ outline-offset: -2px;
+ background: rgba(var(--cu-danger-rgb), 0.12);
+}
+
+.cu-gfs-breadcrumb__button[data-drop-state='unavailable'] {
+ outline: 2px solid rgba(var(--cu-warning-rgb), 0.6);
+ outline-offset: -2px;
+ background: rgba(var(--cu-warning-rgb), 0.12);
+}
+
+.cu-gfs-breadcrumb__button[data-drop-state='same-parent'] {
+ outline: 2px solid rgba(var(--cu-accent-rgb), 0.35);
+ outline-offset: -2px;
+ background: var(--cu-surface-hover);
+}
+
+/* Visually-hidden live region carrying the hover verdict sentence (RP-026):
+ painted verdicts are invisible to screen readers, so the same wording is
+ spoken here when it changes. */
+.cu-gfs-drop-announce {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0 0 0 0);
+ clip-path: inset(50%);
+ white-space: nowrap;
+ border: 0;
+}
+
.cu-gfs-list-frame {
--cu-gfs-list-columns: 2.25rem minmax(0, 1fr) minmax(4.5rem, auto) 9.5rem;
@@ -12823,6 +12878,33 @@ button.cu-gfs-tree__button:focus-visible,
background: rgba(var(--cu-accent-rgb), 0.18);
}
+/* Reason-aware row verdicts share the crumb tone contract: denied = error,
+ unavailable = warning, checking = neutral, same-parent = neutral/info.
+ Only the allowed verdict keeps the blue data-drop-target affordance. */
+.cu-gfs-list__row[data-drop-state='denied'] {
+ outline: 2px solid rgba(var(--cu-danger-rgb), 0.6);
+ outline-offset: -2px;
+ background: rgba(var(--cu-danger-rgb), 0.12);
+}
+
+.cu-gfs-list__row[data-drop-state='unavailable'] {
+ outline: 2px solid rgba(var(--cu-warning-rgb), 0.6);
+ outline-offset: -2px;
+ background: rgba(var(--cu-warning-rgb), 0.12);
+}
+
+.cu-gfs-list__row[data-drop-state='checking'] {
+ outline: 2px dashed rgba(var(--cu-accent-rgb), 0.4);
+ outline-offset: -2px;
+ background: var(--cu-surface-hover);
+}
+
+.cu-gfs-list__row[data-drop-state='same-parent'] {
+ outline: 2px solid rgba(var(--cu-accent-rgb), 0.35);
+ outline-offset: -2px;
+ background: var(--cu-surface-hover);
+}
+
.cu-gfs-list__row--clickable {
cursor: pointer;
}
diff --git a/control-ui/components/Toast/types.ts b/control-ui/components/Toast/types.ts
index 5eacd688e..f081b87d0 100644
--- a/control-ui/components/Toast/types.ts
+++ b/control-ui/components/Toast/types.ts
@@ -1,4 +1,4 @@
-export type ToastTone = 'info' | 'success' | 'error'
+export type ToastTone = 'info' | 'success' | 'error' | 'warning'
export type ToastOptions = {
durationMs?: number
diff --git a/control-ui/components/__tests__/Toast.test.tsx b/control-ui/components/__tests__/Toast.test.tsx
index 0a801adb2..d55855a42 100644
--- a/control-ui/components/__tests__/Toast.test.tsx
+++ b/control-ui/components/__tests__/Toast.test.tsx
@@ -7,6 +7,17 @@ function Trigger() {
return <button onClick={() => showToast('Saved', { durationMs: 1_000 })}>Show toast</button>
}
+function WarningTrigger() {
+ const { showToast } = useToast()
+ return (
+ <button
+ onClick={() => showToast('Check your connection.', { tone: 'warning', durationMs: 1_000 })}
+ >
+ Show warning
+ </button>
+ )
+}
+
describe('ToastProvider lifecycle', () => {
afterEach(() => {
vi.useRealTimers()
@@ -27,4 +38,18 @@ describe('ToastProvider lifecycle', () => {
expect(() => vi.advanceTimersByTime(1_000)).not.toThrow()
expect(vi.getTimerCount()).toBe(0)
})
+
+ it('renders the warning tone for honestly-unknown move outcomes', () => {
+ vi.useFakeTimers()
+ render(
+ <ToastProvider>
+ <WarningTrigger />
+ </ToastProvider>
+ )
+
+ fireEvent.click(screen.getByRole('button', { name: 'Show warning' }))
+ const toast = screen.getByRole('status')
+ expect(toast).toHaveTextContent('Check your connection.')
+ expect(toast).toHaveClass('cu-toast--warning')
+ })
})
diff --git a/control-ui/lib/__tests__/gfsDragFeedback.test.ts b/control-ui/lib/__tests__/gfsDragFeedback.test.ts
new file mode 100644
index 000000000..1545748c8
--- /dev/null
+++ b/control-ui/lib/__tests__/gfsDragFeedback.test.ts
@@ -0,0 +1,230 @@
+import { describe, expect, it } from 'vitest'
+import {
+ GfsMoveRefusalError,
+ computeGfsDropHoverVerdict,
+ gfsDropHoverAnnouncement,
+ gfsDropRefusalMessage,
+ gfsDropRefusalTone,
+} from '../gfsDragFeedback'
+import type { GfsDropHoverFacts, GfsDropHoverVerdict } from '../gfsDragFeedback.types'
+
+/**
+ * The deny-reason → message/tone/announcement contract every refused move
+ * shares (docs/design/gfs-move-forbidden-ux-matrix.md §3/§5/§6 and the
+ * breadcrumb plan §3.3). One wording per reason on every surface.
+ */
+
+const names = { sourceName: 'live tests', targetName: 'Product' }
+
+describe('gfsDropRefusalTone', () => {
+ it('maps deny reasons to error', () => {
+ for (const reason of [
+ 'self',
+ 'descendant',
+ 'root-source',
+ 'cross-drive',
+ 'destination-write',
+ 'source-write',
+ 'source-delete',
+ 'target-unavailable',
+ 'source-location-unknown',
+ ] as const) {
+ expect(gfsDropRefusalTone(reason)).toBe('error')
+ }
+ })
+
+ it('maps the same-parent no-op to info (matrix A4)', () => {
+ expect(gfsDropRefusalTone('same-parent')).toBe('info')
+ })
+
+ it('maps unknown/unverifiable outcomes to warning (matrix A10/B7)', () => {
+ for (const reason of ['unavailable', 'unknown-outcome', 'move-not-completed'] as const) {
+ expect(gfsDropRefusalTone(reason)).toBe('warning')
+ }
+ })
+})
+
+describe('gfsDropRefusalMessage', () => {
+ it('carries the matrix §3 wording for every structure deny', () => {
+ expect(gfsDropRefusalMessage('self', names)).toBe(
+ 'You dropped live tests onto itself. Pick a destination folder.'
+ )
+ expect(gfsDropRefusalMessage('cross-drive', names)).toBe(
+ 'Moving between drives isn’t supported.'
+ )
+ expect(gfsDropRefusalMessage('root-source', names)).toBe(
+ 'This location is the top level — it can’t be moved.'
+ )
+ expect(gfsDropRefusalMessage('same-parent', names)).toBe('live tests is already in Product.')
+ expect(gfsDropRefusalMessage('descendant', names)).toBe(
+ "You can't move live tests into a folder inside itself."
+ )
+ })
+
+ it('names the missing access, never the bit, for A6–A8', () => {
+ expect(gfsDropRefusalMessage('destination-write', names)).toBe(
+ "You don't have permission to move items into Product. You need edit access to the destination folder."
+ )
+ expect(gfsDropRefusalMessage('source-write', names)).toBe(
+ 'You can’t move live tests out of its current folder because you don’t have edit access to the folder that contains it.'
+ )
+ expect(gfsDropRefusalMessage('source-delete', names)).toBe(
+ 'You can’t move live tests out of its current folder because you don’t have delete access to the folder that contains it.'
+ )
+ })
+
+ it('distinguishes the three vanish/verify outcomes honestly (A10/B4/B5/B7)', () => {
+ expect(gfsDropRefusalMessage('target-unavailable', names)).toBe(
+ 'This folder is no longer available.'
+ )
+ expect(gfsDropRefusalMessage('source-location-unknown', names)).toBe(
+ 'EvenDrive cannot verify this item’s current location. Refresh and try again.'
+ )
+ expect(gfsDropRefusalMessage('unavailable', names)).toBe(
+ 'EvenDrive couldn’t verify this move. Check your connection and try again.'
+ )
+ expect(gfsDropRefusalMessage('unknown-outcome', names)).toBe(
+ 'Couldn’t confirm the move. Refresh before trying again.'
+ )
+ })
+
+ it('falls back to a named, non-empty sentence for unknown inputs', () => {
+ expect(gfsDropRefusalMessage('unavailable' as never, {}).length).toBeGreaterThan(0)
+ })
+})
+
+describe('gfsDropHoverAnnouncement', () => {
+ it('speaks allowed, checking and unavailable hovers', () => {
+ expect(gfsDropHoverAnnouncement({ state: 'allowed', evidence: 'file' }, names)).toBe(
+ 'You can move into Product.'
+ )
+ expect(gfsDropHoverAnnouncement({ state: 'checking' }, names)).toBe(
+ 'Checking whether you can move into Product…'
+ )
+ expect(gfsDropHoverAnnouncement({ state: 'unavailable' }, names)).toBe(
+ 'EvenDrive could not confirm whether you can move into Product.'
+ )
+ })
+
+ it('speaks the same reason sentence a refused drop would toast', () => {
+ const denied: GfsDropHoverVerdict = { state: 'denied', reason: 'descendant' }
+ expect(gfsDropHoverAnnouncement(denied, names)).toBe(gfsDropRefusalMessage('descendant', names))
+ expect(gfsDropHoverAnnouncement({ state: 'same-parent' }, names)).toBe(
+ gfsDropRefusalMessage('same-parent', names)
+ )
+ })
+})
+
+describe('GfsMoveRefusalError', () => {
+ it('carries its reason and derives the tone', () => {
+ const error = new GfsMoveRefusalError(
+ 'same-parent',
+ gfsDropRefusalMessage('same-parent', names)
+ )
+ expect(error).toBeInstanceOf(Error)
+ expect(error.reason).toBe('same-parent')
+ expect(error.tone).toBe('info')
+ expect(new GfsMoveRefusalError('unknown-outcome', 'x').tone).toBe('warning')
+ expect(new GfsMoveRefusalError('target-unavailable', 'x').tone).toBe('error')
+ })
+})
+
+describe('computeGfsDropHoverVerdict', () => {
+ // main › Product › live tests, dragging the `notes.md` row.
+ const trail = ['root-id', 'product-id', 'live-tests-id']
+
+ function crumbFacts(overrides: Partial<GfsDropHoverFacts> = {}): GfsDropHoverFacts {
+ return {
+ drive: 'main',
+ sourceResourceId: 'file-id',
+ sourceKind: 'file',
+ sourceParentKnown: true,
+ sourceParentResourceId: 'live-tests-id',
+ targetResourceId: 'product-id',
+ targetName: 'Product',
+ targetIsActiveLocation: false,
+ targetIsSourceParent: false,
+ // Ancestors of the Product crumb: main, observed to the physical root.
+ targetAncestorIds: ['root-id', null],
+ knownSourceAncestorIds: new Set(['live-tests-id', 'product-id', 'root-id']),
+ ...overrides,
+ }
+ }
+
+ it('marks an unhydrated root target unavailable without denying (plan §3.1)', () => {
+ expect(computeGfsDropHoverVerdict(crumbFacts({ targetResourceId: null }))).toEqual({
+ state: 'unavailable',
+ })
+ })
+
+ it('denies dropping onto the dragged item itself (A1)', () => {
+ expect(
+ computeGfsDropHoverVerdict(
+ crumbFacts({ targetResourceId: 'file-id', targetName: 'notes.md' })
+ )
+ ).toEqual({ state: 'denied', reason: 'self' })
+ })
+
+ it('reports the active crumb and the observed own parent as same-parent info (A4)', () => {
+ expect(computeGfsDropHoverVerdict(crumbFacts({ targetIsActiveLocation: true }))).toEqual({
+ state: 'same-parent',
+ })
+ expect(
+ computeGfsDropHoverVerdict(
+ crumbFacts({ targetResourceId: 'live-tests-id', targetName: 'live tests' })
+ )
+ ).toEqual({ state: 'same-parent' })
+ })
+
+ it('allows an observed ancestor crumb through the common-anchor proof', () => {
+ expect(
+ computeGfsDropHoverVerdict(
+ crumbFacts({ sourceKind: 'directory', sourceResourceId: 'specs-id' })
+ )
+ ).toEqual({ state: 'allowed', evidence: 'common-anchor' })
+ })
+
+ it('stays neutral-checking when ancestry is unproved — never a fake denial (A12)', () => {
+ expect(
+ computeGfsDropHoverVerdict(
+ crumbFacts({
+ sourceKind: 'directory',
+ sourceResourceId: 'specs-id',
+ targetAncestorIds: [],
+ knownSourceAncestorIds: new Set(['live-tests-id']),
+ })
+ )
+ ).toEqual({ state: 'checking' })
+ })
+
+ it('cannot produce a descendant deny for any crumb of a fresh trail (by construction)', () => {
+ // Walk EVERY crumb of main › Product › live tests as a drop target for
+ // the `notes.md` row and for a `specs` folder row: crumbs are ancestors
+ // of the listing, so no crumb target can sit inside the source subtree.
+ for (let index = 0; index < trail.length; index += 1) {
+ const chain: (string | null)[] = []
+ for (let cursor = index - 1; cursor >= 0; cursor -= 1) chain.push(trail[cursor])
+ chain.push(null)
+ for (const source of [
+ { resourceId: 'file-id', kind: 'file' as const },
+ { resourceId: 'specs-id', kind: 'directory' as const },
+ ]) {
+ const verdict = computeGfsDropHoverVerdict(
+ crumbFacts({
+ sourceResourceId: source.resourceId,
+ sourceKind: source.kind,
+ targetResourceId: trail[index],
+ targetIsActiveLocation: index === trail.length - 1,
+ targetAncestorIds: chain,
+ knownSourceAncestorIds: new Set(trail),
+ })
+ )
+ if (verdict.state === 'denied') {
+ throw new Error(`crumb ${trail[index]} unexpectedly denied: ${verdict.reason}`)
+ }
+ if (verdict.state === 'same-parent') continue
+ expect(verdict.state).toBe('allowed')
+ }
+ }
+ })
+})
diff --git a/control-ui/lib/gfsDragFeedback.ts b/control-ui/lib/gfsDragFeedback.ts
new file mode 100644
index 000000000..3f7337ca8
--- /dev/null
+++ b/control-ui/lib/gfsDragFeedback.ts
@@ -0,0 +1,153 @@
+import { decideDragStructure } from '@clerum/gfs-interaction-policy'
+import type {
+ GfsDropHoverFacts,
+ GfsDropHoverVerdict,
+ GfsDropRefusalReason,
+ GfsFeedbackTone,
+} from './gfsDragFeedback.types'
+
+/**
+ * Browser-safe, transport-free feedback mapping for EvenDrive drag moves in
+ * Control UI. Wording contract: docs/design/gfs-move-forbidden-ux-matrix.md
+ * (§3 Phase-A messages, §4 Phase-B outcomes). Row and breadcrumb handlers
+ * share this one mapping so the same reason always reads the same on every
+ * surface.
+ *
+ * Tone rules (matrix §5.2): deny = error, no-op = info, unknown = warning.
+ * Operator-plane A6–A8 denies cannot be produced truthfully from local bits;
+ * their copy lives here for pure coverage and server-refusal surfacing, and
+ * is never fabricated to satisfy a test.
+ */
+export function gfsDropRefusalTone(reason: GfsDropRefusalReason): GfsFeedbackTone {
+ switch (reason) {
+ case 'same-parent':
+ return 'info'
+ case 'unavailable':
+ case 'unknown-outcome':
+ case 'move-not-completed':
+ return 'warning'
+ default:
+ return 'error'
+ }
+}
+
+/** The persistent (toast) message for a refused or uncertain move. */
+export function gfsDropRefusalMessage(
+ reason: GfsDropRefusalReason,
+ names: { sourceName?: string; targetName?: string } = {}
+): string {
+ const source = names.sourceName?.trim() || 'This item'
+ const target = names.targetName?.trim() || 'this folder'
+ switch (reason) {
+ case 'self':
+ return `You dropped ${source} onto itself. Pick a destination folder.`
+ case 'cross-drive':
+ return 'Moving between drives isn’t supported.'
+ case 'root-source':
+ return 'This location is the top level — it can’t be moved.'
+ case 'same-parent':
+ return `${source} is already in ${target}.`
+ case 'descendant':
+ return `You can't move ${source} into a folder inside itself.`
+ case 'destination-write':
+ return `You don't have permission to move items into ${target}. You need edit access to the destination folder.`
+ case 'source-write':
+ return `You can’t move ${source} out of its current folder because you don’t have edit access to the folder that contains it.`
+ case 'source-delete':
+ return `You can’t move ${source} out of its current folder because you don’t have delete access to the folder that contains it.`
+ case 'target-unavailable':
+ return 'This folder is no longer available.'
+ case 'source-location-unknown':
+ return 'EvenDrive cannot verify this item’s current location. Refresh and try again.'
+ case 'unavailable':
+ return 'EvenDrive couldn’t verify this move. Check your connection and try again.'
+ case 'move-not-completed':
+ return 'EvenDrive couldn’t complete this move. Check your connection and try again.'
+ case 'unknown-outcome':
+ return 'Couldn’t confirm the move. Refresh before trying again.'
+ default:
+ return 'EvenDrive couldn’t verify this move. Check your connection and try again.'
+ }
+}
+
+/**
+ * The spoken form of a hover verdict (RP-026 shape). Denied hover announces
+ * the same reason sentence a refused drop would toast — one wording per
+ * reason on every surface.
+ */
+export function gfsDropHoverAnnouncement(
+ verdict: GfsDropHoverVerdict,
+ names: { sourceName?: string; targetName?: string }
+): string {
+ const target = names.targetName?.trim() || 'this folder'
+ switch (verdict.state) {
+ case 'allowed':
+ return `You can move into ${target}.`
+ case 'checking':
+ return `Checking whether you can move into ${target}…`
+ case 'unavailable':
+ return `EvenDrive could not confirm whether you can move into ${target}.`
+ case 'same-parent':
+ return gfsDropRefusalMessage('same-parent', { ...names, targetName: target })
+ case 'denied':
+ return gfsDropRefusalMessage(verdict.reason, { ...names, targetName: target })
+ default:
+ return `Checking whether you can move into ${target}…`
+ }
+}
+
+/**
+ * Zero-network hover verdict from observed facts (matrix A1–A5, A9, A10 and
+ * the unhydrated-root case). Unknown ancestry stays landable (`checking`,
+ * never a fake denial); structure itself is delegated to the shared pure
+ * policy, whose `server-check-required` keeps the drop admissible for the
+ * atomic server guard to adjudicate.
+ */
+export function computeGfsDropHoverVerdict(facts: GfsDropHoverFacts): GfsDropHoverVerdict {
+ if (!facts.targetResourceId) return { state: 'unavailable' }
+ if (facts.targetResourceId === facts.sourceResourceId) return { state: 'denied', reason: 'self' }
+ if (
+ facts.targetIsActiveLocation ||
+ (facts.sourceParentKnown && facts.sourceParentResourceId === facts.targetResourceId) ||
+ facts.targetIsSourceParent
+ ) {
+ return { state: 'same-parent' }
+ }
+ const structure = decideDragStructure({
+ source: {
+ resourceId: facts.sourceResourceId,
+ drive: facts.drive,
+ kind: facts.sourceKind,
+ parentKnown: facts.sourceParentKnown,
+ parentResourceId: facts.sourceParentResourceId,
+ },
+ target: { resourceId: facts.targetResourceId, drive: facts.drive },
+ targetAncestorIds: facts.targetAncestorIds,
+ knownSourceAncestorIds: facts.knownSourceAncestorIds,
+ })
+ if (structure.kind === 'deny') {
+ if (structure.reason === 'same-parent') return { state: 'same-parent' }
+ return { state: 'denied', reason: structure.reason }
+ }
+ if (structure.kind === 'server-check-required') return { state: 'checking' }
+ return { state: 'allowed', evidence: structure.evidence }
+}
+
+/**
+ * A refused move carrying its reason and tone, so the shared commit runner
+ * can present honest feedback (info for no-ops, warning for unknowns,
+ * error for real denials) instead of flattening everything to an error.
+ */
+export class GfsMoveRefusalError extends Error {
+ readonly reason: GfsDropRefusalReason
+
+ constructor(reason: GfsDropRefusalReason, message: string) {
+ super(message)
+ this.name = 'GfsMoveRefusalError'
+ this.reason = reason
+ }
+
+ get tone(): GfsFeedbackTone {
+ return gfsDropRefusalTone(this.reason)
+ }
+}
diff --git a/control-ui/lib/gfsDragFeedback.types.ts b/control-ui/lib/gfsDragFeedback.types.ts
new file mode 100644
index 000000000..3e23baaa9
--- /dev/null
+++ b/control-ui/lib/gfsDragFeedback.types.ts
@@ -0,0 +1,86 @@
+import type { GfsDragStructureEvidence } from '@clerum/gfs-interaction-policy'
+
+/**
+ * Tone for user-facing move feedback. Deliberately mirrors the Control UI
+ * toast tones (including the warning tone this feature adds) without
+ * importing component types into a shared lib.
+ */
+export type GfsFeedbackTone = 'info' | 'error' | 'warning'
+
+/**
+ * Every refused/uncertain move outcome this surface can present, with the
+ * wording contract owned by docs/design/gfs-move-forbidden-ux-matrix.md.
+ *
+ * Structure denies (A1–A5) and the operator-plane authority denies (A6–A8,
+ * copy-mapped here but never fabricated from local permission bits — the
+ * operator plane holds intrinsic authority) come from the shared policy.
+ * Resolution/outcome reasons (A10, B4, B5, B7) come from endpoint reads and
+ * transport results around the move PATCH.
+ */
+export type GfsDropRefusalReason =
+ | GfsStructureRefusalReason
+ | 'destination-write'
+ | 'source-write'
+ | 'source-delete'
+ | 'unavailable'
+ | 'target-unavailable'
+ | 'source-location-unknown'
+ | 'unknown-outcome'
+ | 'move-not-completed'
+
+export type GfsStructureRefusalReason =
+ | 'self'
+ | 'descendant'
+ | 'same-parent'
+ | 'root-source'
+ | 'cross-drive'
+
+/**
+ * The hover treatment painted on a drop target through `data-drop-state`.
+ * Only `allowed` paints the blue "drop here" affordance; every other state
+ * explains itself through `data-drop-reason` plus the tone mapping.
+ */
+export type GfsDropHoverState = 'allowed' | 'checking' | 'denied' | 'unavailable' | 'same-parent'
+
+export type GfsDropHoverVerdict =
+ | { state: 'allowed'; evidence: GfsDragStructureEvidence }
+ | { state: 'checking' }
+ | { state: 'denied'; reason: Exclude<GfsStructureRefusalReason, 'same-parent'> }
+ | { state: 'unavailable' }
+ | { state: 'same-parent' }
+
+/** Observed facts one hover verdict is computed from (zero network). */
+export interface GfsDropHoverFacts {
+ drive: string
+ sourceResourceId: string
+ sourceKind: 'file' | 'directory'
+ /** Physical source parent observation from the dragstart listing. */
+ sourceParentKnown: boolean
+ sourceParentResourceId: string | null
+ /** Null when the target's identity is not available yet (unhydrated root). */
+ targetResourceId: string | null
+ targetName: string
+ /** True when the target IS the folder whose listing is on screen. */
+ targetIsActiveLocation: boolean
+ /** True when the target is observed to be the source's physical parent. */
+ targetIsSourceParent: boolean
+ /** Ancestors of the target, nearest-first; trailing null marks an
+ * observation walked to the physical root. */
+ targetAncestorIds: readonly (string | null)[]
+ /** Currently known ancestors of the source (physical parent and above). */
+ knownSourceAncestorIds: ReadonlySet<string>
+}
+
+/** An immutable, synchronously captured drag-move destination. */
+export interface GfsMoveDestination {
+ resourceId: string
+ rid: string | null
+ name: string
+ kind: 'directory'
+ /** Immutable resolve key for pre-dispatch re-resolution. */
+ gfsUri: string | null
+ /** Known canonical path ('/' for the drive root); null when unobserved. */
+ path: string | null
+ version?: number
+ origin: 'row' | 'crumb'
+}
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 0a9d88d39..8fea81289 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.744",
+ "version": "0.1.745",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.744",
+ "version": "0.1.745",
"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 d2f6635a3..7e91021e3 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.744",
+ "version": "0.1.745",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",