Skip to content

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

TypeScript

feat(control-ui): sweep peripheral context copy and resolve mounts to agents (Phase 4 / Category D)

Miguelon Peluchon8658d4e16ea2
diff --git a/control-ui/app/constants/createFlowLoading.ts b/control-ui/app/constants/createFlowLoading.ts
index 65bb4bf50..a80fee81f 100644
--- a/control-ui/app/constants/createFlowLoading.ts
+++ b/control-ui/app/constants/createFlowLoading.ts
@@ -52,7 +52,7 @@ export const CREATE_FLOW_LOADING = {
createSharedFileSystem: {
iconKey: 'shared-files',
title: 'Create SharedFileSystem',
- subtitle: 'Provision workspace storage that Contexts can mount read-only into agent pods.',
+ subtitle: 'Provision workspace storage that agents can mount read-only into their pods.',
backLabel: 'Back to Agent Files',
steps: ['Storage', 'Access', 'Folders'],
stepFlowClassName: 'cu-create-step-flow--3',
diff --git a/control-ui/app/mcp-servers/[name]/edit/page.tsx b/control-ui/app/mcp-servers/[name]/edit/page.tsx
index 620247988..b3f88e80a 100644
--- a/control-ui/app/mcp-servers/[name]/edit/page.tsx
+++ b/control-ui/app/mcp-servers/[name]/edit/page.tsx
@@ -441,16 +441,6 @@ export default function EditMcpServerPage() {
<strong>Image:</strong>{' '}
<code>{typeof server.spec?.image === 'string' ? server.spec.image : '-'}</code>
</div>
- <div>
- <strong>Contexts:</strong>{' '}
- <code>
- {loadingContexts
- ? 'Loading…'
- : contextListError
- ? 'Unavailable'
- : contextNames.join(', ') || '-'}
- </code>
- </div>
</div>
<EgressEditor
diff --git a/control-ui/app/profile-admin/teams/[teamId]/page.tsx b/control-ui/app/profile-admin/teams/[teamId]/page.tsx
index 75b14c36d..bc4ad045f 100644
--- a/control-ui/app/profile-admin/teams/[teamId]/page.tsx
+++ b/control-ui/app/profile-admin/teams/[teamId]/page.tsx
@@ -14,6 +14,7 @@ import { getAgentDisplayName } from '@lib/agentName'
import { InviteMemberDialog } from '../../../../components/InviteMemberDialog'
import { IconUsers } from '../../../../components/Sidebar/icons'
import { IconCheck, IconMoreHorizontal, IconPencil, IconX } from '../../../../components/icons'
+import { accessScopeLabeler } from '../../../../lib/accessScopeLabels'
import {
AdminTeamPendingInvitation,
ContextResource,
@@ -206,26 +207,12 @@ export default function TeamDetailsPage() {
// Rows are context IDs on the wire, but the user sees what that access
// means: the owning agent(s) for private scopes, the stored display name
// for anything else, and the raw id as a last-resort muted fallback.
+ const accessLabeler = useMemo(
+ () => accessScopeLabeler(contextResources, hosts || []),
+ [contextResources, hosts]
+ )
function accessLabelFor(contextId: string): { label: string; resolved: boolean } {
- const owners = (hosts || [])
- .map(host => {
- const ref = String(
- (host.spec as { contextRef?: string } | undefined)?.contextRef || ''
- ).trim()
- if (ref !== contextId) return ''
- return (
- String((host.spec as { host?: string } | undefined)?.host || '').trim() ||
- String(host.metadata?.name || '')
- )
- })
- .filter(Boolean)
- .sort((a, b) => a.localeCompare(b))
- if (owners.length > 0) return { label: owners.join(', '), resolved: true }
- const display = contextResources
- .find(item => contextIdFromResource(item as never) === contextId)
- ?.spec?.displayName?.trim()
- if (display) return { label: display, resolved: true }
- return { label: contextId, resolved: false }
+ return accessLabeler(contextId)
}
async function loadTeamData(
diff --git a/control-ui/app/profile-admin/users/[userId]/page.tsx b/control-ui/app/profile-admin/users/[userId]/page.tsx
index 1abf3a97b..148d1ae0b 100644
--- a/control-ui/app/profile-admin/users/[userId]/page.tsx
+++ b/control-ui/app/profile-admin/users/[userId]/page.tsx
@@ -10,6 +10,7 @@ import { TeamRolePermissionEditor } from '@components/TeamRolePermissionEditor'
import { useToast } from '@components/Toast'
import { CheckboxField } from '@components/ui'
import { CONTROL_ROUTES } from '@constants/routes'
+import { accessScopeLabeler } from '@lib/accessScopeLabels'
import { partitionVisibleAccess } from '@lib/accessVisibility'
import { getAgentDisplayName } from '@lib/agentName'
import type { DeleteCandidateTeam } from '@lib/profileAdminDelete'
@@ -220,26 +221,12 @@ export default function UserDetailsPage() {
// Rows are context IDs on the wire, but the user sees what that access
// means: the owning agent(s) for private scopes, the stored display name
// for anything else, and the raw id as a last-resort muted fallback.
+ const accessLabeler = useMemo(
+ () => accessScopeLabeler(contextResources, hosts || []),
+ [contextResources, hosts]
+ )
function accessLabelFor(contextId: string): { label: string; resolved: boolean } {
- const owners = (hosts || [])
- .map(host => {
- const ref = String(
- (host.spec as { contextRef?: string } | undefined)?.contextRef || ''
- ).trim()
- if (ref !== contextId) return ''
- return (
- String((host.spec as { host?: string } | undefined)?.host || '').trim() ||
- String(host.metadata?.name || '')
- )
- })
- .filter(Boolean)
- .sort((a, b) => a.localeCompare(b))
- if (owners.length > 0) return { label: owners.join(', '), resolved: true }
- const display = contextResources
- .find(item => contextIdFromResource(item as never) === contextId)
- ?.spec?.displayName?.trim()
- if (display) return { label: display, resolved: true }
- return { label: contextId, resolved: false }
+ return accessLabeler(contextId)
}
async function loadData() {
diff --git a/control-ui/app/shared-filesystems/[name]/page.tsx b/control-ui/app/shared-filesystems/[name]/page.tsx
index 525b694c7..9603ebf51 100644
--- a/control-ui/app/shared-filesystems/[name]/page.tsx
+++ b/control-ui/app/shared-filesystems/[name]/page.tsx
@@ -14,9 +14,14 @@ import { TableHeaderRow } from '../../../components/TableHeaderRow'
import type { TableHeaderColumn } from '../../../components/TableHeaderRow/types'
import { useToast } from '../../../components/Toast'
import { IconPencil, IconRefresh, IconX } from '../../../components/icons'
+import { accessScopeLabeler } from '../../../lib/accessScopeLabels'
import {
+ type ContextResource,
+ type HostResource,
type SharedFileSystemResource,
type WfcDirEntry,
+ getContexts,
+ getHosts,
getSharedFileSystem,
isSilentApiError,
sfsDelete,
@@ -54,6 +59,9 @@ export default function SharedFileSystemDetailsPage() {
const sfsName = decodeURIComponent(params.name || '')
const [meta, setMeta] = useState<SharedFileSystemResource | null>(null)
+ const [scopeLabeler, setScopeLabeler] = useState<
+ ((scopeId: string) => { label: string; resolved: boolean }) | null
+ >(null)
const [path, setPath] = useState('')
const [entries, setEntries] = useState<WfcDirEntry[]>([])
const [busy, setBusy] = useState(false)
@@ -87,6 +95,19 @@ export default function SharedFileSystemDetailsPage() {
try {
const r = await getSharedFileSystem(sfsName)
setMeta(r)
+ // Optional enrichment for the mount chip: resolve mount refs to owning
+ // agent names. A failure leaves refs unresolved but never blocks.
+ try {
+ const [contextsResult, hostsResult] = await Promise.all([getContexts(), getHosts()])
+ setScopeLabeler(() =>
+ accessScopeLabeler(
+ (contextsResult.items || []) as ContextResource[],
+ (hostsResult.items || []) as HostResource[]
+ )
+ )
+ } catch {
+ setScopeLabeler(null)
+ }
} catch (e) {
if (isSilentApiError(e)) return
setError(e instanceof Error ? e.message : 'Failed to load SharedFileSystem')
@@ -382,10 +403,22 @@ export default function SharedFileSystemDetailsPage() {
const storageClassLabel = meta?.status?.storageClassName || meta?.spec?.storageClassName || '—'
const accessModeLabels = (meta?.spec?.accessModes || []).map(formatAccessMode)
const mountedByContexts = meta?.status?.mountedByContexts || []
+ // Scopes with no owning agent (per-install or recipe private scopes) are
+ // invisible by policy, so they do not count as mounts the user can see.
+ const mountedByLabels = Array.from(
+ new Set(
+ mountedByContexts
+ .map(entry => (scopeLabeler ? scopeLabeler(entry.name) : null))
+ .filter((result): result is { label: string; resolved: boolean } =>
+ Boolean(result?.resolved)
+ )
+ .map(result => result.label)
+ )
+ )
const mountLabel =
- mountedByContexts.length === 0
- ? 'not mounted by any Context'
- : `mounted by ${mountedByContexts.map(c => c.name).join(', ')}`
+ mountedByLabels.length === 0
+ ? 'not mounted by any agent'
+ : `mounted by ${mountedByLabels.join(', ')}`
const metadataTags = [
phase,
capacityLabel,
diff --git a/control-ui/app/shared-filesystems/new/page.tsx b/control-ui/app/shared-filesystems/new/page.tsx
index 04c274900..e02650072 100644
--- a/control-ui/app/shared-filesystems/new/page.tsx
+++ b/control-ui/app/shared-filesystems/new/page.tsx
@@ -153,7 +153,7 @@ export default function CreateSharedFileSystemPage() {
<CreatePageHeader
icon={<IconSharedFiles />}
title="Create SharedFileSystem"
- subtitle="Provision workspace storage that Contexts can mount read-only into agent pods."
+ subtitle="Provision workspace storage that agents can mount read-only into their pods."
backLabel="Back to Agent Files"
onBack={() => router.push(CONTROL_ROUTES.agentFiles.root)}
backDisabled={saving}
diff --git a/control-ui/app/shared-filesystems/page.tsx b/control-ui/app/shared-filesystems/page.tsx
index 11366a1bc..5846433dc 100644
--- a/control-ui/app/shared-filesystems/page.tsx
+++ b/control-ui/app/shared-filesystems/page.tsx
@@ -13,9 +13,14 @@ import { useToast } from '@components/Toast'
import { IconRefresh, IconX } from '@components/icons'
import { Button } from '@components/ui'
import { CONTROL_ROUTES } from '@constants/routes'
+import { accessScopeLabeler } from '@lib/accessScopeLabels'
import {
+ type ContextResource,
+ type HostResource,
type SharedFileSystemResource,
deleteSharedFileSystem,
+ getContexts,
+ getHosts,
getSharedFileSystems,
isSilentApiError,
} from '@lib/api'
@@ -25,7 +30,7 @@ const SHARED_FILE_SYSTEM_COLUMNS: TableHeaderColumn[] = [
{ key: 'phase', label: 'Phase' },
{ key: 'capacity', label: 'Capacity' },
{ key: 'storage-class', label: 'Storage Class' },
- { key: 'mounted-by-contexts', label: 'Mounted by Contexts' },
+ { key: 'mounted-by', label: 'Mounted by' },
{ key: 'actions', label: 'Actions', width: '8rem', align: 'right' },
]
@@ -47,6 +52,9 @@ export default function SharedFileSystemsPage() {
const [loading, setLoading] = useState(true)
const [error, setError] = useState('')
const [items, setItems] = useState<SharedFileSystemResource[]>([])
+ const [scopeLabeler, setScopeLabeler] = useState<
+ (scopeId: string) => { label: string; resolved: boolean }
+ >(() => (scopeId: string) => ({ label: scopeId, resolved: false }))
const [searchQuery, setSearchQuery] = useState('')
const [deletingNames, setDeletingNames] = useState<Set<string>>(() => new Set())
const [deleteTarget, setDeleteTarget] = useState<string | null>(null)
@@ -61,6 +69,19 @@ export default function SharedFileSystemsPage() {
const r = await getSharedFileSystems()
const nextItems = (r.items || []) as SharedFileSystemResource[]
setItems(nextItems)
+ // Optional enrichment: mount refs resolve to owning agent names. A
+ // failure must not hide the table — refs simply stay unresolved.
+ try {
+ const [contextsResult, hostsResult] = await Promise.all([getContexts(), getHosts()])
+ setScopeLabeler(() =>
+ accessScopeLabeler(
+ (contextsResult.items || []) as ContextResource[],
+ (hostsResult.items || []) as HostResource[]
+ )
+ )
+ } catch {
+ setScopeLabeler(() => (scopeId: string) => ({ label: scopeId, resolved: false }))
+ }
return nextItems
} catch (e) {
if (isSilentApiError(e)) return null
@@ -162,7 +183,7 @@ export default function SharedFileSystemsPage() {
{isInitialLoad ? 'Agent Files' : `Agent Files (${filteredItems.length})`}
</>
}
- subtitle="Workspace volumes that Contexts can mount read-only into agent pods."
+ subtitle="Workspace volumes that agents can mount read-only into their pods."
actions={
<>
<SectionSearchInput
@@ -226,6 +247,16 @@ export default function SharedFileSystemsPage() {
const isDeleting = deletingNames.has(name)
const status = item.status || {}
const mountedBy = status.mountedByContexts || []
+ // Scopes with no owning agent (per-install or recipe
+ // private scopes) are invisible by policy.
+ const mountedByLabels = Array.from(
+ new Set(
+ mountedBy
+ .map(entry => scopeLabeler(entry.name))
+ .filter(result => result.resolved)
+ .map(result => result.label)
+ )
+ )
const phase = status.phase || 'Unknown'
const phaseClass =
phase === 'Ready'
@@ -261,11 +292,7 @@ export default function SharedFileSystemsPage() {
</td>
<td>{status.capacity || item.spec?.size || '—'}</td>
<td>{status.storageClassName || item.spec?.storageClassName || '—'}</td>
- <td>
- {mountedBy.length === 0
- ? '—'
- : mountedBy.map(c => `${c.namespace}/${c.name}`).join(', ')}
- </td>
+ <td>{mountedByLabels.length === 0 ? '—' : mountedByLabels.join(', ')}</td>
<td style={{ textAlign: 'right' }} onClick={e => e.stopPropagation()}>
<button
type="button"
diff --git a/control-ui/components/RecipeEditor.tsx b/control-ui/components/RecipeEditor.tsx
index 8264d6676..7bfcb4a28 100644
--- a/control-ui/components/RecipeEditor.tsx
+++ b/control-ui/components/RecipeEditor.tsx
@@ -67,7 +67,7 @@ function checkPolicyL1(parsed: { spec?: unknown } | null): ServerValidationError
field: 'spec.security.allowContextRef',
rule: 'agenticWorkflowContextRefBlocked',
message:
- `This agentic recipe references the shared Context "${ctxRef}". ` +
+ `This agentic recipe references the shared connector scope "${ctxRef}". ` +
`Choose one of two paths:\n` +
` • Option A — opt in to sharing: add \`"security": { "allowContextRef": true }\` to spec, ` +
`and ensure a WorkflowRecipePolicy with \`allowContextRef: true\` exists in the target namespace.\n` +
@@ -2406,7 +2406,7 @@ export function RecipeEditor({ initial, onSaved, onCancel, pageHeader }: Props)
or teams were authorized in the access panel above. Non-blocking: the
recipe still deploys, but it becomes invisible to every Desktop App
user because trigger authorization rejects callers without a direct
- user grant or context-bound team grant. Admins can still see it in
+ user grant or scope-bound team grant. Admins can still see it in
the Control UI, so this often goes unnoticed until a user asks why
the recipe isn't in their list.
*/}
diff --git a/control-ui/components/ResourceTable.tsx b/control-ui/components/ResourceTable.tsx
deleted file mode 100644
index 4c0dbc424..000000000
--- a/control-ui/components/ResourceTable.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-'use client'
-
-import React, { useMemo } from 'react'
-import { SkeletonTableRows } from './SkeletonTableRows'
-import { TablePanelHeader } from './TablePanelHeader'
-import { IconRefresh } from './icons'
-
-type Item = {
- metadata?: { name?: string; namespace?: string }
- spec?: Record<string, unknown>
-}
-
-function getDescription(item: Item): string {
- const spec = item.spec || {}
- if (typeof spec.description === 'string') return spec.description
- if (typeof spec.contextRef === 'string') return `contextRef: ${spec.contextRef}`
- if (typeof spec.hostRef === 'string') return `hostRef: ${spec.hostRef}`
- return '-'
-}
-
-export function ResourceTable({
- title,
- items,
- loading,
- onRefresh,
- refreshing,
-}: {
- title: string
- items: Item[]
- loading?: boolean
- onRefresh?: () => void
- refreshing?: boolean
-}) {
- const rows = useMemo(
- () =>
- items.map(i => ({
- key: `${i.metadata?.namespace || 'default'}/${i.metadata?.name || 'unknown'}`,
- item: i,
- })),
- [items]
- )
-
- const isInitialLoad = loading && items.length === 0
-
- return (
- <div className="cu-card">
- <div className="cu-card__body">
- <TablePanelHeader
- title={isInitialLoad ? title : `${title} (${rows.length})`}
- subtitle="Inspect linked resources and their summaries."
- actions={
- onRefresh ? (
- <button
- type="button"
- className="cu-btn cu-btn--icon cu-btn--toolbar"
- onClick={() => void onRefresh()}
- disabled={refreshing}
- aria-label={refreshing ? 'Refreshing…' : `Reload ${title.toLowerCase()}`}
- >
- <IconRefresh
- className={refreshing ? 'cu-spin' : undefined}
- width={18}
- height={18}
- />
- </button>
- ) : null
- }
- />
- {isInitialLoad ? (
- <div className="cu-table-wrap">
- <table className="cu-table cu-table--profile">
- <thead>
- <tr>
- <th>Connector name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <SkeletonTableRows columns={2} rows={5} />
- </tbody>
- </table>
- </div>
- ) : rows.length === 0 ? (
- <div className="cu-empty">No resources found.</div>
- ) : (
- <div className="cu-table-wrap">
- <table className="cu-table cu-table--profile">
- <thead>
- <tr>
- <th>Connector name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- {rows.map(({ key, item }) => (
- <tr key={key}>
- <td>
- <button
- type="button"
- className="cu-link"
- onClick={() => {
- if (item.metadata?.name) {
- // For now, no navigation - just display the name
- }
- }}
- >
- {item.metadata?.name || '-'}
- </button>
- </td>
- <td style={{ color: 'var(--cu-text-muted)', fontSize: '0.8125rem' }}>
- {getDescription(item)}
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
- )}
- </div>
- </div>
- )
-}
diff --git a/control-ui/components/WorkflowAccessPanel/constants.ts b/control-ui/components/WorkflowAccessPanel/constants.ts
index bf71ef307..1023f9bf0 100644
--- a/control-ui/components/WorkflowAccessPanel/constants.ts
+++ b/control-ui/components/WorkflowAccessPanel/constants.ts
@@ -15,7 +15,8 @@ export const WORKFLOW_ACCESS_SECTIONS: AccessSectionDefinition[] = [
{
key: 'trigger-teams',
title: 'Teams',
- description: 'Teams whose active members can trigger this workflow in the matching context.',
+ description:
+ 'Teams whose active members can trigger this workflow in the matching connector scope.',
pickLabel: 'Pick a team to grant trigger access',
emptyCreate: 'No teams selected for trigger access.',
emptyEdit: 'No teams have trigger access yet.',
diff --git a/control-ui/components/WorkflowRunModal/index.tsx b/control-ui/components/WorkflowRunModal/index.tsx
index 2c3c6da4c..a109db448 100644
--- a/control-ui/components/WorkflowRunModal/index.tsx
+++ b/control-ui/components/WorkflowRunModal/index.tsx
@@ -30,7 +30,7 @@ function operatorRunErrorMessage(err: unknown): string {
return 'This cluster is still running an older Control API that blocks operator runs for approval-gated workflows. Redeploy control-api and retry.'
}
if (message.includes('workflow_runtime_not_ready')) {
- return 'Workflow runtime infrastructure is still preparing. Wait for the recipe workload, MCP server, Context allowlist, and ready endpoints, then retry.'
+ return 'Workflow runtime infrastructure is still preparing. Wait for the recipe workload, MCP server, connector access, and ready endpoints, then retry.'
}
return message
}
diff --git a/control-ui/components/__tests__/ConnectorEditContext.test.tsx b/control-ui/components/__tests__/ConnectorEditContext.test.tsx
index b0367c192..245556e98 100644
--- a/control-ui/components/__tests__/ConnectorEditContext.test.tsx
+++ b/control-ui/components/__tests__/ConnectorEditContext.test.tsx
@@ -102,6 +102,5 @@ describe('connector edit agent access', () => {
rerender(<EditMcpServerPage />)
expect(screen.getByRole('textbox', { name: 'Egress rules' })).toBeEnabled()
expect(screen.getByRole('button', { name: 'Save egress' })).toBeEnabled()
- expect(screen.getByText('Unavailable')).toBeInTheDocument()
})
})
diff --git a/control-ui/components/__tests__/WorkflowRunModal.test.tsx b/control-ui/components/__tests__/WorkflowRunModal.test.tsx
index 96b59d3f5..7618b8cde 100644
--- a/control-ui/components/__tests__/WorkflowRunModal.test.tsx
+++ b/control-ui/components/__tests__/WorkflowRunModal.test.tsx
@@ -222,7 +222,7 @@ describe('WorkflowRunModal — error handling', () => {
await waitFor(() => {
expect(screen.getByRole('alert')).toHaveTextContent(
- 'Workflow runtime infrastructure is still preparing. Wait for the recipe workload, MCP server, Context allowlist, and ready endpoints, then retry.'
+ 'Workflow runtime infrastructure is still preparing. Wait for the recipe workload, MCP server, connector access, and ready endpoints, then retry.'
)
})
})
diff --git a/control-ui/lib/accessScopeLabels.ts b/control-ui/lib/accessScopeLabels.ts
new file mode 100644
index 000000000..04010e659
--- /dev/null
+++ b/control-ui/lib/accessScopeLabels.ts
@@ -0,0 +1,53 @@
+import type { ContextResource, HostResource } from './api'
+
+export type AccessScopeLabel = {
+ label: string
+ // False only for the raw-id fallback: nothing could resolve the scope to a
+ // user-facing name (no owning agent, no stored display name).
+ resolved: boolean
+}
+
+function contextIdOf(context: ContextResource): string {
+ return String(context.spec?.contextId || context.metadata?.name || '').trim()
+}
+
+function hostContextRef(host: HostResource): string {
+ return String((host.spec as { contextRef?: string } | undefined)?.contextRef || '').trim()
+}
+
+function hostDisplayName(host: HostResource): string {
+ return (
+ String((host.spec as { host?: string } | undefined)?.host || '').trim() ||
+ String(host.metadata?.name || '')
+ )
+}
+
+/**
+ * Builds a labeler that turns an access-scope id (a Context on the wire) into
+ * what the user actually sees: the owning agent name(s) when the scope backs
+ * hosts, the stored `displayName` otherwise, and the raw id as a muted
+ * last resort. Purely a presentation join — no extra API calls of its own.
+ */
+export function accessScopeLabeler(
+ contexts: readonly ContextResource[],
+ hosts: readonly HostResource[]
+): (scopeId: string) => AccessScopeLabel {
+ const contextById = new Map<string, ContextResource>()
+ for (const context of contexts) {
+ const id = contextIdOf(context)
+ if (id) contextById.set(id, context)
+ }
+
+ return function labelFor(scopeId: string): AccessScopeLabel {
+ const owners = hosts
+ .filter(host => hostContextRef(host) === scopeId)
+ .map(hostDisplayName)
+ .filter(Boolean)
+ .sort((left, right) => left.localeCompare(right))
+ if (owners.length > 0) return { label: owners.join(', '), resolved: true }
+
+ const display = contextById.get(scopeId)?.spec?.displayName?.trim()
+ if (display) return { label: display, resolved: true }
+ return { label: scopeId, resolved: false }
+ }
+}
diff --git a/control-ui/next-env.d.ts b/control-ui/next-env.d.ts
index c4b7818fb..9edff1c7c 100644
--- a/control-ui/next-env.d.ts
+++ b/control-ui/next-env.d.ts
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
-import "./.next/dev/types/routes.d.ts";
+import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index ecd63b31d..96ceb6eb7 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.461",
+ "version": "0.1.462",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.461",
+ "version": "0.1.462",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/llm-providers": "file:../packages/llm-providers",
diff --git a/control-ui/package.json b/control-ui/package.json
index c7fd2e391..3c4d24ff2 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.461",
+ "version": "0.1.462",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --git a/docs/features/control-ui-context-removal.md b/docs/features/control-ui-context-removal.md
index 58f7447b4..2c124d0e4 100644
--- a/docs/features/control-ui-context-removal.md
+++ b/docs/features/control-ui-context-removal.md
@@ -1,6 +1,6 @@
# Removing "Context" from the Control UI — Implementation Run
-**Status:** In execution. This document is the source of truth for the change.
+**Status:** Implemented on branch `feat/context-removal` (all phases 0–4 complete). This document is the source of truth for the change; the progress log in §10 is append-only history.
**Branch:** `feat/context-removal` (base: `origin/dev` @ `a584c259a`, which includes `feat/ux-improvements-29`).
**Scope:** `control-ui/**` only. **No backend, CRD, or API-contract changes.** Every existing API call keeps its exact endpoint, payload, and field names.
**Audience:** Engineers executing/reviewing the change, and human testers validating it.
@@ -194,7 +194,8 @@ Tests updated in the same commit: `HostTable.test.tsx` (hover card now asserts a
| 2026-08-26 | 0 | E1/E2/E3 implemented: hover card shows neutral "Connectors" heading (no slug), click opens the agent's own Connectors tab (`onOpenConnectors`), wizard failure copy reworded, error mapping verified interceptor-covered. CSS family renamed (`cu-agent-connectors-summary*`, `cu-host-connectors-*`; dead `cu-host-context-select` removed). Tests: `HostTable.test.tsx` (+slug-never-renders invariant, +click-navigation), `HostWizard.test.tsx` copy. `tsc --noEmit` + full vitest green (1743 passed). No backend changes. |
| 2026-08-26 | 1 | Category B implemented. **B1** connectors list: expanded row now has one write-capable **Agents** group (per-binding remove, shared-scope confirm when a context backs >1 agent, "Add agents" modal picking agents); Teams/Users stay read-only; orphan contexts (no owning agent) are invisible; `McpServerTable` props reworked (`agentBindingsByConnectorName`, `agentTargets`, `onAdd/RemoveFromAgents`, `updatingAgentAccessKey`). **B2** connector edit: tab `context`→`access` ("Access"), section "Agent access", redirect added for `/connectors/:name/edit/context`. **B3** create connector: steps `['Connector','Access','Secrets']`, optional agent multi-select with access preview; no-selection path creates a private scope (CRD requires `spec.contextRef`, so the connector gets its own invisible scope — same as installs); partial-failure copy names agents. **B4** install page form: steps `['Package','Credentials','Install']`, silent private scope per install via new `lib/privateContext.ts` (also adopted by HostWizard); success copy reworded. **B5** CSS renames (`cu-entity-access*`, `cu-connector-agent-access*`). Dead `RegistryInstallModal` + test deleted (zero production importers; documented dead in self-hosted-registry-ux-redesign.md). New shared helper `lib/privateContext.ts` (create-POST with one collision retry; wire shape identical to wizard's). Tests updated: McpServerTable, ConnectorEditContext, CreateMcpServerForm, RegistryInstallForm. Full vitest green (1718 passed), `tsc --noEmit` clean. **No backend changes** (verified: registry install API still receives `contextRef`; McpServer CRD still gets a valid `spec.contextRef`). |
| 2026-08-26 | 2 | Category C implemented. Member + team detail "Contexts" tabs → route `access` / label **"Access"**; rows show resolved labels (owning agent name(s) → context `displayName` → muted raw id), no `/contexts` links; confirm/toast/error copy reworded ("Access updated.", "Removed access"); add-modal relabeled with resolved-label picker, writing context IDs unchanged. Team wizard step "Contexts" → **"Access"**. Legacy `ProfileAdminPanel.tsx` deleted (zero importers). `ProfileAdminHome` "Contexts" column → **"Access"** (same sort/count source). Redirects for `/users-and-teams/{users,teams}/:id/contexts` → `…/access`. No backend changes (GET/PUT `/admin/{users,teams}/:id/contexts` payloads byte-identical). |
-| 2026-08-26 | 3 | Category A implemented + e2e migration for phases 0–3. Deleted: `/contexts` pages (`page`, `new`, `[name]`, `[name]/[tab]`), `components/ContextTable.tsx`, sidebar item/type/order, `DashboardLayout` branch, `CONTROL_ROUTES.contexts` builders, `createFlowLoading.createContext`, stale `/contexts/:name/shared-files` redirect. Added `app/contexts/[[...slug]]/page.tsx` legacy resolver (slug → owning agent's Connectors tab via `spec.contextRef` join; unknown/`new`/failures → `/agents`). Tests: contexts suites + `ContextTable.test.tsx` deleted; **spec-preservation contract re-homed** to `HostDetailsPage.connectors.test.tsx` (unknown `spec.gfs` + `resourceVersion` survive agent-side connector PUTs); RFC1123 generation stays covered by `lib/__tests__/agentContext.test.ts`; `Sidebar.test.tsx` order, `AuthContext.test.tsx` URL fixture updated. E2e: main `contexts.spec.ts` rewritten as redirect/no-sidebar regression; `auth.spec.ts`, `channels.spec.ts`, `mcp-servers.spec.ts`, `helpers/selectors.ts` cleaned. QA-recorder: 4 context specs deleted + their npm scripts; connector-edit/navigation/onboarding-combo/team-create/create-form-smoke/connectors/shared-fs-upload migrated to agent-access flows (API-created contexts where a context fixture is needed). Full vitest (1700) + `tsc` green. No backend changes. |
+| 2026-08-26 | 3 | Category A implemented + e2e migration for phases 0–3. Deleted: `/contexts` pages (`page`, `new`, `[name]`, `[name]/[tab]`), `components/ContextTable.tsx`, sidebar item/type/order, `DashboardLayout` branch, `CONTROL_ROUTES.contexts` builders, `createFlowLoading.createContext`, stale `/contexts/:name/shared-files` redirect. Added `app/contexts/[[...slug]]/page.tsx` legacy resolver (slug → owning agent's Connectors tab via `spec.contextRef` join; unknown/`new`/failures → `/agents`). Tests: contexts suites + `ContextTable.test.tsx` deleted; **spec-preservation contract re-homed** to `HostDetailsPage.connectors.test.tsx` (unknown `spec.gfs` + `resourceVersion` survive agent-side connector PUTs); RFC1123 generation stays covered by `lib/__tests__/agentContext.test.ts`; `Sidebar.test.tsx` order, `AuthContext.test.tsx` URL fixture updated. E2e: main `contexts.spec.ts` rewritten as redirect/no-sidebar regression; `auth.spec.ts`, `channels.spec.ts`, `mcp-servers.spec.ts`, `helpers/selectors.ts` cleaned. QA-recorder: 4 context specs deleted + their npm scripts; connector-edit/navigation/onboarding-combo/team-create/create-form-smoke/connectors/shared-fs-upload migrated to agent-access flows (API-created contexts where a context fixture is needed). Full vitest + `tsc` green. No backend changes. |
+| 2026-08-26 | 4 | Category D + close-out. SFS list column → "Mounted by" with mount refs resolved to owning agent names (failure-tolerant hosts/contexts enrichment); SFS create subtitle + loading-skeleton copy reworded; SFS detail chip "not mounted by any agent" / "mounted by <agents>" (invisible scopes don't count); recipe editor L1 banner speaks "shared connector scope" (JSON keys untouched); workflow-run infra error → "connector access"; workflow access panel description reworded; dead `ResourceTable.tsx` deleted. New shared `lib/accessScopeLabels.ts` (scope id → agent/display label join) now backs users/teams Access tabs and SFS surfaces. Residual sweep: missed "Contexts:" meta line on connector egress tab removed; `createFlowLoading` SFS copy fixed; verified remaining "context" strings are all §3 exclusions (LLM prompt "User context", guardrail `may_add context`, service name `host-context-controller`, internal identifiers). **Verification:** full vitest 1700/1700, `tsc --noEmit` clean, `next build` compiles with `/contexts/[[...slug]]` as the only contexts route. No backend changes. |
## 11. Open questions / follow-ups (non-blocking)