Skip to content

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

TypeScript

feat(control-ui): drop LLM Catalog status column + merge with dev

pal41532f1a81a1
diff --git a/control-ui/app/constants/hostDetails.ts b/control-ui/app/constants/hostDetails.ts
index 13e7de0d4..49bdc12ea 100644
--- a/control-ui/app/constants/hostDetails.ts
+++ b/control-ui/app/constants/hostDetails.ts
@@ -1,4 +1,4 @@
-export const HOST_DEFAULT_TAB = 'identity'
+export const HOST_DEFAULT_TAB = 'details'
export const HOST_TABS = ['details', 'identity', 'model', 'contexts', 'access', 'advanced'] as const
diff --git a/control-ui/app/hosts/[name]/page.tsx b/control-ui/app/hosts/[name]/page.tsx
index 149e47baa..198fed341 100644
--- a/control-ui/app/hosts/[name]/page.tsx
+++ b/control-ui/app/hosts/[name]/page.tsx
@@ -15,9 +15,10 @@ import { HostIdentityTab } from '../../../components/HostIdentityTab'
import { HostOverviewTab } from '../../../components/HostOverviewTab'
import { LlmProviderConfig } from '../../../components/LlmProviderConfig'
import { IconRobot } from '../../../components/Sidebar/icons'
-import { IconCheck, IconMoreHorizontal, IconPencil } from '../../../components/icons'
+import { IconCheck, IconMoreHorizontal, IconPencil, IconX } from '../../../components/icons'
import { apiSend, getHost, getHostDetailBundle } from '../../../lib/api'
import { useLlmAllowedModels } from '../../../lib/hooks/useLlmAllowedModels'
+import { FIRST_PARTY_CHANNEL_WORKFLOW_CONTROL_SCOPES } from '../../../lib/hostWorkflowControl'
import {
type HostAllowedModel,
LLM_EMPTY_TRIGGER_ERROR,
@@ -60,6 +61,15 @@ function parseHostTab(value: string | undefined): HostTab {
return HOST_TABS.find(tab => TAB_SLUGS[tab] === value) ?? HOST_DEFAULT_TAB
}
+// Cron×stateless: map the machine-readable suspend-blocked reason to
+// operator-friendly text. Every other reason renders verbatim.
+function friendlyLifecycleReason(reason: string): string {
+ if (reason === 'SuspendBlocked: activeCronSchedules') {
+ return 'Not suspending: active scheduled tasks keep this agent awake'
+ }
+ return reason
+}
+
function AgentActionsMenu({ busy, onDelete }: { busy: boolean; onDelete: () => void }) {
const [open, setOpen] = useState(false)
const ref = useRef<HTMLDivElement>(null)
@@ -123,12 +133,11 @@ export default function HostDetailsPage() {
// AP-6 — resourceVersion of the READ THE EDIT FORM WAS BUILT FROM.
// Captured at form load (loadData), NOT from the pre-save re-fetch inside
- // saveContextRef / saveModelAndCredentials: the optimistic-concurrency
- // guard must cover the whole human edit window. Anchoring it to the
- // pre-save re-fetch would only guard the milliseconds between that
- // re-fetch and the PUT, silently blessing any concurrent change that
- // landed while the operator was editing — exactly the stale-echo overwrite
- // AP-6 exists to prevent.
+ // saveHost: the optimistic-concurrency guard must cover the whole human
+ // edit window. Anchoring it to the pre-save re-fetch would only guard the
+ // milliseconds between that re-fetch and the PUT, silently blessing any
+ // concurrent change that landed while the operator was editing — exactly
+ // the stale-echo overwrite AP-6 exists to prevent.
const formResourceVersionRef = useRef('')
const [activeTab, setActiveTab] = useState<HostTab>(() => parseHostTab(params.tab))
@@ -136,17 +145,27 @@ export default function HostDetailsPage() {
const [error, setError] = useState('')
const [initialLoading, setInitialLoading] = useState(true)
+ const [editingOverview, setEditingOverview] = useState(false)
const [editingModel, setEditingModel] = useState(false)
const [editingContext, setEditingContext] = useState(false)
+ const [showDeleteAgentConfirm, setShowDeleteAgentConfirm] = useState(false)
+ const [deletingAgent, setDeletingAgent] = useState(false)
+ const [deleteAgentDialogError, setDeleteAgentDialogError] = useState('')
- const [contextRefDraft, setContextRefDraft] = useState('')
- // Overview tab — read-only summary. Kept in sync with the host spec by loadData.
+ const [hostNameDraft, setHostNameDraft] = useState(routeName)
const [hostDisplayDraft, setHostDisplayDraft] = useState('')
- const [contextMcpServers, setContextMcpServers] = useState<string[]>([])
- const [accessSummary, setAccessSummary] = useState<{
- memberCount: number
- teamCount: number
- }>({ memberCount: 0, teamCount: 0 })
+ const [contextRefDraft, setContextRefDraft] = useState('')
+ // Last server-backed snapshot of the Overview-owned fields, captured at every
+ // (re)load. Cancel (and re-opening Edit) reverts the whole class of Overview
+ // drafts to THIS — the last SAVED state — so a discarded edit (e.g. a Display
+ // name typed then cancelled) can never leak into a later saveHost PUT.
+ const savedOverviewRef = useRef({
+ hostName: routeName,
+ hostDisplay: '',
+ contextRef: '',
+ channels: [] as string[],
+ stateless: false,
+ })
const [providerDraft, setProviderDraft] = useState<LlmProvider>('openai')
// Model options are the operator allowlist (enabled only). The host's saved
// model is always kept selectable even if it fell out of the allowlist
@@ -174,9 +193,22 @@ export default function HostDetailsPage() {
// Data keys present per LLM Secret name, so the fallback credentialSlot
// dropdown can offer extra keys (e.g. `claude-api-key-fb1`) — never free text.
const [secretKeysByName, setSecretKeysByName] = useState<Record<string, string[]>>({})
+ const [channelsDraft, setChannelsDraft] = useState<string[]>([])
const [approvalToolsData, setApprovalToolsData] = useState<Record<string, boolean> | undefined>(
undefined
)
+ const [guardrailsData, setGuardrailsData] = useState<HostGuardrails | undefined>(undefined)
+ // Overview tab — read-only summary. Kept in sync with the host spec by loadData.
+ const [contextMcpServers, setContextMcpServers] = useState<string[]>([])
+ const [accessSummary, setAccessSummary] = useState<{
+ memberCount: number
+ teamCount: number
+ }>({ memberCount: 0, teamCount: 0 })
+ const [statelessDraft, setStatelessDraft] = useState(false)
+ const [savedStateless, setSavedStateless] = useState(false)
+ const [lifecycleState, setLifecycleState] = useState('')
+ const [lifecycleReason, setLifecycleReason] = useState('')
+ const [statelessRejectionMessage, setStatelessRejectionMessage] = useState('')
const [availableContexts, setAvailableContexts] = useState<string[]>([])
const [availableSecrets, setAvailableSecrets] = useState<string[]>([])
@@ -244,7 +276,7 @@ export default function HostDetailsPage() {
}
}, [])
- async function loadData(resetDrafts: 'all' | 'context' | 'model' | 'none' = 'all') {
+ async function loadData(resetDrafts: 'all' | 'overview' | 'model' | 'none' = 'all') {
setBusy(true)
setInitialLoading(true)
setError('')
@@ -256,13 +288,23 @@ export default function HostDetailsPage() {
// AP-6: remember the version of THIS read — the edit drafts below are
// built from it, so it is the correct precondition for the eventual save.
formResourceVersionRef.current = String(host.metadata?.resourceVersion || '')
- if (resetDrafts === 'all' || resetDrafts === 'context') {
- setContextRefDraft(String(spec.contextRef || ''))
- // Overview summary — display name + the linked context's MCP servers.
- // The display name falls back to the slug so the Overview card stays
- // populated for legacy hosts that never set spec.host.
- setHostDisplayDraft(String(spec.host || host.metadata?.name || routeName || ''))
- const ref = String(spec.contextRef || '').trim()
+ if (resetDrafts === 'all' || resetDrafts === 'overview') {
+ // Snapshot the saved Overview state so Cancel/Edit can revert to it.
+ const overview = {
+ hostName: String(host.metadata?.name || routeName),
+ hostDisplay: String(spec.host || host.metadata?.name || routeName),
+ contextRef: String(spec.contextRef || ''),
+ channels: Array.isArray(spec.channels) ? spec.channels.map(String).filter(Boolean) : [],
+ stateless: spec.lifecycle?.stateless === true,
+ }
+ savedOverviewRef.current = overview
+ setHostNameDraft(overview.hostName)
+ setHostDisplayDraft(overview.hostDisplay)
+ setContextRefDraft(overview.contextRef)
+ setChannelsDraft(overview.channels)
+ setStatelessDraft(overview.stateless)
+ // Overview read-only summary: linked context's MCP servers + access counts.
+ const ref = overview.contextRef.trim()
const matched = (contextsList || []).find(
(item: { spec?: { contextId?: string }; metadata?: { name?: string } }) =>
String(item.spec?.contextId || item.metadata?.name || '').trim() === ref
@@ -306,6 +348,26 @@ export default function HostDetailsPage() {
}
const rawTools = (spec.approval as { tools?: Record<string, boolean> } | undefined)?.tools
setApprovalToolsData(rawTools && typeof rawTools === 'object' ? rawTools : undefined)
+ const rawGuardrails = spec.guardrails as HostGuardrails | undefined
+ setGuardrailsData(
+ rawGuardrails && typeof rawGuardrails === 'object' ? rawGuardrails : undefined
+ )
+ const specStateless = spec.lifecycle?.stateless === true
+ setSavedStateless(specStateless)
+ setLifecycleState(String(host.status?.lifecycle?.state ?? ''))
+ setLifecycleReason(String(host.status?.lifecycle?.reason ?? ''))
+ const rejection = (host.status?.conditions ?? []).find(
+ condition => condition.type === 'StatelessEnableRejected' && condition.status === 'True'
+ )
+ setStatelessRejectionMessage(
+ rejection
+ ? String(
+ rejection.message ||
+ rejection.reason ||
+ 'Stateless mode was rejected by the platform.'
+ )
+ : ''
+ )
const contextIds = (contextsList || [])
.map(item => String(item.spec?.contextId || item.metadata?.name || '').trim())
@@ -362,37 +424,85 @@ export default function HostDetailsPage() {
setLlmPolicyDraft(next)
}
- // Scoped save for the Context tab. Contexts are referenced by name from the
- // host spec, so the only spec field changed here is `contextRef` — every
- // other field (model, secret, fallback policy, lifecycle, channels, etc.) is
- // preserved via the `...currentHost.spec` spread (full-replace semantics).
- // Carries the form-load resourceVersion so a concurrent edit/lifecycle tick
- // bounces as 409 conflict instead of silently overwriting the newer state.
- async function saveContextRef(): Promise<boolean> {
+ // Revert every Overview-owned draft to the last SAVED snapshot. Used by Cancel
+ // and by Edit-open so an edit session always starts from server-backed values
+ // — never a stale draft left behind by a prior discarded edit (any Overview
+ // field, not just Display name: the whole class shares this reset).
+ function resetOverviewDrafts() {
+ const saved = savedOverviewRef.current
+ setHostNameDraft(saved.hostName)
+ setHostDisplayDraft(saved.hostDisplay)
+ // contextRef is written by the Overview save (saveHost), so reset it here to
+ // block a stale leak — EXCEPT while the Context tab has a live edit open: it
+ // is a legitimate concurrent writer of contextRefDraft (its editingContext
+ // session), and reverting an in-progress selection would silently discard it.
+ if (!editingContext) setContextRefDraft(saved.contextRef)
+ setChannelsDraft(saved.channels)
+ setStatelessDraft(saved.stateless)
+ }
+
+ async function saveHost(): Promise<boolean> {
+ const nextHostName = hostNameDraft.trim()
+ if (!nextHostName) return false
+
setBusy(true)
setError('')
try {
+ // Re-fetch to preserve fields that aren't editable in this form. K8s
+ // replaceNamespacedCustomObject is a full replace, not a merge.
const currentHost = await getHost(routeName)
+ const currentLifecycle = currentHost.spec?.lifecycle
+ const currentWorkflowControl = currentHost.spec?.workflowControl
+ // Overview owns only identity/shape fields (name, display, context,
+ // channels, lifecycle). Model, secret, fallback policy and the per-host
+ // model allowlist are owned by the "Model & credentials" tab and are
+ // preserved here via the `...currentHost.spec` spread (full-replace
+ // semantics — omitting them is what keeps them intact).
+ const nextSpec: Record<string, unknown> = {
+ ...currentHost.spec,
+ host: hostDisplayDraft.trim() || nextHostName,
+ contextRef: contextRefDraft.trim(),
+ channels: channelsDraft,
+ // Echo spec.lifecycle explicitly: the admin facade full-replaces the
+ // spec, so leaving lifecycle implicit would strip the stateless flag.
+ ...(statelessDraft || currentLifecycle
+ ? { lifecycle: { ...currentLifecycle, stateless: statelessDraft } }
+ : {}),
+ ...(channelsDraft.length > 0 && currentWorkflowControl === undefined
+ ? { workflowControl: { scopes: [...FIRST_PARTY_CHANNEL_WORKFLOW_CONTROL_SCOPES] } }
+ : {}),
+ }
+
const formResourceVersion = formResourceVersionRef.current
await apiSend('PUT', `/api/v1/admin/hosts/${encodeURIComponent(routeName)}`, {
+ // AP-6: carry the resourceVersion captured at form load so the API
+ // rejects this save with 409 {error:'conflict'} if the Host changed
+ // while the operator was editing, instead of silently overwriting the
+ // concurrent change with this form's stale echo.
...(formResourceVersion ? { metadata: { resourceVersion: formResourceVersion } } : {}),
- spec: {
- ...currentHost.spec,
- contextRef: contextRefDraft.trim(),
- },
+ spec: nextSpec,
})
- await loadData('context')
- showToast('Context saved.', { tone: 'success' })
+ // Refresh server-backed state and this tab's saved values without
+ // clobbering a still-open draft in "Model & credentials".
+ await loadData('overview')
+ showToast('Agent configuration saved.', { tone: 'success' })
return true
} catch (e) {
const status = (e as { status?: number } | null)?.status
const code = (e as { code?: string } | null)?.code
if (status === 409 && code === 'conflict') {
+ // AP-6 conflict: the Host changed between the form-load read and this
+ // save. The resourceVersion precondition is whole-object (K8s has no
+ // field-level precondition), so the true cause may be another operator's
+ // edit OR the agent's own lifecycle machine ticking (HCC bumping
+ // status.lifecycle / wake-requested on a stateless host). The 409 carries
+ // no field diff, so the message must cover both causes without asserting
+ // the wrong one — while keeping the reload + re-apply recovery.
setError(
"This agent changed since you opened the form (another edit, or the agent's own lifecycle state updated). Reload to see the latest, then re-apply your change."
)
} else {
- setError(e instanceof Error ? e.message : 'Failed to save context')
+ setError(e instanceof Error ? e.message : 'Failed to save agent')
}
return false
} finally {
@@ -403,8 +513,8 @@ export default function HostDetailsPage() {
// Scoped save for the "Model & credentials" tab. Owns provider/model,
// secretRef, the opt-in fallback policy, the per-host model allowlist, and
// write-only credential rotations/retirements. All other spec fields
- // (context, lifecycle, channels) are preserved via the `...currentHost.spec`
- // spread (full-replace semantics).
+ // (identity, context, channels, lifecycle) are preserved via the
+ // `...currentHost.spec` spread (full-replace semantics).
async function saveModelAndCredentials(): Promise<boolean> {
// Client-side mirror of control-api's write gate (spec R5.3): block a save
// with an out-of-allowlist fallback model before the round-trip. Skip the
@@ -532,7 +642,7 @@ export default function HostDetailsPage() {
const status = (e as { status?: number } | null)?.status
const code = (e as { code?: string } | null)?.code
if (status === 409 && code === 'conflict') {
- // AP-6 conflict (see saveContextRef for full rationale): the Host changed
+ // AP-6 conflict (see saveHost for full rationale): the Host changed
// between the form-load read and this save. Reload to re-apply.
setError(
"This agent changed since you opened the form (another edit, or the agent's own lifecycle state updated). Reload to see the latest, then re-apply your change."
@@ -560,8 +670,8 @@ export default function HostDetailsPage() {
await apiSend('PUT', `/api/v1/admin/hosts/${encodeURIComponent(routeName)}`, {
spec: nextSpec,
})
- // Reload approval/server state while preserving drafts left open in
- // the Model or Context tabs.
+ // Reload approval/server state while preserving any drafts left open
+ // in the Overview or Model tabs.
await loadData('none')
} catch (e) {
setError(e instanceof Error ? e.message : 'Failed to save approval tools')
@@ -576,25 +686,64 @@ export default function HostDetailsPage() {
[routeName]
)
- async function handleDeleteAgent() {
- const shouldDelete = await confirm({
- title: 'Delete Agent',
- message: `Delete agent ${routeName}?`,
- confirmLabel: 'Delete',
- tone: 'danger',
- })
- if (!shouldDelete) return
+ // Persist Host.spec.guardrails (hook references + built-ins). Owns only the
+ // guardrails object — every other spec field is preserved via the
+ // `...currentHost.spec` spread (full-replace semantics). Carries the
+ // form-load resourceVersion so a concurrent change 409s instead of being
+ // overwritten (AP-6), surfacing the same reload guidance as the other saves.
+ const persistGuardrails = useCallback(
+ async (next: HostGuardrails) => {
+ setBusy(true)
+ setError('')
+ try {
+ const currentHost = await getHost(routeName)
+ const nextSpec = {
+ ...currentHost.spec,
+ guardrails: next,
+ }
+ const formResourceVersion = formResourceVersionRef.current
+ await apiSend('PUT', `/api/v1/admin/hosts/${encodeURIComponent(routeName)}`, {
+ ...(formResourceVersion ? { metadata: { resourceVersion: formResourceVersion } } : {}),
+ spec: nextSpec,
+ })
+ // Reload guardrails/server state while preserving any drafts left open
+ // in the Overview or Model tabs.
+ await loadData('none')
+ showToast('Guardrails saved.', { tone: 'success' })
+ } catch (e) {
+ const status = (e as { status?: number } | null)?.status
+ const code = (e as { code?: string } | null)?.code
+ if (status === 409 && code === 'conflict') {
+ setError(
+ "This agent changed since you opened the form (another edit, or the agent's own lifecycle state updated). Reload to see the latest, then re-apply your change."
+ )
+ } else {
+ setError(e instanceof Error ? e.message : 'Failed to save guardrails')
+ }
+ // Re-throw so HostGuardrailsSection stays in edit mode and keeps the
+ // operator's draft alongside the error/conflict banner.
+ throw e
+ } finally {
+ setBusy(false)
+ }
+ },
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ [routeName]
+ )
- setBusy(true)
+ async function deleteAgentPermanently() {
+ setDeletingAgent(true)
+ setDeleteAgentDialogError('')
setError('')
try {
await apiSend('DELETE', `/api/v1/admin/hosts/${encodeURIComponent(routeName)}`)
+ setShowDeleteAgentConfirm(false)
showToast(`Agent ${routeName} deleted.`, { tone: 'success' })
router.push(CONTROL_ROUTES.agents.root)
} catch (e) {
- setError(e instanceof Error ? e.message : `Failed to delete agent ${routeName}`)
+ setDeleteAgentDialogError(e instanceof Error ? e.message : 'Failed to delete agent')
} finally {
- if (mountedRef.current) setBusy(false)
+ setDeletingAgent(false)
}
}
@@ -620,7 +769,15 @@ export default function HostDetailsPage() {
href: hostTabHref(tab),
}))}
title={`Agent: ${routeName}`}
- titleActions={<AgentActionsMenu busy={busy} onDelete={() => void handleDeleteAgent()} />}
+ titleActions={
+ <AgentActionsMenu
+ busy={busy || deletingAgent}
+ onDelete={() => {
+ setDeleteAgentDialogError('')
+ setShowDeleteAgentConfirm(true)
+ }}
+ />
+ }
>
<div className="cu-agent-detail-scroll">
{activeTab === 'details' && (
@@ -890,7 +1047,7 @@ export default function HostDetailsPage() {
type="button"
className="cu-btn cu-btn--icon cu-btn--toolbar"
onClick={async () => {
- if (await saveContextRef()) {
+ if (await saveHost()) {
setEditingContext(false)
}
}}
@@ -925,6 +1082,74 @@ export default function HostDetailsPage() {
{activeTab === 'access' && <HostAccessTab hostName={routeName} />}
</div>
+ {showDeleteAgentConfirm && (
+ <div
+ style={{
+ position: 'fixed',
+ inset: 0,
+ background: 'var(--cu-overlay)',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ zIndex: 1000,
+ padding: '1rem',
+ }}
+ role="presentation"
+ onClick={e => {
+ if (e.target === e.currentTarget && !deletingAgent) setShowDeleteAgentConfirm(false)
+ }}
+ >
+ <div
+ className="cu-modal-panel"
+ style={{ width: 'min(28rem, 96vw)' }}
+ role="alertdialog"
+ aria-labelledby="confirm-delete-agent"
+ onClick={e => e.stopPropagation()}
+ >
+ <div className="cu-modal-panel__head">
+ <strong id="confirm-delete-agent" style={{ fontSize: '1rem', lineHeight: 1.35 }}>
+ Delete agent permanently?
+ </strong>
+ <button
+ type="button"
+ className="cu-btn cu-btn--icon cu-btn--ghost"
+ onClick={() => setShowDeleteAgentConfirm(false)}
+ disabled={deletingAgent}
+ aria-label="Close"
+ >
+ <IconX width={18} height={18} />
+ </button>
+ </div>
+ <p className="cu-muted" style={{ fontSize: '0.875rem', margin: '0 0 1rem' }}>
+ This removes <strong>{routeName}</strong> and cannot be undone.
+ </p>
+ {deleteAgentDialogError ? (
+ <div className="cu-banner cu-banner--error" style={{ marginBottom: '0.75rem' }}>
+ {deleteAgentDialogError}
+ </div>
+ ) : null}
+ <div className="cu-modal-panel__foot">
+ <button
+ type="button"
+ className="cu-btn cu-btn--ghost cu-btn--sm"
+ onClick={() => setShowDeleteAgentConfirm(false)}
+ disabled={deletingAgent}
+ >
+ Cancel
+ </button>
+ <button
+ type="button"
+ className="cu-btn cu-btn--primary"
+ style={{ background: 'var(--cu-danger)', borderColor: 'var(--cu-danger)' }}
+ onClick={() => void deleteAgentPermanently()}
+ disabled={deletingAgent}
+ >
+ {deletingAgent ? 'Deleting…' : 'Delete agent'}
+ </button>
+ </div>
+ </div>
+ </div>
+ )}
{confirmDialog}
</DetailPageShell>
)
diff --git a/control-ui/app/hosts/page.tsx b/control-ui/app/hosts/page.tsx
index 2fa1ca749..817e22e33 100644
--- a/control-ui/app/hosts/page.tsx
+++ b/control-ui/app/hosts/page.tsx
@@ -91,7 +91,7 @@ export default function HostsPage() {
{error ? <div className="cu-banner cu-banner--error">{error}</div> : null}
<HostTable
items={hosts}
- onOpen={host => router.push(CONTROL_ROUTES.agents.detail(host.name))}
+ onOpen={host => router.push(CONTROL_ROUTES.agents.tab(host.name, 'overview'))}
onOpenContext={contextName => {
const trimmed = contextName.trim()
if (trimmed) router.push(CONTROL_ROUTES.contexts.connectors(trimmed))
diff --git a/control-ui/components/HostOverviewTab/index.tsx b/control-ui/components/HostOverviewTab/index.tsx
index e2dd4f6f6..759f4fd83 100644
--- a/control-ui/components/HostOverviewTab/index.tsx
+++ b/control-ui/components/HostOverviewTab/index.tsx
@@ -1,130 +1,283 @@
import React from 'react'
+import { IconCopy } from '../icons'
import type { HostOverviewTabProps } from './types'
-function SummaryCard({ title, children }: { title: string; children: React.ReactNode }) {
+function UsersIcon() {
return (
- <section className="cu-card" aria-label={title}>
- <div className="cu-card__body">
- <h3 className="cu-section-title" style={{ marginBottom: 'var(--cu-space-2)' }}>
- {title}
- </h3>
- {children}
- </div>
- </section>
+ <svg
+ viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.8"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ aria-hidden="true"
+ >
+ <circle cx="9" cy="8" r="3.2" />
+ <path d="M2.8 19.4c.4-3 2.9-5.2 6.2-5.2s5.8 2.2 6.2 5.2" />
+ <circle cx="17" cy="6.5" r="2.4" />
+ <path d="M21.2 17c-.3-2.2-2-3.7-4.2-3.7" />
+ </svg>
+ )
+}
+
+function TeamIcon() {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.8"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ aria-hidden="true"
+ >
+ <rect x="3.5" y="6" width="17" height="13" rx="2" />
+ <path d="M3.5 10.5h17" />
+ <path d="M8 6V4.5h8V6" />
+ <path d="M9 14h6" />
+ </svg>
+ )
+}
+
+const STATUS_DOT_CLASS: Record<HostOverviewTabProps['statusTone'], string> = {
+ active: 'cu-host-overview-status__dot--active',
+ inactive: 'cu-host-overview-status__dot--inactive',
+ unknown: 'cu-host-overview-status__dot--unknown',
+}
+
+function StatusDot({ tone }: { tone: HostOverviewTabProps['statusTone'] }) {
+ return (
+ <span className={`cu-host-overview-status__dot ${STATUS_DOT_CLASS[tone]}`} aria-hidden="true" />
+ )
+}
+
+function SectionLabel({ children }: { children: React.ReactNode }) {
+ return <p className="cu-host-overview-section-label">{children}</p>
+}
+
+function ConfigRow({ setting, value }: { setting: string; value: React.ReactNode }) {
+ return (
+ <div className="cu-host-overview-config__row">
+ <div className="cu-host-overview-config__setting">{setting}</div>
+ <div className="cu-host-overview-config__value">{value || '—'}</div>
+ </div>
)
}
export function HostOverviewTab({
hostName,
displayName,
+ statusLabel,
+ statusTone,
contextRef,
contextMcpServers,
- modelName,
- fallbackLines,
- allowedModelLines,
+ contextMcpTotal,
+ contextHref,
+ modelPrimary,
+ modelProviderLine,
+ modelAllowlistLine,
accessSummary,
+ uid,
+ createdAt,
+ lastUpdated,
}: HostOverviewTabProps) {
+ const shownName = displayName.trim() || hostName
const contextLabel = contextRef.trim() || '—'
const hasContext = Boolean(contextRef.trim())
- const hasMcpServers = contextMcpServers.length > 0
+ const allowlist = modelAllowlistLine.trim() || '—'
return (
- <div className="cu-form-stack cu-agent-form-stack">
- <SummaryCard title="Name">
- <div className="cu-field" style={{ marginBottom: 0 }}>
- <div
- style={{
- fontSize: '1.25rem',
- fontWeight: 600,
- lineHeight: 1.3,
- }}
+ <div className="cu-host-overview">
+ <section className="cu-host-overview-identity" aria-label="Agent identity">
+ <div className="cu-host-overview-identity__avatar" aria-hidden="true">
+ <svg
+ viewBox="0 0 24 24"
+ width="44"
+ height="44"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.7"
+ strokeLinecap="round"
+ strokeLinejoin="round"
>
- {displayName.trim() || hostName}
+ <rect x="5" y="7" width="14" height="12" rx="3" />
+ <path d="M9 4h6" />
+ <circle cx="9" cy="13" r="1.2" fill="currentColor" stroke="none" />
+ <circle cx="15" cy="13" r="1.2" fill="currentColor" stroke="none" />
+ <path d="M12 16v3" />
+ <path d="M9 19h6" />
+ </svg>
+ </div>
+ <div className="cu-host-overview-identity__name">{shownName}</div>
+ <div className="cu-host-overview-identity__slug">{hostName}</div>
+ <div className="cu-host-overview-identity__status">
+ <StatusDot tone={statusTone} />
+ <span>{statusLabel}</span>
+ </div>
+
+ <div className="cu-host-overview-identity__divider" />
+
+ <SectionLabel>Access</SectionLabel>
+ <div className="cu-host-overview-identity__counts">
+ <div>
+ <div className="cu-host-overview-identity__count-value">
+ {accessSummary.memberCount}
+ </div>
+ <div className="cu-host-overview-identity__count-label">
+ {accessSummary.memberCount === 1 ? 'member' : 'members'}
+ </div>
</div>
- <div className="cu-muted" style={{ fontSize: '0.8125rem', marginTop: '0.15rem' }}>
- {hostName}
+ <div className="cu-host-overview-identity__count-sep" aria-hidden="true" />
+ <div>
+ <div className="cu-host-overview-identity__count-value">{accessSummary.teamCount}</div>
+ <div className="cu-host-overview-identity__count-label">
+ {accessSummary.teamCount === 1 ? 'team' : 'teams'}
+ </div>
</div>
</div>
- </SummaryCard>
-
- <SummaryCard title="Access">
- <div className="cu-field" style={{ marginBottom: 0 }}>
- <div
- style={{
- display: 'flex',
- gap: 'var(--cu-space-3)',
- flexWrap: 'wrap',
- }}
+
+ <div className="cu-host-overview-identity__divider" />
+
+ <SectionLabel>Context</SectionLabel>
+ {hasContext ? (
+ <a
+ href={contextHref}
+ className="cu-chip cu-host-overview-context-chip"
+ style={{ display: 'inline-flex', alignItems: 'center', gap: '0.4rem' }}
>
- <span className="cu-chip">
- {accessSummary.memberCount === 1
- ? '1 member'
- : `${accessSummary.memberCount} members`}
- </span>
- <span className="cu-chip">
- {accessSummary.teamCount === 1 ? '1 team' : `${accessSummary.teamCount} teams`}
- </span>
- </div>
- </div>
- </SummaryCard>
+ <svg
+ viewBox="0 0 24 24"
+ width="14"
+ height="14"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ aria-hidden="true"
+ >
+ <rect x="3" y="4" width="18" height="16" rx="2" />
+ <path d="M3 10h18" />
+ <path d="M9 4v16" />
+ </svg>
+ {contextLabel}
+ </a>
+ ) : (
+ <span className="cu-muted" style={{ fontSize: '0.875rem' }}>
+ —
+ </span>
+ )}
- <SummaryCard title="Models">
- <div className="cu-field">
- <label>Primary</label>
- <div className="cu-field__readonly">{modelName.trim() || '—'}</div>
+ <div className="cu-host-overview-identity__divider" />
+
+ <SectionLabel>Agent ID</SectionLabel>
+ <div className="cu-host-overview-identity__uid">
+ <span className="cu-host-overview-identity__uid-text">{uid || '—'}</span>
+ {uid ? (
+ <button
+ type="button"
+ className="cu-btn cu-btn--icon cu-btn--ghost cu-btn--sm"
+ aria-label="Copy agent ID"
+ title="Copy agent ID"
+ onClick={() => {
+ if (typeof navigator !== 'undefined' && navigator.clipboard) {
+ void navigator.clipboard.writeText(uid)
+ }
+ }}
+ >
+ <IconCopy width={14} height={14} />
+ </button>
+ ) : null}
</div>
- {fallbackLines.length > 0 ? (
- <div className="cu-field">
- <label>Fallbacks</label>
- <ol className="cu-llm-policy__summary" style={{ margin: 0 }}>
- {fallbackLines.map((line, index) => (
- <li key={index} className="cu-field__readonly">
- {line}
- </li>
- ))}
- </ol>
+ <dl className="cu-host-overview-identity__meta">
+ <dt>Created</dt>
+ <dd>{createdAt || '—'}</dd>
+ <dt>Last updated</dt>
+ <dd>{lastUpdated || '—'}</dd>
+ </dl>
+ </section>
+
+ <div className="cu-host-overview-right">
+ <section className="cu-card" aria-label="Configuration">
+ <div className="cu-card__body">
+ <p className="cu-host-overview-section-label">Configuration</p>
+ <div className="cu-host-overview-config">
+ <ConfigRow setting="Primary model" value={modelPrimary} />
+ <ConfigRow setting="Provider · Model" value={modelProviderLine} />
+ <ConfigRow setting="Per-host model allowlist" value={allowlist} />
+ <ConfigRow setting="Assigned context" value={contextLabel} />
+ </div>
</div>
- ) : null}
- {allowedModelLines.length > 0 ? (
- <div className="cu-field">
- <label>Per-host model allowlist</label>
- <ul className="cu-llm-policy__summary" style={{ margin: 0 }}>
- {allowedModelLines.map((line, index) => (
- <li key={index} className="cu-field__readonly">
- {line}
- </li>
- ))}
- </ul>
+ </section>
+
+ <section className="cu-card" aria-label="Access summary">
+ <div className="cu-card__body">
+ <p className="cu-host-overview-section-label">Access</p>
+ <div className="cu-host-overview-access">
+ <div className="cu-host-overview-access__tile">
+ <div className="cu-host-overview-access__icon" aria-hidden="true">
+ <UsersIcon />
+ </div>
+ <div>
+ <div className="cu-host-overview-access__value">{accessSummary.memberCount}</div>
+ <div className="cu-host-overview-access__label">
+ {accessSummary.memberCount === 1 ? 'Member' : 'Members'}
+ </div>
+ </div>
+ </div>
+ <div className="cu-host-overview-access__tile">
+ <div className="cu-host-overview-access__icon" aria-hidden="true">
+ <TeamIcon />
+ </div>
+ <div>
+ <div className="cu-host-overview-access__value">{accessSummary.teamCount}</div>
+ <div className="cu-host-overview-access__label">
+ {accessSummary.teamCount === 1 ? 'Team' : 'Teams'}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
- ) : null}
- </SummaryCard>
+ </section>
- <SummaryCard title="Context">
- <div className="cu-field" style={{ marginBottom: hasMcpServers ? undefined : 0 }}>
- <div className="cu-field__readonly">{contextLabel}</div>
- </div>
- {hasContext ? (
- <section className="cu-agent-context-mcp-summary" aria-label="Attached MCP servers">
- <div className="cu-agent-context-mcp-summary__head">
- <span>MCP servers</span>
- <span>{contextMcpServers.length}</span>
+ <section className="cu-card" aria-label="MCP servers">
+ <div className="cu-card__body">
+ <div className="cu-host-overview-mcp__head">
+ <p className="cu-host-overview-section-label" style={{ margin: 0 }}>
+ MCP servers
+ </p>
+ <span className="cu-agent-context-mcp-summary__head" style={{ margin: 0 }}>
+ <span>{contextMcpTotal}</span>
+ </span>
</div>
- {hasMcpServers ? (
- <ul className="cu-agent-context-mcp-summary__list">
+ {contextMcpServers.length > 0 ? (
+ <ul className="cu-host-overview-mcp__list">
{contextMcpServers.map(server => (
- <li key={server} title={server}>
+ <li key={server} className="cu-host-overview-mcp__chip" title={server}>
+ <span className="cu-host-overview-mcp__dot" aria-hidden="true" />
{server}
</li>
))}
</ul>
) : (
- <p className="cu-muted" style={{ margin: 0 }}>
- No MCP servers attached.
+ <p className="cu-muted" style={{ margin: '0.5rem 0 0', fontSize: '0.875rem' }}>
+ {hasContext ? 'No MCP servers attached.' : 'No context selected.'}
</p>
)}
- </section>
- ) : null}
- </SummaryCard>
+ {hasContext ? (
+ <a className="cu-host-overview-mcp__link" href={contextHref}>
+ View all MCP servers
+ <span aria-hidden="true">→</span>
+ </a>
+ ) : null}
+ </div>
+ </section>
+ </div>
</div>
)
}
diff --git a/control-ui/components/HostOverviewTab/types.ts b/control-ui/components/HostOverviewTab/types.ts
index 474d748c2..cd77ce9c9 100644
--- a/control-ui/components/HostOverviewTab/types.ts
+++ b/control-ui/components/HostOverviewTab/types.ts
@@ -1,5 +1,3 @@
-import type { LlmProvider } from '../../lib/llm'
-
export type HostOverviewAccessSummary = {
memberCount: number
teamCount: number
@@ -8,11 +6,17 @@ export type HostOverviewAccessSummary = {
export type HostOverviewTabProps = {
hostName: string
displayName: string
+ statusLabel: string
+ statusTone: 'active' | 'inactive' | 'unknown'
contextRef: string
contextMcpServers: string[]
- provider: LlmProvider
- modelName: string
- fallbackLines: string[]
- allowedModelLines: string[]
+ contextMcpTotal: number
+ contextHref: string
+ modelPrimary: string
+ modelProviderLine: string
+ modelAllowlistLine: string
accessSummary: HostOverviewAccessSummary
+ uid: string
+ createdAt: string
+ lastUpdated: string
}
diff --git a/control-ui/components/LlmModelTable.tsx b/control-ui/components/LlmModelTable.tsx
index b65eb2db4..6ec2ad8de 100644
--- a/control-ui/components/LlmModelTable.tsx
+++ b/control-ui/components/LlmModelTable.tsx
@@ -231,7 +231,6 @@ export function LlmModelTable({
},
{ key: 'enabled', label: 'Enabled', width: '6rem' },
{ key: 'source', label: 'Source', width: '7rem' },
- { key: 'catalogStatus', label: 'Catalog status', width: '8rem' },
{ key: 'actions', width: '5rem', align: 'right', ariaLabel: 'Actions' },
]
@@ -415,16 +414,6 @@ export function LlmModelTable({
{model.source === 'discovery' ? 'Discovered' : 'Manual'}
</span>
</td>
- <td>
- {model.stale === true ? (
- <span
- className="cu-px-badge cu-px-badge--warn"
- title="Missing from the latest live provider catalog. It remains available when enabled until an operator disables or removes it."
- >
- Stale
- </span>
- ) : null}
- </td>
<td className="cu-px-actions">
<RowActionsMenu
ariaLabel={`Actions for model ${model.provider}/${model.model}`}
diff --git a/control-ui/components/__tests__/LlmModelTable.test.tsx b/control-ui/components/__tests__/LlmModelTable.test.tsx
index 34fe79066..8171ad29b 100644
--- a/control-ui/components/__tests__/LlmModelTable.test.tsx
+++ b/control-ui/components/__tests__/LlmModelTable.test.tsx
@@ -47,17 +47,11 @@ describe('LlmModelTable catalog-lifecycle columns', () => {
expect(screen.queryByText('Manual')).not.toBeInTheDocument()
})
- it('shows the Stale badge only when stale is true', () => {
- // 'Stale' is also the column header, so scope the assertion to the badge.
- renderTable([{ ...baseModel, id: 'm-stale', source: 'discovery', stale: true }])
- expandAnthropicModels()
- expect(screen.getByText('Stale', { selector: '.cu-px-badge--warn' })).toBeInTheDocument()
- })
-
- it('omits the Stale badge when stale is false', () => {
- renderTable([baseModel])
+ it('does not render the removed Catalog status column', () => {
+ renderTable([{ ...baseModel, id: 'm-stale', source: 'discovery', stale: true }, baseModel])
expandAnthropicModels()
expect(screen.queryByText('Stale', { selector: '.cu-px-badge--warn' })).toBeNull()
+ expect(screen.queryByRole('columnheader', { name: 'Catalog status' })).toBeNull()
})
it('defaults a legacy row without source/stale to Manual and not stale', () => {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 3ba55bed4..d78e06eee 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.436",
+ "version": "0.1.437",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.436",
+ "version": "0.1.437",
"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 ff6ae447e..40f7fe21e 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.436",
+ "version": "0.1.437",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",