Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(control-ui): refine management surfaces
Miguelon Peluchona8bcbfccbd64
diff --git a/control-ui/app/constants/createFlowLoading.ts b/control-ui/app/constants/createFlowLoading.tsindex a5069cd21..1b0feab5e 100644--- a/control-ui/app/constants/createFlowLoading.ts+++ b/control-ui/app/constants/createFlowLoading.ts@@ -78,8 +78,8 @@ export const CREATE_FLOW_LOADING = {title: 'Install from Marketplace',subtitle: 'Install a Marketplace entry into your cluster and bind it to a context.',backLabel: 'Back to Marketplace',- steps: ['Package', 'Configure', 'Network', 'Install'],- stepFlowClassName: 'cu-create-step-flow--4',+ steps: ['Package', 'Install'],+ stepFlowClassName: 'cu-create-step-flow--2',},installPlugin: {iconKey: 'workflow',diff --git a/control-ui/app/constants/routes.ts b/control-ui/app/constants/routes.tsindex 70bf942d5..ed36e8c04 100644--- a/control-ui/app/constants/routes.ts+++ b/control-ui/app/constants/routes.ts@@ -73,7 +73,6 @@ export const CONTROL_ROUTES = {plugins: '/marketplace/plugins',install: (query?: ControlRouteQuery) => withQuery('/marketplace/install', query),publish: (query?: ControlRouteQuery) => withQuery('/marketplace/publish', query),- keys: '/marketplace/keys',connect: '/marketplace/connect',entry: (name: string, version: string) =>`/marketplace/entries/${segment(name)}/${segment(version)}`,@@ -102,6 +101,7 @@ export const CONTROL_ROUTES = {entries: '/publisher/entries',sharedWithMe: '/publisher/shared-with-me',credentials: '/publisher/credentials',+ apiKeys: '/publisher/api-keys',},secrets: {root: '/secrets',diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex 3f1962a85..68d9dcc12 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -1061,6 +1061,7 @@ body.cu-body {.cu-outputs-content {min-height: 0;+ overflow: auto;}.cu-usage-body {@@ -2260,11 +2261,14 @@ textarea.cu-input {.cu-registry-toolbar .cu-agent-select__button,.cu-registry-toolbar .cu-btn--sm {box-sizing: border-box;- height: 2.125rem;+ height: 38px;+ min-height: 38px;line-height: 1.2;- padding-block: 0;- padding-inline: 0.75rem;+ padding: 0 0.75rem;+ margin: 0;+ border-width: 1px;appearance: none;+ -webkit-appearance: none;}.cu-registry-toolbar .cu-agent-select {@@ -2279,8 +2283,7 @@ textarea.cu-input {}.cu-registry-toolbar .cu-agent-select__button {- padding-block: 0;- padding-inline: 0.75rem;+ padding: 0 0.75rem;text-align: left;overflow: hidden;}@@ -2433,6 +2436,30 @@ textarea.cu-input {align-items: baseline;}+.cu-registry-install-configuration {+ border: 1px solid var(--cu-border);+ border-radius: var(--cu-radius-sm);+ background: var(--cu-bg-elevated);+}++.cu-registry-install-configuration > summary {+ padding: var(--cu-space-3) var(--cu-space-4);+ color: var(--cu-text);+ cursor: pointer;+ font-size: 0.875rem;+ font-weight: 600;+}++.cu-registry-install-configuration[open] > summary {+ border-bottom: 1px solid var(--cu-border-subtle);+}++.cu-registry-install-configuration__body {+ display: grid;+ gap: var(--cu-space-2);+ padding: var(--cu-space-3) var(--cu-space-4);+}+.cu-registry-trust-chip {border-radius: 4px;padding: 1px 6px;@@ -3035,6 +3062,31 @@ textarea.cu-input {color: var(--cu-link);}+.cu-advanced-details {+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius-sm);+ padding: var(--cu-space-3) var(--cu-space-4);+ color: var(--cu-text-soft);+ font-size: 0.8125rem;+}+.cu-advanced-details summary {+ display: inline-flex;+ align-items: center;+ gap: var(--cu-space-2);+ color: var(--cu-text);+ cursor: pointer;+ font-weight: 600;+}+.cu-advanced-details summary::marker {+ content: '';+}+.cu-advanced-details__hint {+ margin: var(--cu-space-2) 0 var(--cu-space-3);+}+.cu-advanced-details > .cu-form-stack {+ margin-top: var(--cu-space-3);+}+.cu-trace-cost-results {display: grid;gap: var(--cu-space-3);@@ -8092,6 +8144,132 @@ textarea.cu-input {flex-wrap: wrap;}+/* Publisher — Grant access dialog */+.cu-modal-panel--share-access {+ width: min(34rem, 96vw);+}++.cu-modal-panel__title-group {+ display: grid;+ gap: 0.2rem;+ min-width: 0;+}++.cu-modal-panel__eyebrow {+ margin: 0;+ font-size: 0.75rem;+ color: var(--cu-text-muted);+ line-height: 1.3;+ overflow-wrap: anywhere;+}++.cu-modal-panel__eyebrow code {+ color: var(--cu-text);+ font-family:+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',+ monospace;+}++.cu-share-access-form {+ display: grid;+ gap: var(--cu-space-1);+}++.cu-share-access-form__row {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ align-items: stretch;+ gap: var(--cu-space-2);+}++.cu-share-access-form__row .cu-input {+ min-width: 0;+}++.cu-share-access-form__row .cu-btn {+ align-self: stretch;+}++.cu-share-access-list {+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius-sm);+ background: var(--cu-bg-elevated);+ padding: var(--cu-space-3);+}++.cu-share-access-list__head {+ display: flex;+ align-items: baseline;+ justify-content: space-between;+ gap: var(--cu-space-2);+ margin-bottom: var(--cu-space-2);+}++.cu-share-access-list__title {+ font-size: 0.75rem;+ font-weight: 500;+ color: var(--cu-text-muted);+ text-transform: uppercase;+ letter-spacing: 0.04em;+}++.cu-share-access-list__count {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ min-width: 1.5rem;+ padding: 0.1rem 0.5rem;+ border-radius: 999px;+ background: var(--cu-surface);+ border: 1px solid var(--cu-border-subtle);+ color: var(--cu-text-muted);+ font-size: 0.75rem;+ font-variant-numeric: tabular-nums;+}++.cu-grant-list {+ list-style: none;+ margin: 0;+ padding: 0;+ display: grid;+ gap: 0;+ border-radius: var(--cu-radius-sm);+ border: 1px solid var(--cu-border-subtle);+ background: var(--cu-surface);+ overflow: hidden;+}++.cu-grant-list__row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--cu-space-3);+ padding: 0.6rem 0.85rem;+ font-size: 0.875rem;+ background: transparent;+ transition: background var(--cu-control-transition);+}++.cu-grant-list__row + .cu-grant-list__row {+ border-top: 1px solid var(--cu-border-subtle);+}++.cu-grant-list__row:hover:not(:has(button:disabled)) {+ background: var(--cu-surface-hover);+}++.cu-grant-list__org {+ min-width: 0;+ color: var(--cu-text);+ overflow-wrap: anywhere;+}++.cu-grant-list__org code {+ font-family:+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',+ monospace;+}+/* Scope fieldset used in CreateApiKeyModal */.cu-scope-fieldset {border: 0;@@ -8778,11 +8956,13 @@ textarea.cu-input {.cu-app-layout .cu-main:has(> .cu-card--viewport-fill),.cu-app-layout .cu-main:has(> .cu-registry-layout),.cu-app-layout .cu-main:has(> .cu-cost-layout),-.cu-app-layout .cu-main:has(> .cu-llm-models-layout) {+.cu-app-layout .cu-main:has(> .cu-llm-models-layout),+.cu-app-layout .cu-main:has(> .cu-gfs) {padding-bottom: 0;}-.cu-app-layout .cu-main:has(> .cu-card--viewport-fill) {+.cu-app-layout .cu-main:has(> .cu-card--viewport-fill),+.cu-app-layout .cu-main:has(> .cu-gfs) {display: flex;flex-direction: column;height: 100vh;@@ -9183,36 +9363,12 @@ textarea.cu-input {}.cu-llm-models-layout > .cu-section-card {- flex: 0 0 auto;+ flex: 1;+ min-height: 0;margin-bottom: 0;}-.cu-llm-models-lifecycle {- display: flex;- flex: 0 0 auto;- align-items: center;- flex-wrap: wrap;- gap: var(--cu-space-3);- padding: var(--cu-space-3) var(--cu-space-4);- border: 1px solid var(--cu-border-subtle);- border-radius: var(--cu-radius);- background: var(--cu-bg-elevated);- color: var(--cu-text-soft);- font-size: 0.8125rem;-}--.cu-llm-models-lifecycle > strong {- color: var(--cu-text);-}--.cu-llm-models-lifecycle__item {- display: inline-flex;- align-items: center;- gap: var(--cu-space-2);-}--.cu-llm-review-table,-.cu-llm-stale-table {+.cu-llm-review-table {min-width: 48rem;table-layout: fixed;}@@ -10025,26 +10181,18 @@ button.cu-gfs-tree__button:focus-visible,}}-/* GFS single-surface browser + resource manager */-.cu-app-layout .cu-main:has(> .cu-gfs) {- padding-bottom: 0;-}-+/* GFS browser + resource manager */.cu-gfs {display: flex;- min-height: 100vh;+ min-height: 0;flex-direction: column;+ flex: 1 1 auto;}.cu-gfs-card.cu-card {position: relative;min-height: 0;flex: 1 1 auto;- border: 0;- border-radius: 0;- background: transparent;- box-shadow: none;- overflow: visible;}.cu-gfs-drop-overlay {@@ -10064,13 +10212,6 @@ button.cu-gfs-tree__button:focus-visible,pointer-events: none;}-.cu-gfs-card > .cu-table-panel__head {- position: static;- padding: var(--cu-space-3) var(--cu-space-4);- border-bottom: 0;- background: transparent;-}-.cu-gfs-panel {display: grid;min-height: 0;@@ -10106,7 +10247,7 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-create-action.cu-btn {- min-height: 2.65rem;+ min-height: 2.125rem;padding-inline: var(--cu-space-4);border-radius: var(--cu-radius-sm);font-size: 0.875rem;@@ -10130,11 +10271,13 @@ button.cu-gfs-tree__button:focus-visible,align-items: center;gap: var(--cu-space-1);min-width: 0;+ min-height: 2.125rem;flex-wrap: nowrap;overflow-x: auto;- border: 0;- padding: 0;- background: transparent;+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius-sm);+ padding: 0.1875rem;+ background: var(--cu-bg-elevated);scrollbar-width: thin;}@@ -10152,6 +10295,10 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-breadcrumb__button {+ display: inline-flex;+ align-items: center;+ gap: var(--cu-space-1);+ min-height: 1.625rem;max-width: 15rem;overflow: hidden;border: 0;@@ -10159,7 +10306,7 @@ button.cu-gfs-tree__button:focus-visible,padding: var(--cu-space-1) var(--cu-space-2);background: transparent;color: var(--cu-text);- font-size: 1rem;+ font-size: 0.875rem;font-weight: 600;font-family: inherit;text-overflow: ellipsis;@@ -10174,10 +10321,31 @@ button.cu-gfs-tree__button:focus-visible,}.cu-gfs-breadcrumb__button[aria-current='page'] {+ background: rgba(var(--cu-accent-rgb), 0.1);color: var(--cu-text);cursor: default;}+.cu-gfs-breadcrumb__drive-icon {+ width: 0.95rem;+ height: 0.95rem;+ flex: 0 0 auto;+ color: var(--cu-accent);+}++.cu-gfs-breadcrumb__drive-icon svg {+ width: 100%;+ height: 100%;+}++.cu-gfs-breadcrumb__drive-label {+ color: var(--cu-text-muted);+ font-size: 0.625rem;+ font-weight: 700;+ letter-spacing: 0.06em;+ text-transform: uppercase;+}+.cu-gfs-list-frame {--cu-gfs-list-columns: 2.25rem minmax(12rem, 1fr) minmax(5rem, 0.28fr) minmax(6rem, 0.32fr) 5rem;@@ -10256,7 +10424,7 @@ button.cu-gfs-tree__button:focus-visible,padding-inline: calc(var(--cu-space-3) + var(--cu-space-2));border-bottom: 1px solid var(--cu-border-subtle);border-radius: var(--cu-radius-sm) var(--cu-radius-sm) 0 0;- background: rgba(var(--cu-edge-rgb), 0.1);+ background: var(--cu-surface-hover);color: var(--cu-text-muted);font-size: 0.7rem;font-weight: 700;@@ -10957,6 +11125,7 @@ button.cu-gfs-tree__button:focus-visible,min-height: 2.375rem;display: flex;align-items: center;+ justify-content: flex-start;gap: var(--cu-space-2);padding: var(--cu-space-2);border: 0;diff --git a/control-ui/app/llm-models/discovery/page.tsx b/control-ui/app/llm-models/discovery/page.tsxindex 78b1e8fb6..893edbcdc 100644--- a/control-ui/app/llm-models/discovery/page.tsx+++ b/control-ui/app/llm-models/discovery/page.tsx@@ -1,6 +1,5 @@-import { redirect } from 'next/navigation'-import { CONTROL_ROUTES } from '@constants/routes'+import { LlmModelsSurface } from '@components/LlmModelsSurface'export default function LlmModelsDiscoveryPage() {- redirect(CONTROL_ROUTES.llmModels.root)+ return <LlmModelsSurface activeTab="discovery" />}diff --git a/control-ui/app/llm-models/page.tsx b/control-ui/app/llm-models/page.tsxindex 78b2f8230..0fc2b61bc 100644--- a/control-ui/app/llm-models/page.tsx+++ b/control-ui/app/llm-models/page.tsx@@ -1,157 +1,5 @@-'use client'--import React, { useEffect, useMemo, useState } from 'react'-import { useRouter } from 'next/navigation'-import { useAuth } from '@components/AuthContext'-import { AuthGate } from '@components/AuthGate'-import { useConfirmDialog } from '@components/ConfirmDialog'-import { DashboardLayout } from '@components/DashboardLayout'-import { LlmDiscoveryPanel } from '@components/LlmDiscoveryPanel'-import { LlmModelTable } from '@components/LlmModelTable'-import { useToast } from '@components/Toast'-import { CONTROL_ROUTES } from '@constants/routes'-import {- type LlmAllowedModel,- type UnpricedModel,- deleteLlmModel,- getLlmModels,- getUnpricedModels,- isLlmModelConfigMapDeferred,- isSilentApiError,-} from '@lib/api'-import { getProviderDisplayLabel } from '@lib/llm'-import { buildUnpricedKeys } from '@lib/llmModelUnpriced'--// Warning surfaced when a mutation persisted but the runtime ConfigMap write is-// delayed (503 configmap_write_failed, spec §3-R3.4): the change is saved.-const CONFIGMAP_DEFERRED_WARNING =- 'Saved. Propagation to the cluster is delayed and will reconcile shortly.'--function LlmModelsContent() {- const { authState } = useAuth()- const router = useRouter()- const { showToast } = useToast()- const { confirm, confirmDialog } = useConfirmDialog()-- const [models, setModels] = useState<LlmAllowedModel[]>([])- const [unpriced, setUnpriced] = useState<UnpricedModel[]>([])- const [loading, setLoading] = useState(false)- const [error, setError] = useState('')- const [deletingId, setDeletingId] = useState<string | null>(null)-- const unpricedKeys = useMemo(() => buildUnpricedKeys(unpriced), [unpriced])-- async function loadAll() {- setLoading(true)- setError('')- try {- // Unpriced surfacing is best-effort: a failure there must not hide models.- const [modelsResult, unpricedResult] = await Promise.allSettled([- getLlmModels(),- getUnpricedModels(),- ])- if (modelsResult.status === 'fulfilled') {- setModels(modelsResult.value.rows ?? [])- } else if (!isSilentApiError(modelsResult.reason)) {- throw modelsResult.reason- }- if (unpricedResult.status === 'fulfilled') {- setUnpriced(unpricedResult.value.rows ?? [])- } else {- setUnpriced([])- }- } catch (e) {- if (isSilentApiError(e)) return- setError(e instanceof Error ? e.message : 'Failed to load allowed models')- } finally {- setLoading(false)- }- }-- async function handleDelete(model: LlmAllowedModel) {- const label = `${getProviderDisplayLabel(model.provider)}/${model.model}`- const shouldDelete = await confirm({- title: 'Delete model',- message: `Remove ${label} from the allowlist? Existing agents keep running, but this model can no longer be selected.`,- confirmLabel: 'Delete',- tone: 'danger',- })- if (!shouldDelete) return- setDeletingId(model.id)- setError('')- try {- await deleteLlmModel(model.id)- await loadAll()- showToast(`${label} removed from the allowlist.`, { tone: 'success' })- } catch (e) {- if (isSilentApiError(e)) return- // The row was deleted; only ConfigMap propagation is delayed.- if (isLlmModelConfigMapDeferred(e)) {- await loadAll()- showToast(`${label} removed. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })- return- }- setError(e instanceof Error ? e.message : `Failed to delete ${label}`)- } finally {- setDeletingId(null)- }- }-- useEffect(() => {- if (authState.isLoggedIn && !authState.isLoading) {- void loadAll()- }- }, [authState.isLoggedIn, authState.isLoading])-- return (- <div className="cu-llm-models-layout">- {error ? (- <div className="cu-banner cu-banner--error" role="alert">- {error}- </div>- ) : null}- <section className="cu-llm-models-lifecycle" aria-label="Model lifecycle">- <strong>One inventory, explicit provenance and lifecycle</strong>- <span className="cu-llm-models-lifecycle__item">- <span className="cu-px-badge cu-px-badge--off">Manual</span>- Added and maintained by an operator- </span>- <span className="cu-llm-models-lifecycle__item">- <span className="cu-px-badge cu-px-badge--info">Discovered</span>- Synced into review and disabled by default- </span>- <span className="cu-llm-models-lifecycle__item">- <span className="cu-px-badge cu-px-badge--warn">Stale</span>- Missing from the latest live catalog, never auto-removed- </span>- </section>- <LlmModelTable- items={models}- unpricedKeys={unpricedKeys}- onCreate={() => router.push(CONTROL_ROUTES.llmModels.new)}- onEdit={id => router.push(CONTROL_ROUTES.llmModels.edit(id))}- onDelete={handleDelete}- onRefresh={loadAll}- deletingId={deletingId}- refreshing={loading}- loading={loading && models.length === 0}- />- <LlmDiscoveryPanel- items={models}- loading={loading && models.length === 0}- onRefresh={loadAll}- />- {confirmDialog}- </div>- )-}+import { LlmModelsSurface } from '@components/LlmModelsSurface'export default function LlmModelsPage() {- return (- <AuthGate>- <DashboardLayout>- <LlmModelsContent />- </DashboardLayout>- </AuthGate>- )+ return <LlmModelsSurface activeTab="catalog" />}diff --git a/control-ui/app/publisher/api-keys/page.tsx b/control-ui/app/publisher/api-keys/page.tsxnew file mode 100644index 000000000..f79943129--- /dev/null+++ b/control-ui/app/publisher/api-keys/page.tsx@@ -0,0 +1,5 @@+import { PublisherPageContent } from '../PublisherPageContent'++export default function PublisherApiKeysPage() {+ return <PublisherPageContent activeTab="api-keys" />+}diff --git a/control-ui/app/registry/keys/page.tsx b/control-ui/app/registry/keys/page.tsxindex 49dc593f2..93c1cd0c1 100644--- a/control-ui/app/registry/keys/page.tsx+++ b/control-ui/app/registry/keys/page.tsx@@ -1,16 +1,6 @@-'use client'--import React from 'react'-import { AuthGate } from '@components/AuthGate'-import { DashboardLayout } from '@components/DashboardLayout'-import RegistryApiKeysPanel from '@components/RegistryApiKeysPanel'+import { redirect } from 'next/navigation'+import { CONTROL_ROUTES } from '@constants/routes'export default function RegistryKeysPage() {- return (- <AuthGate>- <DashboardLayout isDetailPage>- <RegistryApiKeysPanel />- </DashboardLayout>- </AuthGate>- )+ redirect(CONTROL_ROUTES.publisher.apiKeys)}diff --git a/control-ui/components/CreateMcpServerForm/index.tsx b/control-ui/components/CreateMcpServerForm/index.tsxindex e2212e918..89329fa10 100644--- a/control-ui/components/CreateMcpServerForm/index.tsx+++ b/control-ui/components/CreateMcpServerForm/index.tsx@@ -22,7 +22,7 @@ import { EgressEditor } from '../EgressEditor'import { MCP_SERVER_NAME_PATTERN, TRANSPORT_TYPES } from './constants'import type { CreateMcpServerFormProps, TransportType } from './types'-const STEPS = ['Connector', 'Runtime', 'Network', 'Secrets'] as const+const STEPS = ['Connector', 'Secrets'] as constconst STEP_DETAILS = [{@@ -30,16 +30,6 @@ const STEP_DETAILS = [title: 'Connector identity',subtitle: 'Register the connector name, image, and Context allowlist target.',},- {- description: 'Transport and process',- title: 'Runtime settings',- subtitle: 'Configure transport, managed deployment behavior, and command overrides.',- },- {- description: 'External access rules',- title: 'Network egress',- subtitle: 'Declare any outbound network access this connector requires.',- },{description: 'Environment and credentials',title: 'Secrets and environment',@@ -104,7 +94,8 @@ export function CreateMcpServerForm({const nameValid = MCP_SERVER_NAME_PATTERN.test(name) && name.length <= 63const egressValid = !egressStatus || egressStatus.errors.length === 0const canSubmit = Boolean(name && image && contextRef) && nameValid && egressValid && !submitting- const canContinue = step === 0 ? Boolean(name && image && contextRef && nameValid) : egressValid+ const canContinue =+ step === 0 ? Boolean(name && image && contextRef && nameValid) && egressValid : egressValidconst contextOptions = useMemo(() => contexts.map(context => ({ value: context.name, label: context.name })),[contexts]@@ -142,7 +133,6 @@ export function CreateMcpServerForm({function canSelectStep(targetStep: number) {if (targetStep <= step) return true- if (targetStep === 1) return Boolean(name && image && contextRef && nameValid)return Boolean(name && image && contextRef && nameValid && egressValid)}@@ -372,7 +362,7 @@ export function CreateMcpServerForm({<form onSubmit={handleSubmit}><CreateStepFlowariaLabel="Create connector steps"- className="cu-create-step-flow--4"+ className="cu-create-step-flow--2"currentStep={step}onStepChange={setStep}canSelectStep={canSelectStep}@@ -448,101 +438,105 @@ export function CreateMcpServerForm({value={description}/></Field>- </div>- ) : null}- {step === 1 ? (- <div className="cu-form-stack cu-agent-form-stack">- <div className="cu-form-grid cu-form-grid--2">- <Field label="Transport Type">- <SelectInput- onChange={event => setTransportType(event.target.value as TransportType)}- disabled={submitting}- value={transportType}+ <details className="cu-advanced-details">+ <summary>Advanced options</summary>+ <p className="cu-advanced-details__hint">+ Runtime, container overrides, and network egress. The defaults work for most+ connectors.+ </p>+ <div className="cu-form-stack cu-agent-form-stack">+ <div className="cu-form-grid cu-form-grid--2">+ <Field label="Transport Type">+ <SelectInput+ onChange={event => setTransportType(event.target.value as TransportType)}+ disabled={submitting}+ value={transportType}+ >+ {TRANSPORT_TYPES.map(option => (+ <option key={option.value} value={option.value}>+ {option.label}+ </option>+ ))}+ </SelectInput>+ </Field>++ {transportType !== 'stdio' ? (+ <Field description="Port the connector listens on." label="Port">+ <TextInput+ narrow+ onChange={event => setPort(parseInt(event.target.value, 10) || 3000)}+ type="number"+ disabled={submitting}+ value={port}+ />+ </Field>+ ) : null}+ </div>++ <Field+ description={+ <>+ <strong>Managed:</strong> Evenfire creates the Deployment, Service, and+ NetworkPolicies. <strong>Not managed:</strong> you deploy the pod yourself+ and Evenfire only registers it for discovery.+ </>+ }+ label="Managed">- {TRANSPORT_TYPES.map(option => (- <option key={option.value} value={option.value}>- {option.label}- </option>- ))}- </SelectInput>- </Field>-- {transportType !== 'stdio' ? (- <Field description="Port the connector listens on." label="Port">- <TextInput- narrow- onChange={event => setPort(parseInt(event.target.value, 10) || 3000)}- type="number"+ <SelectInput+ onChange={event => setManaged(event.target.value === 'true')}disabled={submitting}- value={port}- />+ value={managed ? 'true' : 'false'}+ >+ <option value="true">+ Yes — Evenfire creates and manages the Deployment, Service, and+ NetworkPolicies+ </option>+ <option value="false">No — I will deploy the pod myself (discovery only)</option>+ </SelectInput></Field>- ) : null}- </div>- <Field- description={- <>- <strong>Managed:</strong> Evenfire creates the Deployment, Service, and- NetworkPolicies. <strong>Not managed:</strong> you deploy the pod yourself and- Evenfire only registers it for discovery.- </>- }- label="Managed"- >- <SelectInput- onChange={event => setManaged(event.target.value === 'true')}- disabled={submitting}- value={managed ? 'true' : 'false'}- >- <option value="true">- Yes — Evenfire creates and manages the Deployment, Service, and NetworkPolicies- </option>- <option value="false">No — I will deploy the pod myself (discovery only)</option>- </SelectInput>- </Field>+ <FormSection+ description="Optional container entrypoint and command overrides."+ title="Container Overrides"+ >+ <Field+ description='Comma-separated values, for example "node, server.js".'+ label="Command"+ >+ <TextInput+ monospace+ onChange={event => setCommand(event.target.value)}+ placeholder="node, server.js"+ disabled={submitting}+ value={command}+ />+ </Field>- <FormSection- description="Optional container entrypoint and command overrides."- title="Container Overrides"- >- <Field- description='Comma-separated values, for example "node, server.js".'- label="Command"- >- <TextInput- monospace- onChange={event => setCommand(event.target.value)}- placeholder="node, server.js"- disabled={submitting}- value={command}- />- </Field>-- <Field- description='Comma-separated values, for example "--port, 3000, --headless".'- label="Args"- >- <TextInput- monospace- onChange={event => setArgs(event.target.value)}- placeholder="--port, 3000, --headless"- disabled={submitting}- value={args}- />- </Field>- </FormSection>- </div>- ) : null}+ <Field+ description='Comma-separated values, for example "--port, 3000, --headless".'+ label="Args"+ >+ <TextInput+ monospace+ onChange={event => setArgs(event.target.value)}+ placeholder="--port, 3000, --headless"+ disabled={submitting}+ value={args}+ />+ </Field>+ </FormSection>- {step === 2 ? (- <div className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide">- <EgressEditor allowCidr onChange={handleEgressChange} />+ <div className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide">+ <EgressEditor allowCidr onChange={handleEgressChange} />+ </div>+ </div>+ </details></div>) : null}- {step === 3 ? (+ {step === 1 ? (<div className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide"><FormSectiondescription="Additional environment variables injected into the container."diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsxindex eea6cb2b1..2fe5ea3bf 100644--- a/control-ui/components/GfsBrowser.tsx+++ b/control-ui/components/GfsBrowser.tsx@@ -111,7 +111,6 @@ export function GfsBrowser(): React.JSX.Element {const [renameName, setRenameName] = useState('')const [deleteOpen, setDeleteOpen] = useState(false)const manageUploadInputRef = useRef<HTMLInputElement | null>(null)- const manageReplaceInputRef = useRef<HTMLInputElement | null>(null)// New-folder dialog (replaces the native window.prompt flow).const [newFolderOpen, setNewFolderOpen] = useState(false)const [creatingFolder, setCreatingFolder] = useState(false)@@ -493,12 +492,24 @@ export function GfsBrowser(): React.JSX.Element {<span className="cu-gfs-breadcrumb__item" key={`${crumb.id ?? 'root'}-${index}`}>{index > 0 ? <IconChevronRight width={14} height={14} /> : null}<button- className="cu-gfs-breadcrumb__button"+ className={`cu-gfs-breadcrumb__button${+ crumb.name === '/' ? ' cu-gfs-breadcrumb__button--root' : ''+ }`}type="button"onClick={() => goToCrumb(index)}aria-current={index === crumbs.length - 1 ? 'page' : undefined}>- {crumb.name === '/' ? DRIVE : crumb.name}+ {crumb.name === '/' ? (+ <>+ <span className="cu-gfs-breadcrumb__drive-icon" aria-hidden="true">+ <IconFolder />+ </span>+ <span className="cu-gfs-breadcrumb__drive-label">Drive</span>+ <span>{DRIVE}</span>+ </>+ ) : (+ crumb.name+ )}</button></span>))}@@ -717,6 +728,11 @@ export function GfsBrowser(): React.JSX.Element {setRenameOpen(true)setDeleteOpen(false)}}+ onReplace={+ selected.kind !== 'directory'+ ? file => void replaceFile(selected, file)+ : undefined+ }onDelete={() => {setDeleteOpen(true)setRenameOpen(false)@@ -730,11 +746,7 @@ export function GfsBrowser(): React.JSX.Element {<Button size="sm" onClick={() => manageUploadInputRef.current?.click()}>Upload file</Button>- ) : (- <Button size="sm" onClick={() => manageReplaceInputRef.current?.click()}>- Replace file- </Button>- )}+ ) : null}<ButtonautoFocusclassName="cu-gfs-manage-dialog__close"@@ -759,19 +771,7 @@ export function GfsBrowser(): React.JSX.Element {void uploadFileToFolder(selected, file)}}/>- ) : (- <input- aria-label={`Replace ${selected.name}`}- className="sr-only"- ref={manageReplaceInputRef}- type="file"- onChange={event => {- const file = event.currentTarget.files?.[0]- event.currentTarget.value = ''- void replaceFile(selected, file)- }}- />- )}+ ) : null}<div className="cu-gfs-manage-dialog__body"><section className="cu-gfs-manage-section cu-gfs-manage-section--access">diff --git a/control-ui/components/GfsGrantPanel.tsx b/control-ui/components/GfsGrantPanel.tsxindex ddb2cc7a5..dde146a69 100644--- a/control-ui/components/GfsGrantPanel.tsx+++ b/control-ui/components/GfsGrantPanel.tsx@@ -30,7 +30,6 @@ import {import type { GfsExistingAccessItem, GfsGrantPanelProps } from './GfsGrantPanel.types'import {buildGfsBulkSubjectOptions,- summarizeGfsBulkSubjectTypes,toGfsBulkSubjectInputs,} from './gfsGrantSubjectOptions'@@ -214,27 +213,12 @@ export function GfsGrantPanel({ resource }: GfsGrantPanelProps): React.JSX.ElemesetSelectedValues(bulkValues)}- function confirmationMessage(kind: 'grant' | 'share'): string {- const action = kind === 'grant' ? 'Grant' : 'Share with'- const recipients = operatorSelected- ? '1 operator'- : `${selectedSubjects.length} subjects (${summarizeGfsBulkSubjectTypes(selectedSubjects)})`- const scope = includeDescendants ? 'resource and descendants' : 'resource only'- return `${action} ${recipients} [${bits.join(', ')}] on "${resource.name}". Scope: ${scope}.`- }-async function submit(kind: 'grant' | 'share') {setError('')if (!subjectValid || bits.length === 0) {setError('subject_and_permissions_required')return}- const confirmed = await confirm({- title: kind === 'grant' ? 'Grant access?' : 'Create share?',- message: confirmationMessage(kind),- confirmLabel: kind === 'grant' ? 'Grant' : 'Create share',- })- if (!confirmed) returnsetBusy(true)try {if (operatorSelected) {diff --git a/control-ui/components/LlmDiscoveryPanel/index.tsx b/control-ui/components/LlmDiscoveryPanel/index.tsxindex e4ff4e83a..d609163a4 100644--- a/control-ui/components/LlmDiscoveryPanel/index.tsx+++ b/control-ui/components/LlmDiscoveryPanel/index.tsx@@ -1,7 +1,6 @@'use client'import React, { useEffect, useMemo, useState } from 'react'-import { useConfirmDialog } from '@components/ConfirmDialog'import { LlmProviderIcon } from '@components/LlmProviderIcon'import { IconModels } from '@components/Sidebar/icons'import { SkeletonTableRows } from '@components/SkeletonTableRows'@@ -9,11 +8,10 @@ import { TableHeaderRow } from '@components/TableHeaderRow'import type { TableHeaderColumn } from '@components/TableHeaderRow/types'import { TablePanelHeader } from '@components/TablePanelHeader'import { useToast } from '@components/Toast'-import { IconChevronRight, IconRefresh, IconTrash } from '@components/icons'+import { IconChevronRight, IconRefresh } from '@components/icons'import {type LlmAllowedModel,type LlmDiscoveryStatus,- deleteLlmModel,getDiscoveryStatus,isLlmModelConfigMapDeferred,isSilentApiError,@@ -33,24 +31,14 @@ const REVIEW_COLUMNS: TableHeaderColumn[] = [{ key: 'actions', width: '7rem', align: 'right', ariaLabel: 'Actions' },]-const STALE_COLUMNS: TableHeaderColumn[] = [- { key: 'model', label: 'Model', minWidth: '12rem' },- { key: 'vendor', label: 'Vendor', width: '10rem' },- { key: 'contextWindow', label: 'Context window', align: 'right', width: '9rem' },- { key: 'status', label: 'Runtime status', width: '9rem' },- { key: 'actions', width: '11rem', align: 'right', ariaLabel: 'Actions' },-]-type ProviderModelGroup = [provider: string, models: LlmAllowedModel[]]type ProviderGroupRowProps = {- actionLabel: stringcolSpan: numberexpanded: booleanmodels: LlmAllowedModel[]onToggle: () => voidprovider: string- summary: string}function modelLabel(model: LlmAllowedModel): string {@@ -76,13 +64,11 @@ function groupByProvider(models: LlmAllowedModel[]): ProviderModelGroup[] {}function ProviderGroupRow({- actionLabel,colSpan,expanded,models,onToggle,provider,- summary,}: ProviderGroupRowProps) {const providerLabel = getProviderDisplayLabel(provider)return (@@ -93,7 +79,7 @@ function ProviderGroupRow({className="cu-llm-model-group__toggle"onClick={onToggle}aria-expanded={expanded}- aria-label={`${expanded ? 'Collapse' : 'Expand'} ${providerLabel} ${actionLabel}`}+ aria-label={`${expanded ? 'Collapse' : 'Expand'} ${providerLabel} review models`}><span className="cu-llm-model-group__chevron" aria-hidden="true"><IconChevronRight@@ -107,7 +93,7 @@ function ProviderGroupRow({<span className="cu-llm-model-group__count">{models.length} model{models.length === 1 ? '' : 's'}</span>- <span className="cu-llm-model-group__summary">{summary}</span>+ <span className="cu-llm-model-group__summary">Awaiting operator enablement</span><span className="cu-llm-model-group__action" aria-hidden="true">{expanded ? 'Hide models' : 'Show models'}</span>@@ -117,12 +103,13 @@ function ProviderGroupRow({)}-// Discovery and Catalog are two workflows over the same llm_allowed_models-// records. The parent owns that shared inventory; this panel owns only sync,-// review selection, and stale-model actions.-export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPanelProps) {+export function LlmDiscoveryPanel({+ items,+ loading,+ navigation,+ onRefresh,+}: LlmDiscoveryPanelProps) {const { showToast } = useToast()- const { confirm, confirmDialog } = useConfirmDialog()const [status, setStatus] = useState<LlmDiscoveryStatus | null>(null)const [statusLoading, setStatusLoading] = useState(false)@@ -131,20 +118,14 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPanconst [pendingId, setPendingId] = useState<string | null>(null)const [bulkEnabling, setBulkEnabling] = useState(false)const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())- const [expandedReviewProviders, setExpandedReviewProviders] = useState<Set<string>>(new Set())- const [expandedStaleProviders, setExpandedStaleProviders] = useState<Set<string>>(new Set())+ const [expandedProviders, setExpandedProviders] = useState<Set<string>>(new Set())const isInitialLoad = loading && items.length === 0const reviewQueue = useMemo(() => items.filter(model => model.source === 'discovery' && !model.enabled && !model.stale),[items])- const staleModels = useMemo(- () => items.filter(model => model.source === 'discovery' && model.stale),- [items]- )const reviewGroups = useMemo(() => groupByProvider(reviewQueue), [reviewQueue])- const staleGroups = useMemo(() => groupByProvider(staleModels), [staleModels])const selectedCount = useMemo(() => reviewQueue.reduce((count, model) => (selectedIds.has(model.id) ? count + 1 : count), 0),@@ -196,11 +177,8 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan})}- function toggleProvider(- provider: string,- setExpanded: React.Dispatch<React.SetStateAction<Set<string>>>- ) {- setExpanded(previous => {+ function toggleProvider(provider: string) {+ setExpandedProviders(previous => {const next = new Set(previous)if (next.has(provider)) next.delete(provider)else next.add(provider)@@ -311,60 +289,6 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPanshowToast(message, { tone: 'error' })}- async function handleDisable(model: LlmAllowedModel) {- const label = modelLabel(model)- setPendingId(model.id)- setError('')- try {- await updateLlmModel(model.id, { enabled: false })- await onRefresh()- showToast(`${label} disabled.`, { tone: 'success' })- } catch (caught) {- if (isSilentApiError(caught)) return- if (isLlmModelConfigMapDeferred(caught)) {- await onRefresh()- showToast(`${label} disabled. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })- return- }- const message = caught instanceof Error ? caught.message : `Failed to disable ${label}`- setError(message)- showToast(message, { tone: 'error' })- } finally {- setPendingId(null)- }- }-- async function handleDelete(model: LlmAllowedModel) {- const label = modelLabel(model)- const shouldDelete = await confirm({- title: 'Delete stale model',- message: `Remove ${label} from the inventory? It already vanished from the provider catalog. Existing agents keep running, but it can no longer be selected.`,- confirmLabel: 'Delete',- tone: 'danger',- })- if (!shouldDelete) return-- setPendingId(model.id)- setError('')- try {- await deleteLlmModel(model.id)- await onRefresh()- showToast(`${label} removed from the inventory.`, { tone: 'success' })- } catch (caught) {- if (isSilentApiError(caught)) return- if (isLlmModelConfigMapDeferred(caught)) {- await onRefresh()- showToast(`${label} removed. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })- return- }- const message = caught instanceof Error ? caught.message : `Failed to delete ${label}`- setError(message)- showToast(message, { tone: 'error' })- } finally {- setPendingId(null)- }- }-const reviewColumns: TableHeaderColumn[] = [{key: 'select',@@ -393,7 +317,7 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan</div>) : null}- <div className="cu-card cu-section-card">+ <div className="cu-card cu-card--viewport-fill cu-section-card"><TablePanelHeadertitle={<>@@ -401,7 +325,7 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan{isInitialLoad ? 'Discovery review' : `Discovery review (${reviewQueue.length})`}</>}- subtitle="Newly synced models land here disabled. Enabling one makes the same inventory row available to agents and runtime."+ subtitle="Newly synced models land here disabled. Enable only the models you want available to agents and runtime."actions={<><button@@ -428,6 +352,7 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan</>}/>+ {navigation}<div className="cu-discovery-status" role="status"><span>@@ -487,17 +412,15 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan<TableHeaderRow columns={reviewColumns} /></thead>{reviewGroups.map(([provider, models]) => {- const expanded = expandedReviewProviders.has(provider)+ const expanded = expandedProviders.has(provider)return (<tbody key={provider} className="cu-llm-model-group"><ProviderGroupRow- actionLabel="review models"colSpan={reviewColumns.length}expanded={expanded}models={models}- onToggle={() => toggleProvider(provider, setExpandedReviewProviders)}+ onToggle={() => toggleProvider(provider)}provider={provider}- summary="Awaiting operator enablement"/>{expanded? models.map(model => (@@ -536,114 +459,6 @@ export function LlmDiscoveryPanel({ items, loading, onRefresh }: LlmDiscoveryPan</div>)}</div>-- <div className="cu-card cu-section-card">- <TablePanelHeader- title={- <>- <IconModels />- {isInitialLoad ? 'Stale models' : `Stale models (${staleModels.length})`}- </>- }- subtitle="Rows missing from the latest live provider catalog stay in the inventory and are never auto-disabled or auto-removed."- />- {staleModels.length > 0 ? (- <div className="cu-px-unpriced-slot">- <div className="cu-banner cu-banner--warning" role="status">- A stale model that is still <strong>enabled</strong> remains <strong>served</strong>{' '}- at runtime. Disable it to stop serving it, or delete it to remove it from the- inventory.- </div>- </div>- ) : null}- {isInitialLoad ? (- <div className="cu-table-wrap cu-table-wrap--sticky-header">- <table className="cu-table cu-table--header-band">- <thead>- <TableHeaderRow columns={STALE_COLUMNS} />- </thead>- <tbody>- <SkeletonTableRows columns={STALE_COLUMNS.length} rows={3} />- </tbody>- </table>- </div>- ) : staleModels.length === 0 ? (- <div className="cu-empty">- No stale models. Every discovered row was present in the latest live sync.- </div>- ) : (- <div className="cu-table-wrap cu-table-wrap--sticky-header">- <table className="cu-table cu-table--header-band cu-llm-stale-table">- <thead>- <TableHeaderRow columns={STALE_COLUMNS} />- </thead>- {staleGroups.map(([provider, models]) => {- const expanded = expandedStaleProviders.has(provider)- const servedCount = models.filter(model => model.enabled).length- return (- <tbody key={provider} className="cu-llm-model-group">- <ProviderGroupRow- actionLabel="stale models"- colSpan={STALE_COLUMNS.length}- expanded={expanded}- models={models}- onToggle={() => toggleProvider(provider, setExpandedStaleProviders)}- provider={provider}- summary={`${servedCount} still served`}- />- {expanded- ? models.map(model => (- <tr key={model.id} className="cu-table__row cu-llm-model-row">- <td className="cu-px-model">{model.model}</td>- <td>{model.vendor || '—'}</td>- <td className="cu-px-num">- {formatContextWindow(model.context_window_tokens)}- </td>- <td>- {model.enabled ? (- <span- className="cu-px-badge cu-px-badge--warn"- title="Enabled and still served at runtime despite being stale."- >- Enabled · served- </span>- ) : (- <span className="cu-px-badge cu-px-badge--off">Disabled</span>- )}- </td>- <td className="cu-px-actions">- {model.enabled ? (- <button- type="button"- className="cu-btn cu-btn--secondary cu-btn--sm"- onClick={() => void handleDisable(model)}- disabled={pendingId === model.id}- >- {pendingId === model.id ? 'Working…' : 'Disable'}- </button>- ) : null}- <button- type="button"- className="cu-btn cu-btn--icon cu-btn--danger-icon"- onClick={() => void handleDelete(model)}- disabled={pendingId === model.id}- aria-label={`Delete ${modelLabel(model)}`}- >- <IconTrash width={16} height={16} />- </button>- </td>- </tr>- ))- : null}- </tbody>- )- })}- </table>- </div>- )}- </div>-- {confirmDialog}</>)}diff --git a/control-ui/components/LlmDiscoveryPanel/types.ts b/control-ui/components/LlmDiscoveryPanel/types.tsindex 08d1b115f..1d97d2fe9 100644--- a/control-ui/components/LlmDiscoveryPanel/types.ts+++ b/control-ui/components/LlmDiscoveryPanel/types.ts@@ -1,7 +1,9 @@+import type { ReactNode } from 'react'import type { LlmAllowedModel } from '@lib/api'export type LlmDiscoveryPanelProps = {items: LlmAllowedModel[]loading: boolean+ navigation?: ReactNodeonRefresh: () => Promise<void>}diff --git a/control-ui/components/LlmModelTable.tsx b/control-ui/components/LlmModelTable.tsxindex 991adf5be..90c0694fb 100644--- a/control-ui/components/LlmModelTable.tsx+++ b/control-ui/components/LlmModelTable.tsx@@ -24,7 +24,7 @@ const MODEL_COLUMNS: TableHeaderColumn[] = [{ key: 'contextWindow', label: 'Context window', align: 'right', width: '9rem' },{ key: 'enabled', label: 'Enabled', width: '6rem' },{ key: 'source', label: 'Source', width: '7rem' },- { key: 'stale', label: 'Stale', width: '6rem' },+ { key: 'catalogStatus', label: 'Catalog status', width: '8rem' },{ key: 'actions', width: '5rem', align: 'right', ariaLabel: 'Actions' },]@@ -35,6 +35,7 @@ type SourceFilter = 'all' | 'manual' | 'discovery'export function LlmModelTable({items,+ navigation,unpricedKeys,onCreate,onEdit,@@ -155,7 +156,7 @@ export function LlmModelTable({}return (- <div className="cu-card cu-section-card">+ <div className="cu-card cu-card--viewport-fill cu-section-card"><TablePanelHeadertitle={<>@@ -227,6 +228,7 @@ export function LlmModelTable({</>}/>+ {navigation}{isInitialLoad ? (<div className="cu-table-wrap cu-table-wrap--sticky-header"><table className="cu-table cu-table--header-band cu-llm-model-table">@@ -254,6 +256,7 @@ export function LlmModelTable({const providerLabel = getProviderDisplayLabel(provider)const providerModels = items.filter(model => model.provider === provider)const enabledCount = providerModels.filter(model => model.enabled).length+ const staleCount = providerModels.filter(model => model.stale).lengthconst hasFilteredModels = models.length !== providerModels.lengthconst expanded = expandedProviders.has(provider)@@ -282,6 +285,7 @@ export function LlmModelTable({</span><span className="cu-llm-model-group__summary">{enabledCount} enabled+ {staleCount > 0 ? ` · ${staleCount} stale` : ''}{hasFilteredModels ? ` · ${models.length} matching` : ''}</span><span className="cu-llm-model-group__action" aria-hidden="true">@@ -335,7 +339,7 @@ export function LlmModelTable({{model.stale === true ? (<spanclassName="cu-px-badge cu-px-badge--warn"- title="This model vanished from provider discovery but is kept — it is never auto-removed. Review whether to keep or remove it."+ title="Missing from the latest live provider catalog. It remains available when enabled until an operator disables or removes it.">Stale</span>diff --git a/control-ui/components/LlmModelTable.types.ts b/control-ui/components/LlmModelTable.types.tsindex 5da018445..59c2d2329 100644--- a/control-ui/components/LlmModelTable.types.ts+++ b/control-ui/components/LlmModelTable.types.ts@@ -1,7 +1,9 @@+import type { ReactNode } from 'react'import type { LlmAllowedModel } from '@lib/api'export type LlmModelTableProps = {items: LlmAllowedModel[]+ navigation?: ReactNode// Set of allowed models that have no enabled price, keyed both as// `provider/model` and bare `model` (the unpriced feed may omit the// provider). Rows in this set render a compact price warning.diff --git a/control-ui/components/LlmModelsSurface/index.tsx b/control-ui/components/LlmModelsSurface/index.tsxnew file mode 100644index 000000000..7a5da59d7--- /dev/null+++ b/control-ui/components/LlmModelsSurface/index.tsx@@ -0,0 +1,167 @@+'use client'++import React, { useEffect, useMemo, useState } from 'react'+import { useRouter } from 'next/navigation'+import { useAuth } from '@components/AuthContext'+import { AuthGate } from '@components/AuthGate'+import { useConfirmDialog } from '@components/ConfirmDialog'+import { DashboardLayout } from '@components/DashboardLayout'+import { LlmDiscoveryPanel } from '@components/LlmDiscoveryPanel'+import { LlmModelTable } from '@components/LlmModelTable'+import { TabBar } from '@components/TabBar'+import { useToast } from '@components/Toast'+import { CONTROL_ROUTES } from '@constants/routes'+import {+ type LlmAllowedModel,+ type UnpricedModel,+ deleteLlmModel,+ getLlmModels,+ getUnpricedModels,+ isLlmModelConfigMapDeferred,+ isSilentApiError,+} from '@lib/api'+import { getProviderDisplayLabel } from '@lib/llm'+import { buildUnpricedKeys } from '@lib/llmModelUnpriced'+import type { LlmModelsSurfaceProps, LlmModelsTab } from './types'++const CONFIGMAP_DEFERRED_WARNING =+ 'Saved. Propagation to the cluster is delayed and will reconcile shortly.'++function LlmModelsContent({ activeTab }: LlmModelsSurfaceProps) {+ const { authState } = useAuth()+ const router = useRouter()+ const { showToast } = useToast()+ const { confirm, confirmDialog } = useConfirmDialog()++ const [models, setModels] = useState<LlmAllowedModel[]>([])+ const [unpriced, setUnpriced] = useState<UnpricedModel[]>([])+ const [loading, setLoading] = useState(false)+ const [error, setError] = useState('')+ const [deletingId, setDeletingId] = useState<string | null>(null)++ const unpricedKeys = useMemo(() => buildUnpricedKeys(unpriced), [unpriced])++ async function loadAll() {+ setLoading(true)+ setError('')+ try {+ const [modelsResult, unpricedResult] = await Promise.allSettled([+ getLlmModels(),+ getUnpricedModels(),+ ])+ if (modelsResult.status === 'fulfilled') {+ setModels(modelsResult.value.rows ?? [])+ } else if (!isSilentApiError(modelsResult.reason)) {+ throw modelsResult.reason+ }+ if (unpricedResult.status === 'fulfilled') {+ setUnpriced(unpricedResult.value.rows ?? [])+ } else {+ setUnpriced([])+ }+ } catch (caught) {+ if (isSilentApiError(caught)) return+ setError(caught instanceof Error ? caught.message : 'Failed to load allowed models')+ } finally {+ setLoading(false)+ }+ }++ async function handleDelete(model: LlmAllowedModel) {+ const label = `${getProviderDisplayLabel(model.provider)}/${model.model}`+ const shouldDelete = await confirm({+ title: 'Delete model',+ message: `Remove ${label} from the allowlist? Existing agents keep running, but this model can no longer be selected.`,+ confirmLabel: 'Delete',+ tone: 'danger',+ })+ if (!shouldDelete) return++ setDeletingId(model.id)+ setError('')+ try {+ await deleteLlmModel(model.id)+ await loadAll()+ showToast(`${label} removed from the allowlist.`, { tone: 'success' })+ } catch (caught) {+ if (isSilentApiError(caught)) return+ if (isLlmModelConfigMapDeferred(caught)) {+ await loadAll()+ showToast(`${label} removed. ${CONFIGMAP_DEFERRED_WARNING}`, { tone: 'info' })+ return+ }+ setError(caught instanceof Error ? caught.message : `Failed to delete ${label}`)+ } finally {+ setDeletingId(null)+ }+ }++ useEffect(() => {+ if (authState.isLoggedIn && !authState.isLoading) {+ void loadAll()+ }+ }, [authState.isLoggedIn, authState.isLoading])++ const tabs = [+ {+ value: 'catalog' as const,+ href: CONTROL_ROUTES.llmModels.root,+ label: 'Catalog',+ },+ {+ value: 'discovery' as const,+ href: CONTROL_ROUTES.llmModels.discovery,+ label: 'Discovery review',+ },+ ]+ const navigation = (+ <TabBar<LlmModelsTab>+ activeValue={activeTab}+ ariaLabel="LLM model management"+ className="cu-tabs--flush-top"+ options={tabs}+ />+ )++ return (+ <div className="cu-llm-models-layout">+ {error ? (+ <div className="cu-banner cu-banner--error" role="alert">+ {error}+ </div>+ ) : null}+ {activeTab === 'catalog' ? (+ <LlmModelTable+ items={models}+ navigation={navigation}+ unpricedKeys={unpricedKeys}+ onCreate={() => router.push(CONTROL_ROUTES.llmModels.new)}+ onEdit={id => router.push(CONTROL_ROUTES.llmModels.edit(id))}+ onDelete={handleDelete}+ onRefresh={loadAll}+ deletingId={deletingId}+ refreshing={loading}+ loading={loading && models.length === 0}+ />+ ) : (+ <LlmDiscoveryPanel+ items={models}+ loading={loading && models.length === 0}+ navigation={navigation}+ onRefresh={loadAll}+ />+ )}+ {confirmDialog}+ </div>+ )+}++export function LlmModelsSurface(props: LlmModelsSurfaceProps) {+ return (+ <AuthGate>+ <DashboardLayout>+ <LlmModelsContent {...props} />+ </DashboardLayout>+ </AuthGate>+ )+}diff --git a/control-ui/components/LlmModelsSurface/types.ts b/control-ui/components/LlmModelsSurface/types.tsnew file mode 100644index 000000000..143e11a88--- /dev/null+++ b/control-ui/components/LlmModelsSurface/types.ts@@ -0,0 +1,5 @@+export type LlmModelsTab = 'catalog' | 'discovery'++export type LlmModelsSurfaceProps = {+ activeTab: LlmModelsTab+}diff --git a/control-ui/components/PublishToRegistryForm.tsx b/control-ui/components/PublishToRegistryForm.tsxindex 65f749194..1464a4fa6 100644--- a/control-ui/components/PublishToRegistryForm.tsx+++ b/control-ui/components/PublishToRegistryForm.tsx@@ -587,7 +587,7 @@ export function PublishToRegistryForm({</p><p className="cu-field__hint">Need a key to publish from CI or a script?{' '}- <a href={CONTROL_ROUTES.marketplace.keys}>Manage API keys →</a>+ <a href={CONTROL_ROUTES.publisher.apiKeys}>Manage API keys →</a></p></div>))}diff --git a/control-ui/components/PublisherView/GrantAccessModal/index.tsx b/control-ui/components/PublisherView/GrantAccessModal/index.tsxnew file mode 100644index 000000000..3787ad509--- /dev/null+++ b/control-ui/components/PublisherView/GrantAccessModal/index.tsx@@ -0,0 +1,252 @@+'use client'++import { useCallback, useEffect, useId, useState } from 'react'+import { IconX } from '@components/icons'+import { type OrgGrant, createOrgGrant, listOrgGrants, revokeOrgGrant } from '@lib/api'+import { useConfirmDialog } from '../../ConfirmDialog'+import { useToast } from '../../Toast'+import { Button } from '../../ui'+import { RetryBanner } from '../RetryBanner'+import type { GrantAccessModalProps } from './types'++const GRANT_ERROR_MESSAGES: Record<string, string> = {+ grantee_not_found: 'No org found with that slug. Check the grantee\u2019s exact org name.',+ self_grant: 'You can\u2019t grant access to your own org.',+ plugin_public:+ 'This plugin is public \u2014 everyone can already install it, so no grant is needed.',+ grantee_reserved: 'That org name is reserved and can\u2019t receive grants.',+ plugin_not_found: 'This plugin no longer exists in the registry.',+}++function grantErrorMessage(err: unknown): string {+ const code = (err as { code?: string }).code+ return (code && GRANT_ERROR_MESSAGES[code]) || 'Could not create the grant. Please try again.'+}++export function GrantAccessModal({+ entryName,+ orgScope,+ onClose,+}: GrantAccessModalProps): React.JSX.Element {+ const pluginName = entryName.startsWith('@') ? entryName : `@${orgScope}/${entryName}`+ const titleId = useId()+ const descriptionId = useId()+ const inputId = useId()++ const { showToast } = useToast()+ const { confirm, confirmDialog } = useConfirmDialog()+ const [grants, setGrants] = useState<OrgGrant[]>([])+ const [loading, setLoading] = useState(true)+ const [loadError, setLoadError] = useState(false)+ const [granteeOrg, setGranteeOrg] = useState('')+ const [submitting, setSubmitting] = useState(false)+ const [revokingId, setRevokingId] = useState<string | null>(null)+ const [formError, setFormError] = useState('')++ const load = useCallback(async () => {+ setLoading(true)+ setLoadError(false)+ try {+ const { grants: rows } = await listOrgGrants(pluginName)+ setGrants(rows.filter(g => g.pluginName === pluginName))+ } catch {+ setLoadError(true)+ } finally {+ setLoading(false)+ }+ }, [pluginName])++ useEffect(() => {+ void load()+ }, [load])++ useEffect(() => {+ const previousActiveElement =+ document.activeElement instanceof HTMLElement ? document.activeElement : null+ function onKeyDown(event: KeyboardEvent) {+ if (event.key === 'Escape' && !submitting && !revokingId) onClose()+ }+ window.addEventListener('keydown', onKeyDown)+ return () => {+ window.removeEventListener('keydown', onKeyDown)+ previousActiveElement?.focus()+ }+ }, [onClose, submitting, revokingId])++ const busy = submitting || revokingId != null+ const trimmed = granteeOrg.trim()+ const canSubmit = trimmed.length > 0 && !busy++ async function handleGrant() {+ if (!canSubmit) return+ setSubmitting(true)+ setFormError('')+ try {+ await createOrgGrant({ pluginName, granteeOrg: trimmed })+ showToast(`Shared ${pluginName} with @${trimmed}.`, { tone: 'success' })+ setGranteeOrg('')+ await load()+ } catch (err) {+ setFormError(grantErrorMessage(err))+ } finally {+ setSubmitting(false)+ }+ }++ async function handleRevoke(grant: OrgGrant) {+ const ok = await confirm({+ title: 'Revoke access',+ message: `Revoke @${grant.granteeOrg}\u2019s access to ${grant.pluginName}? They will no longer be able to install it.`,+ confirmLabel: 'Revoke',+ tone: 'danger',+ })+ if (!ok) return+ setRevokingId(grant.id)+ try {+ await revokeOrgGrant(grant.id)+ showToast(`Revoked @${grant.granteeOrg}.`, { tone: 'success' })+ } catch (err) {+ const status = (err as { status?: number }).status+ showToast(status === 404 ? 'Grant was already revoked.' : 'Could not revoke the grant.', {+ tone: status === 404 ? 'info' : 'error',+ })+ } finally {+ setRevokingId(null)+ }+ await load()+ }++ return (+ <div+ className="cu-modal-backdrop"+ role="presentation"+ onMouseDown={event => {+ if (event.target === event.currentTarget && !busy) onClose()+ }}+ >+ <section+ className="cu-modal-panel cu-modal-panel--share-access"+ role="dialog"+ aria-modal="true"+ aria-labelledby={titleId}+ aria-describedby={descriptionId}+ onMouseDown={event => event.stopPropagation()}+ >+ <header className="cu-modal-panel__head">+ <div className="cu-modal-panel__title-group">+ <h3 id={titleId} className="cu-modal-panel__title">+ Grant access+ </h3>+ <p className="cu-modal-panel__eyebrow">+ Sharing <code>{pluginName}</code>+ </p>+ </div>+ <Button+ className="cu-btn--icon"+ variant="ghost"+ aria-label="Close"+ disabled={busy}+ onClick={onClose}+ >+ <IconX width={18} height={18} />+ </Button>+ </header>++ <p id={descriptionId} className="cu-modal-copy">+ Let another org pull and install every version of <code>{pluginName}</code>. Grants are+ revocable from this dialog.+ </p>++ <div className="cu-share-access-form" role="group" aria-label="Grant access to an org">+ <div className="cu-field cu-field--compact">+ <label htmlFor={inputId}>Grantee org slug</label>+ <div className="cu-share-access-form__row">+ <input+ id={inputId}+ className="cu-input"+ autoFocus+ autoComplete="off"+ spellCheck={false}+ placeholder="acme-labs"+ disabled={busy}+ value={granteeOrg}+ onChange={event => {+ setGranteeOrg(event.target.value)+ if (formError) setFormError('')+ }}+ onKeyDown={event => {+ if (event.key === 'Enter' && canSubmit) {+ event.preventDefault()+ void handleGrant()+ }+ }}+ />+ <Button+ type="button"+ variant="primary"+ size="sm"+ disabled={!canSubmit}+ onClick={() => void handleGrant()}+ >+ {submitting ? 'Granting\u2026' : 'Grant access'}+ </Button>+ </div>+ <span className="cu-field__hint">+ Use the org’s exact slug — grants are scoped to <code>{pluginName}</code>.+ </span>+ </div>+ {formError ? (+ <p className="cu-field__error" role="alert">+ {formError}+ </p>+ ) : null}+ </div>++ <div className="cu-modal-panel__body cu-share-access-list">+ <div className="cu-share-access-list__head">+ <span className="cu-share-access-list__title">Currently shared with</span>+ <span className="cu-share-access-list__count">+ {loading ? '\u2026' : grants.length}+ </span>+ </div>+ {loading ? (+ <p className="cu-muted-note--compact">Loading grants…</p>+ ) : loadError ? (+ <RetryBanner message="Could not load grants." onRetry={() => void load()} />+ ) : grants.length === 0 ? (+ <p className="cu-muted-note--compact">Not shared with any org yet.</p>+ ) : (+ <ul className="cu-grant-list">+ {grants.map(g => {+ const isRevoking = revokingId === g.id+ return (+ <li key={g.id} className="cu-grant-list__row">+ <span className="cu-grant-list__org">+ <code>@{g.granteeOrg}</code>+ </span>+ <Button+ type="button"+ variant="danger"+ size="sm"+ disabled={busy}+ onClick={() => void handleRevoke(g)}+ >+ {isRevoking ? 'Revoking\u2026' : 'Revoke'}+ </Button>+ </li>+ )+ })}+ </ul>+ )}+ </div>++ <footer className="cu-modal-panel__foot">+ <Button variant="ghost" disabled={busy} onClick={onClose}>+ Close+ </Button>+ </footer>+ </section>+ {confirmDialog}+ </div>+ )+}diff --git a/control-ui/components/PublisherView/GrantAccessModal/types.ts b/control-ui/components/PublisherView/GrantAccessModal/types.tsnew file mode 100644index 000000000..b430f7873--- /dev/null+++ b/control-ui/components/PublisherView/GrantAccessModal/types.ts@@ -0,0 +1,8 @@+export interface GrantAccessModalProps {+ /** Display name as it appears in the owner table (e.g. "db" or already "@scope/db"). */+ entryName: string+ /** Owning org slug (used to normalize {@link entryName} into `@scope/name`). */+ orgScope: string+ /** Called when the operator dismisses the modal (Escape / backdrop / Close). */+ onClose: () => void+}diff --git a/control-ui/components/PublisherView/OwnedEntries.tsx b/control-ui/components/PublisherView/OwnedEntries.tsxindex d6b7b3996..5073cea76 100644--- a/control-ui/components/PublisherView/OwnedEntries.tsx+++ b/control-ui/components/PublisherView/OwnedEntries.tsx@@ -5,8 +5,8 @@ import { type OwnedRegistryEntry, getOwnedRegistryEntries } from '../../lib/api'import { TableHeaderRow } from '../TableHeaderRow'import type { TableHeaderColumn } from '../TableHeaderRow/types'import { Button } from '../ui'+import { GrantAccessModal } from './GrantAccessModal'import { RetryBanner } from './RetryBanner'-import { ShareAccessPanel } from './ShareAccessPanel'const COLUMNS: TableHeaderColumn[] = [{ key: 'name', label: 'Name' },@@ -34,7 +34,7 @@ export function OwnedEntries({ orgScope }: { orgScope: string }) {const [entries, setEntries] = useState<OwnedRegistryEntry[]>([])const [loading, setLoading] = useState(true)const [error, setError] = useState(false)- const [expanded, setExpanded] = useState<string | null>(null)+ const [grantTarget, setGrantTarget] = useState<string | null>(null)const load = useCallback(async () => {setLoading(true)@@ -64,19 +64,19 @@ export function OwnedEntries({ orgScope }: { orgScope: string }) {}return (- <div className="cu-table-wrap">- <table className="cu-table">- <thead>- <TableHeaderRow columns={COLUMNS} />- </thead>- <tbody>- {entries.map(e => {- const k = entryKey(e)- const isPrivate = e.visibility === 'private'- const isOpen = expanded === k- return (- <React.Fragment key={k}>- <tr>+ <>+ <div className="cu-table-wrap">+ <table className="cu-table">+ <thead>+ <TableHeaderRow columns={COLUMNS} />+ </thead>+ <tbody>+ {entries.map(e => {+ const k = entryKey(e)+ const isPrivate = e.visibility === 'private'+ const isGranting = grantTarget === e.name+ return (+ <tr key={k}><td><code>{e.name}</code></td>@@ -96,28 +96,29 @@ export function OwnedEntries({ orgScope }: { orgScope: string }) {type="button"variant="ghost"size="sm"- aria-expanded={isOpen}- onClick={() => setExpanded(isOpen ? null : k)}+ aria-haspopup="dialog"+ aria-expanded={isGranting}+ onClick={() => setGrantTarget(e.name)}>- {isOpen ? 'Hide' : 'Share access'}+ Share access</Button>) : (<span className="cu-muted-note--compact">Public — no grant needed</span>)}</td></tr>- {isPrivate && isOpen ? (- <tr>- <td colSpan={COLUMNS.length}>- <ShareAccessPanel entryName={e.name} orgScope={orgScope} />- </td>- </tr>- ) : null}- </React.Fragment>- )- })}- </tbody>- </table>- </div>+ )+ })}+ </tbody>+ </table>+ </div>+ {grantTarget ? (+ <GrantAccessModal+ entryName={grantTarget}+ orgScope={orgScope}+ onClose={() => setGrantTarget(null)}+ />+ ) : null}+ </>)}diff --git a/control-ui/components/PublisherView/ShareAccessPanel.tsx b/control-ui/components/PublisherView/ShareAccessPanel.tsxdeleted file mode 100644index 9b9376f57..000000000--- a/control-ui/components/PublisherView/ShareAccessPanel.tsx+++ /dev/null@@ -1,144 +0,0 @@-'use client'--import { useCallback, useEffect, useState } from 'react'-import { type OrgGrant, createOrgGrant, listOrgGrants, revokeOrgGrant } from '../../lib/api'-import { useConfirmDialog } from '../ConfirmDialog'-import { useToast } from '../Toast'-import { Button } from '../ui'-import { RetryBanner } from './RetryBanner'--const GRANT_ERROR_MESSAGES: Record<string, string> = {- grantee_not_found: 'No org found with that slug. Check the grantee’s exact org name.',- self_grant: 'You can’t grant access to your own org.',- plugin_public: 'This plugin is public — everyone can already install it, so no grant is needed.',- grantee_reserved: 'That org name is reserved and can’t receive grants.',- plugin_not_found: 'This plugin no longer exists in the registry.',-}--function grantErrorMessage(err: unknown): string {- const code = (err as { code?: string }).code- return (code && GRANT_ERROR_MESSAGES[code]) || 'Could not create the grant. Please try again.'-}--export function ShareAccessPanel({ entryName, orgScope }: { entryName: string; orgScope: string }) {- const pluginName = entryName.startsWith('@') ? entryName : `@${orgScope}/${entryName}`- const { showToast } = useToast()- const { confirm, confirmDialog } = useConfirmDialog()- const [grants, setGrants] = useState<OrgGrant[]>([])- const [loading, setLoading] = useState(true)- const [loadError, setLoadError] = useState(false)- const [granteeOrg, setGranteeOrg] = useState('')- const [submitting, setSubmitting] = useState(false)- const [formError, setFormError] = useState('')-- const load = useCallback(async () => {- setLoading(true)- setLoadError(false)- try {- const { grants: rows } = await listOrgGrants(pluginName)- setGrants(rows.filter(g => g.pluginName === pluginName))- } catch {- setLoadError(true)- } finally {- setLoading(false)- }- }, [pluginName])-- useEffect(() => {- void load()- }, [load])-- async function handleGrant(e: React.FormEvent) {- e.preventDefault()- const slug = granteeOrg.trim()- if (!slug || submitting) return- setSubmitting(true)- setFormError('')- try {- await createOrgGrant({ pluginName, granteeOrg: slug })- showToast(`Shared ${pluginName} with @${slug}.`, { tone: 'success' })- setGranteeOrg('')- await load()- } catch (err) {- setFormError(grantErrorMessage(err))- } finally {- setSubmitting(false)- }- }-- async function handleRevoke(grant: OrgGrant) {- const ok = await confirm({- title: 'Revoke access',- message: `Revoke @${grant.granteeOrg}’s access to ${grant.pluginName}? They will no longer be able to install it.`,- confirmLabel: 'Revoke',- tone: 'danger',- })- if (!ok) return- try {- await revokeOrgGrant(grant.id)- showToast(`Revoked @${grant.granteeOrg}.`, { tone: 'success' })- } catch (err) {- const status = (err as { status?: number }).status- showToast(status === 404 ? 'Grant was already revoked.' : 'Could not revoke the grant.', {- tone: status === 404 ? 'info' : 'error',- })- }- await load()- }-- return (- <div className="cu-card__body">- <form className="cu-form-inline" onSubmit={handleGrant}>- <div className="cu-field">- <label htmlFor={`grantee-${pluginName}`}>Grantee org slug</label>- <input- id={`grantee-${pluginName}`}- className="cu-input"- value={granteeOrg}- onChange={e => setGranteeOrg(e.target.value.trim())}- placeholder="acme-labs"- autoComplete="off"- />- <span className="cu-field__hint">- Grants pull & install of every version of <code>{pluginName}</code> to that org.- </span>- </div>- <Button- type="submit"- variant="primary"- size="sm"- disabled={submitting || !granteeOrg.trim()}- >- {submitting ? 'Granting…' : 'Grant access'}- </Button>- </form>- {formError ? (- <p className="cu-field__error" role="alert">- {formError}- </p>- ) : null}-- {loading ? (- <p>Loading grants…</p>- ) : loadError ? (- <RetryBanner message="Could not load grants." onRetry={() => void load()} />- ) : grants.length === 0 ? (- <p className="cu-muted-note--compact">Not shared with any org yet.</p>- ) : (- <ul className="cu-grant-list">- {grants.map(g => (- <li key={g.id} className="cu-grant-list__row">- <span>- <code>@{g.granteeOrg}</code>- </span>- <Button type="button" variant="danger" size="sm" onClick={() => void handleRevoke(g)}>- Revoke- </Button>- </li>- ))}- </ul>- )}- {confirmDialog}- </div>- )-}diff --git a/control-ui/components/PublisherView/index.tsx b/control-ui/components/PublisherView/index.tsxindex 3b62521e2..9def530c0 100644--- a/control-ui/components/PublisherView/index.tsx+++ b/control-ui/components/PublisherView/index.tsx@@ -3,6 +3,7 @@import { CONTROL_ROUTES } from '@constants/routes'import { useInboundGrants } from '../../lib/hooks/useInboundGrants'import { isPublisherEnabled, usePublishScope } from '../../lib/hooks/usePublishScope'+import RegistryApiKeysPanel from '../RegistryApiKeysPanel'import { TabBar } from '../TabBar'import { TablePanelHeader } from '../TablePanelHeader'import { DockerCredentialsPanel } from './DockerCredentials'@@ -14,6 +15,7 @@ const TABS: { value: PublisherTab; href: string; label: string }[] = [{ value: 'entries', href: CONTROL_ROUTES.publisher.entries, label: 'Published entries' },{ value: 'shared', href: CONTROL_ROUTES.publisher.sharedWithMe, label: 'Shared with me' },{ value: 'credentials', href: CONTROL_ROUTES.publisher.credentials, label: 'Docker credentials' },+ { value: 'api-keys', href: CONTROL_ROUTES.publisher.apiKeys, label: 'API keys' },]export function PublisherView({ activeTab }: { activeTab: PublisherTab }) {@@ -70,6 +72,7 @@ export function PublisherView({ activeTab }: { activeTab: PublisherTab }) {<GrantedToMe status={inbound.status} grants={inbound.grants} reload={inbound.reload} />) : null}{activeTab === 'credentials' ? <DockerCredentialsPanel orgScope={orgScope} /> : null}+ {activeTab === 'api-keys' ? <RegistryApiKeysPanel embedded /> : null}</div></div></section>diff --git a/control-ui/components/PublisherView/types.ts b/control-ui/components/PublisherView/types.tsindex b41d5b4ef..539770319 100644--- a/control-ui/components/PublisherView/types.ts+++ b/control-ui/components/PublisherView/types.ts@@ -1 +1 @@-export type PublisherTab = 'entries' | 'shared' | 'credentials'+export type PublisherTab = 'entries' | 'shared' | 'credentials' | 'api-keys'diff --git a/control-ui/components/RegistryApiKeysPanel.tsx b/control-ui/components/RegistryApiKeysPanel.tsxindex fe86c393b..b8e4b7046 100644--- a/control-ui/components/RegistryApiKeysPanel.tsx+++ b/control-ui/components/RegistryApiKeysPanel.tsx@@ -48,7 +48,7 @@ function fmtExpiry(v: string | null): string {return d.getTime() < Date.now() ? `Expired ${d.toLocaleDateString()}` : d.toLocaleString()}-export default function RegistryApiKeysPanel() {+export default function RegistryApiKeysPanel({ embedded = false }: { embedded?: boolean }) {const { showToast } = useToast()const { confirm, confirmDialog } = useConfirmDialog()const [view, setView] = useState<View>({ kind: 'loading' })@@ -108,91 +108,94 @@ export default function RegistryApiKeysPanel() {const isReady = view.kind === 'ready'- return (- <section>- <div className="cu-card cu-card--viewport-fill">- <TablePanelHeader- title={`API keys${isReady ? ` for @${(view as { org: string }).org}` : ''}`}- actions={- isReady ? (- <Button type="button" variant="primary" size="sm" onClick={() => setCreating(true)}>- + Create key- </Button>- ) : null- }- />+ const content = (+ <>+ <TablePanelHeader+ title={`API keys${isReady ? ` for @${(view as { org: string }).org}` : ''}`}+ actions={+ isReady ? (+ <Button type="button" variant="primary" size="sm" onClick={() => setCreating(true)}>+ + Create key+ </Button>+ ) : null+ }+ />- <div className="cu-card__body">- {view.kind === 'loading' ? <p>Loading…</p> : null}- {view.kind === 'not-owner' ? (- <p className="cu-banner cu-banner--warn">- You must be an org owner to manage API keys- {view.org ? ` for @${view.org}` : ''}.- </p>- ) : null}- {view.kind === 'no-org' ? (- <p className="cu-banner cu-banner--warn">- This deployment is not bound to a registry org, so there are no org API keys to- manage.- </p>- ) : null}- {view.kind === 'auth-disabled' ? (- <p className="cu-banner cu-banner--info">- Registry authentication is disabled, so API keys can't be created here. To enable- it, set <code>CLERUM_REGISTRY_AUTH_ENABLED=true</code> and restart control-api, then- reload this page.- </p>- ) : null}- {view.kind === 'error' ? (- <p className="cu-banner cu-banner--warn">- Could not load API keys.{' '}- <Button type="button" variant="ghost" size="sm" onClick={() => void load()}>- Retry- </Button>- </p>- ) : null}+ <div className="cu-card__body">+ {view.kind === 'loading' ? <p>Loading…</p> : null}+ {view.kind === 'not-owner' ? (+ <p className="cu-banner cu-banner--warn">+ You must be an org owner to manage API keys+ {view.org ? ` for @${view.org}` : ''}.+ </p>+ ) : null}+ {view.kind === 'no-org' ? (+ <p className="cu-banner cu-banner--warn">+ This deployment is not bound to a registry org, so there are no org API keys to+ manage.+ </p>+ ) : null}+ {view.kind === 'auth-disabled' ? (+ <p className="cu-banner cu-banner--info">+ Registry authentication is disabled, so API keys can't be created here. To enable it,+ set <code>CLERUM_REGISTRY_AUTH_ENABLED=true</code> and restart control-api, then reload+ this page.+ </p>+ ) : null}+ {view.kind === 'error' ? (+ <p className="cu-banner cu-banner--warn">+ Could not load API keys.{' '}+ <Button type="button" variant="ghost" size="sm" onClick={() => void load()}>+ Retry+ </Button>+ </p>+ ) : null}- {view.kind === 'ready' ? (- view.keys.length === 0 ? (- <p>No API keys yet. Create one to publish to @{view.org} from CI or scripts.</p>- ) : (- <div className="cu-table-wrap">- <table className="cu-table">- <thead>- <TableHeaderRow columns={API_KEYS_COLUMNS} />- </thead>- <tbody>- {view.keys.map(k => (- <tr key={k.id}>- <td>- <code>{k.key_prefix}</code>- </td>- <td>{k.description || '—'}</td>- <td>{k.scopes.join(', ')}</td>- <td>{k.created_by_username}</td>- <td title={k.created_at}>{fmtTime(k.created_at, '—')}</td>- <td>{fmtExpiry(k.expires_at)}</td>- <td>{fmtTime(k.last_used_at, 'Never used')}</td>- <td>- <Button- type="button"- variant="danger"- size="sm"- onClick={() => void handleRevoke(k)}- >- Revoke- </Button>- </td>- </tr>- ))}- </tbody>- </table>- </div>- )- ) : null}- </div>+ {view.kind === 'ready' ? (+ view.keys.length === 0 ? (+ <p>No API keys yet. Create one to publish to @{view.org} from CI or scripts.</p>+ ) : (+ <div className="cu-table-wrap">+ <table className="cu-table">+ <thead>+ <TableHeaderRow columns={API_KEYS_COLUMNS} />+ </thead>+ <tbody>+ {view.keys.map(k => (+ <tr key={k.id}>+ <td>+ <code>{k.key_prefix}</code>+ </td>+ <td>{k.description || '—'}</td>+ <td>{k.scopes.join(', ')}</td>+ <td>{k.created_by_username}</td>+ <td title={k.created_at}>{fmtTime(k.created_at, '—')}</td>+ <td>{fmtExpiry(k.expires_at)}</td>+ <td>{fmtTime(k.last_used_at, 'Never used')}</td>+ <td>+ <Button+ type="button"+ variant="danger"+ size="sm"+ onClick={() => void handleRevoke(k)}+ >+ Revoke+ </Button>+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>+ )+ ) : null}</div>+ </>+ )+ return (+ <section>+ {embedded ? content : <div className="cu-card cu-card--viewport-fill">{content}</div>}{creating ? (<CreateApiKeyModal onCreate={handleCreate} onCancel={() => setCreating(false)} />) : null}diff --git a/control-ui/components/RegistryCatalog.tsx b/control-ui/components/RegistryCatalog.tsxindex 8c376066a..f2818c25d 100644--- a/control-ui/components/RegistryCatalog.tsx+++ b/control-ui/components/RegistryCatalog.tsx@@ -311,15 +311,6 @@ export default function RegistryCatalog() {>+ Publish to Marketplace</button>- <button- type="button"- className="cu-btn cu-btn--ghost cu-btn--sm"- title="Manage org publish API keys (efrk_) for CI/scripts"- onClick={() => router.push(CONTROL_ROUTES.marketplace.keys)}- disabled={isInitialLoad}- >- Manage API keys- </button></>}/>@@ -334,7 +325,6 @@ export default function RegistryCatalog() {href: CONTROL_ROUTES.marketplace.connectors,label: 'Connectors',},- { value: 'plugins', href: CONTROL_ROUTES.marketplace.plugins, label: 'Plugins' },]}/>diff --git a/control-ui/components/RegistryInstallForm/index.tsx b/control-ui/components/RegistryInstallForm/index.tsxindex 5e4d827cd..17a9606f6 100644--- a/control-ui/components/RegistryInstallForm/index.tsx+++ b/control-ui/components/RegistryInstallForm/index.tsx@@ -11,27 +11,16 @@ import { registryEntryToEgressBindings } from '@lib/egressModel'import type { EgressBinding, EgressEditorStatus } from '@lib/egressModel'import { isValidK8sName, toK8sName } from '@lib/k8sValidation'import { buildPastedValue } from '@lib/pasteUtils'-import { trustBgColor, trustColor } from '@lib/trustLevel'import { getEmbeddedCredentialSchema, getExternalEgressNotice } from '../registryInstallHelpers'import type { RegistryInstallFormProps } from './types'-const STEPS = ['Package', 'Configure', 'Network', 'Install'] as const+const STEPS = ['Package', 'Install'] as constconst STEP_DETAILS = [{description: 'Review Marketplace entry',title: 'Marketplace package',- subtitle: 'Review trust, version, and egress notices for this connector.',- },- {- description: 'Name and credentials',- title: 'Installation settings',- subtitle: 'Set the server name, context, and credentials.',- },- {- description: 'Confirm egress',- title: 'Network egress',- subtitle: 'Review and adjust the egress contract that will be installed.',+ subtitle: 'Review the package and optionally adjust its installation configuration.',},{description: 'Confirm install',@@ -115,17 +104,11 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInnameValid && contextRef.trim() !== '' && credComplete && egressValid && !installingconst canContinue =step === 0- ? !loading- : step === 1- ? nameValid && contextRef.trim() !== '' && credComplete- : step === 2- ? egressValid- : true+ ? !loading && nameValid && contextRef.trim() !== '' && credComplete && egressValid+ : truefunction canSelectStep(targetStep: number) {if (targetStep <= step) return true- if (targetStep === 1) return !loading- if (targetStep === 2) return nameValid && contextRef.trim() !== '' && credCompletereturn nameValid && contextRef.trim() !== '' && credComplete && egressValid}@@ -198,7 +181,7 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn<><CreateStepFlowariaLabel="Install connector steps"- className="cu-create-step-flow--4"+ className="cu-create-step-flow--2"currentStep={step}onStepChange={setStep}canSelectStep={canSelectStep}@@ -266,15 +249,6 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn<div className="cu-registry-entry-card__head"><strong className="cu-registry-name">{entry.name}</strong><span className="cu-muted">v{entry.version}</span>- <span- className="cu-registry-trust-chip"- style={{- background: trustBgColor(entry.trust_level),- color: trustColor(entry.trust_level),- }}- >- {entry.trust_level}- </span></div>{entry.description ? (<p className="cu-registry-description">{entry.description}</p>@@ -300,8 +274,10 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn}}className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide">- {step === 1 ? (- <>+ {step === 0 ? (+ <details className="cu-registry-install-configuration">+ <summary>Configuration</summary>+ <div className="cu-registry-install-configuration__body"><div className="cu-field cu-field--compact"><label htmlFor="ri-name">Server name</label><input@@ -376,11 +352,6 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn) : null}</fieldset>) : null}- </>- ) : null}-- {step === 2 ? (- <><EgressEditorallowCidrdescription="Review and adjust the egress contract that will be installed from this Marketplace entry. The final CRD is created from this selection, not from the Marketplace warning alone."@@ -396,10 +367,11 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInRemote connectors must keep exact-host egress to the selected vendor endpoint.</div>) : null}- </>+ </div>+ </details>) : null}- {step === 3 ? (+ {step === 1 ? (<div className="cu-agent-review">Connector <b>{serverName || '-'}</b> will be installed into context{' '}<b>{contextRef || '-'}</b> from <b>{entry.name}</b> v{entry.version}.diff --git a/control-ui/components/Sidebar/constants.tsx b/control-ui/components/Sidebar/constants.tsxindex 6a0b4ba03..d21e90ce9 100644--- a/control-ui/components/Sidebar/constants.tsx+++ b/control-ui/components/Sidebar/constants.tsx@@ -4,6 +4,7 @@ import {IconAdministrativeTrace,IconBroadcast,IconCable,+ IconFolder,IconGroupWork,IconInfrastructureTrace,IconKey,@@ -57,7 +58,7 @@ export const SIDEBAR_TABS: Record<SidebarTab, SidebarItem> = {directories: {label: 'Directories',href: CONTROL_ROUTES.agentFiles.root,- icon: <IconPaperclip />,+ icon: <IconFolder />,children: [{label: 'Agent Outputs',diff --git a/control-ui/components/__tests__/CreateMcpServerForm.test.tsx b/control-ui/components/__tests__/CreateMcpServerForm.test.tsxindex e5ef3d7d3..7f4f04543 100644--- a/control-ui/components/__tests__/CreateMcpServerForm.test.tsx+++ b/control-ui/components/__tests__/CreateMcpServerForm.test.tsx@@ -42,17 +42,11 @@ async function fillIdentity(name = 'brave-search') {)}-function continueToRuntime() {- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))-}--function continueToNetwork() {- continueToRuntime()- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+function openAdvanced() {+ fireEvent.click(screen.getByText('Advanced options'))}function continueToSecrets() {- continueToNetwork()fireEvent.click(screen.getByRole('button', { name: 'Continue' }))}@@ -86,17 +80,30 @@ describe('CreateMcpServerForm — render', () => {expect(screen.getByRole('option', { name: 'research' })).toBeInTheDocument()})- it('uses four connector steps', () => {+ it('uses two connector steps', () => {const { container } = render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)- expect(container.querySelectorAll('.cu-agent-step-rail__item')).toHaveLength(4)+ expect(container.querySelectorAll('.cu-agent-step-rail__item')).toHaveLength(2)+ expect(screen.queryByText('Step 1 of 3')).not.toBeInTheDocument()expect(screen.queryByText('Step 1 of 4')).not.toBeInTheDocument()- expect(screen.queryByText('Step 1 of 5')).not.toBeInTheDocument()+ })++ it('hides the advanced options by default and reveals them on toggle', async () => {+ render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)+ await fillIdentity()+ const summary = screen.getByText('Advanced options')+ const details = summary.closest('details')+ expect(details).not.toBeNull()+ expect(details).not.toHaveAttribute('open')++ fireEvent.click(summary)++ expect(details).toHaveAttribute('open')})it('shows the Port field when transport is streamableHttp (default)', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()- continueToRuntime()+ openAdvanced()expect(screen.getByDisplayValue('3000')).toBeInTheDocument()})})@@ -130,7 +137,7 @@ describe('CreateMcpServerForm — transport', () => {it('hides the Port field when transport is set to stdio', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()- continueToRuntime()+ openAdvanced()// Port defaults to 3000 and is visible initiallyexpect(screen.getByDisplayValue('3000')).toBeInTheDocument()@@ -238,7 +245,7 @@ describe('CreateMcpServerForm — submit', () => {it('submits exact-host egress bindings when configured', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()- continueToNetwork()+ openAdvanced()fireEvent.change(screen.getByDisplayValue('No external egress (closed by default)'), {target: { value: 'exact-host' },@@ -267,7 +274,7 @@ describe('CreateMcpServerForm — submit', () => {it('submits public-web as one explicit egress class binding', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()- continueToNetwork()+ openAdvanced()fireEvent.change(screen.getByDisplayValue('No external egress (closed by default)'), {target: { value: 'public-web' },@@ -288,7 +295,7 @@ describe('CreateMcpServerForm — submit', () => {it('submits exact-cidr egress bindings when configured', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()- continueToNetwork()+ openAdvanced()fireEvent.change(screen.getByDisplayValue('No external egress (closed by default)'), {target: { value: 'exact-cidr' },diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsxindex 328cef138..12e6ca5a7 100644--- a/control-ui/components/__tests__/GfsBrowser.test.tsx+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx@@ -687,11 +687,12 @@ describe('GfsBrowser', () => {const manageMenuTrigger = within(manageDialog).getByRole('button', {name: 'Actions for report.md',})- expect(within(manageDialog).getByRole('button', { name: 'Replace file' })).toBeTruthy()+ expect(within(manageDialog).queryByRole('button', { name: 'Replace file' })).toBeNull()expect(within(manageDialog).queryByText('Quick actions')).toBeNull()fireEvent.click(manageMenuTrigger)const manageMenu = within(manageDialog).getByRole('menu')expect(within(manageMenu).getByRole('menuitem', { name: 'Download' })).toBeTruthy()+ expect(within(manageMenu).getByRole('menuitem', { name: 'Replace file' })).toBeTruthy()expect(within(manageMenu).getByRole('menuitem', { name: 'Copy GFS link' })).toBeTruthy()expect(within(manageMenu).getByRole('menuitem', { name: 'Rename' })).toBeTruthy()expect(within(manageMenu).getByRole('menuitem', { name: 'Delete' })).toBeTruthy()@@ -701,10 +702,7 @@ describe('GfsBrowser', () => {fireEvent.click(await screen.findByRole('option', { name: 'Ada Lovelace' }))selectPermission('Read')fireEvent.click(screen.getByRole('button', { name: 'Grant access' }))-- // Confirm in the dialog (its confirm button shares the "Grant" label).- const dialog = await screen.findByRole('alertdialog')- fireEvent.click(within(dialog).getByRole('button', { name: 'Grant' }))+ expect(screen.queryByRole('alertdialog')).toBeNull()await waitFor(() =>expect(mockPutGfsGrant).toHaveBeenCalledWith({@@ -750,9 +748,6 @@ describe('GfsBrowser', () => {fireEvent.click(await screen.findByRole('option', { name: 'Ada Lovelace' }))selectPermission('Read')fireEvent.click(screen.getByRole('button', { name: 'Grant access' }))- fireEvent.click(- within(await screen.findByRole('alertdialog')).getByRole('button', { name: 'Grant' })- )await waitFor(() =>expect(mockPutGfsGrant).toHaveBeenCalledWith(@@ -779,9 +774,6 @@ describe('GfsBrowser', () => {fireEvent.click(await screen.findByRole('option', { name: 'Research' }))selectPermission('Read')fireEvent.click(screen.getByRole('button', { name: 'Grant access' }))- fireEvent.click(- within(await screen.findByRole('alertdialog')).getByRole('button', { name: 'Grant' })- )await waitFor(() =>expect(mockPutGfsGrant).toHaveBeenCalledWith(@@ -795,9 +787,6 @@ describe('GfsBrowser', () => {fireEvent.click(await screen.findByRole('option', { name: 'Operator' }))selectPermission('Read')fireEvent.click(screen.getByRole('button', { name: 'Grant access' }))- fireEvent.click(- within(await screen.findByRole('alertdialog')).getByRole('button', { name: 'Grant' })- )await waitFor(() =>expect(mockPutGfsGrant).toHaveBeenLastCalledWith(@@ -822,8 +811,6 @@ describe('GfsBrowser', () => {fireEvent.click(await screen.findByRole('option', { name: 'Ada Lovelace' }))selectPermission('Write')fireEvent.click(screen.getByRole('button', { name: 'Grant access' }))- const dialog = await screen.findByRole('alertdialog')- fireEvent.click(within(dialog).getByRole('button', { name: 'Grant' }))expect((await screen.findByText('escalation_rejected')).getAttribute('role')).toBe('alert')})diff --git a/control-ui/components/__tests__/GfsGrantPanel.bulk.test.tsx b/control-ui/components/__tests__/GfsGrantPanel.bulk.test.tsxindex 9c36fd784..fccbfd8a6 100644--- a/control-ui/components/__tests__/GfsGrantPanel.bulk.test.tsx+++ b/control-ui/components/__tests__/GfsGrantPanel.bulk.test.tsx@@ -101,12 +101,9 @@ function selectPermission(name: string) {fireEvent.click(within(openPermissionMenu()).getByRole('menuitemcheckbox', { name }))}-async function submit(action: 'Grant access' | 'Create share') {+function submit(action: 'Grant access' | 'Create share') {fireEvent.click(screen.getByRole('button', { name: action }))- const dialog = await screen.findByRole('alertdialog')- fireEvent.click(- within(dialog).getByRole('button', { name: action === 'Grant access' ? 'Grant' : action })- )+ expect(screen.queryByRole('alertdialog')).toBeNull()}describe('GfsGrantPanel bulk access', () => {diff --git a/control-ui/components/__tests__/ShareAccessPanel.test.tsx b/control-ui/components/__tests__/GrantAccessModal.test.tsxsimilarity index 55%rename from control-ui/components/__tests__/ShareAccessPanel.test.tsxrename to control-ui/components/__tests__/GrantAccessModal.test.tsxindex ff5915ca4..73628880d 100644--- a/control-ui/components/__tests__/ShareAccessPanel.test.tsx+++ b/control-ui/components/__tests__/GrantAccessModal.test.tsx@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { cleanup, fireEvent, render as rtlRender, screen, waitFor } from '@testing-library/react'import * as api from '../../lib/api'import * as ConfirmDialogModule from '../ConfirmDialog'-import { ShareAccessPanel } from '../PublisherView/ShareAccessPanel'+import { GrantAccessModal } from '../PublisherView/GrantAccessModal'import { ToastProvider } from '../Toast'vi.mock('../../lib/api', () => ({@@ -24,17 +24,26 @@ beforeEach(() => {})})-describe('ShareAccessPanel', () => {+describe('GrantAccessModal', () => {it('lists current grants for the entry', async () => {vi.mocked(api.listOrgGrants).mockResolvedValue({grants: [{ id: 'g1', pluginName: '@acme/db', granteeOrg: 'beta' }],})- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)expect(await screen.findByText('@beta')).toBeInTheDocument()// pluginName normalized to @acme/dbexpect(api.listOrgGrants).toHaveBeenCalledWith('@acme/db')})+ it('shows the eyebrow with the scoped pluginName', async () => {+ vi.mocked(api.listOrgGrants).mockResolvedValue({ grants: [] })+ render(<GrantAccessModal entryName="@acme/db" orgScope="acme" onClose={() => {}} />)+ expect(await screen.findByText(/sharing/i)).toBeInTheDocument()+ // The scoped plugin name appears in both the eyebrow and the field hint —+ // assert the eyebrow explicitly.+ expect(screen.getByText('Sharing', { exact: false }).closest('p')).toHaveTextContent('@acme/db')+ })+it('grant success: POSTs { pluginName, granteeOrg } then refetches', async () => {vi.mocked(api.listOrgGrants).mockResolvedValueOnce({ grants: [] })@@ -44,7 +53,7 @@ describe('ShareAccessPanel', () => {pluginName: '@acme/db',granteeOrg: 'beta',})- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)fireEvent.change(await screen.findByLabelText(/grantee org/i), { target: { value: 'beta' } })fireEvent.click(screen.getByRole('button', { name: /grant access/i }))await waitFor(() =>@@ -56,12 +65,12 @@ describe('ShareAccessPanel', () => {expect(await screen.findByText('@beta')).toBeInTheDocument()})- it('renders the typed error inline from the { error } body (grantee_not_found)', async () => {+ it('renders the typed error inline from the { code } body (grantee_not_found)', async () => {vi.mocked(api.listOrgGrants).mockResolvedValue({ grants: [] })vi.mocked(api.createOrgGrant).mockRejectedValue(Object.assign(new Error('x'), { status: 404, code: 'grantee_not_found' }))- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)fireEvent.change(await screen.findByLabelText(/grantee org/i), { target: { value: 'nope' } })fireEvent.click(screen.getByRole('button', { name: /grant access/i }))expect(await screen.findByText(/no org found with that slug/i)).toBeInTheDocument()@@ -72,7 +81,7 @@ describe('ShareAccessPanel', () => {vi.mocked(api.createOrgGrant).mockRejectedValue(Object.assign(new Error('x'), { status: 400, code: 'self_grant' }))- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)fireEvent.change(await screen.findByLabelText(/grantee org/i), { target: { value: 'acme' } })fireEvent.click(screen.getByRole('button', { name: /grant access/i }))expect(await screen.findByText(/your own org/i)).toBeInTheDocument()@@ -83,7 +92,7 @@ describe('ShareAccessPanel', () => {vi.mocked(api.createOrgGrant).mockRejectedValue(Object.assign(new Error('x'), { status: 400, code: 'plugin_public' }))- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)fireEvent.change(await screen.findByLabelText(/grantee org/i), { target: { value: 'beta' } })fireEvent.click(screen.getByRole('button', { name: /grant access/i }))expect(await screen.findByText(/public/i)).toBeInTheDocument()@@ -94,11 +103,56 @@ describe('ShareAccessPanel', () => {.mockResolvedValueOnce({ grants: [{ id: 'g1', pluginName: '@acme/db', granteeOrg: 'beta' }] }).mockResolvedValueOnce({ grants: [] })vi.mocked(api.revokeOrgGrant).mockResolvedValue(undefined)- render(<ShareAccessPanel entryName="db" orgScope="acme" />)+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)fireEvent.click(await screen.findByRole('button', { name: /revoke/i }))await waitFor(() => {expect(api.revokeOrgGrant).toHaveBeenCalledWith('g1')expect(api.listOrgGrants).toHaveBeenCalledTimes(2)})})++ it('closes when the close button is clicked', async () => {+ vi.mocked(api.listOrgGrants).mockResolvedValue({ grants: [] })+ const onClose = vi.fn()+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={onClose} />)+ await screen.findByLabelText(/grantee org/i)+ // The footer "Close" button is distinct from the icon close button (which+ // uses aria-label="Close"); match by visible text to disambiguate.+ fireEvent.click(screen.getByText('Close', { selector: 'button' }))+ expect(onClose).toHaveBeenCalledTimes(1)+ })++ it('closes when Escape is pressed', async () => {+ vi.mocked(api.listOrgGrants).mockResolvedValue({ grants: [] })+ const onClose = vi.fn()+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={onClose} />)+ await screen.findByLabelText(/grantee org/i)+ fireEvent.keyDown(window, { key: 'Escape' })+ expect(onClose).toHaveBeenCalledTimes(1)+ })++ it('Enter in the grantee input submits the grant', async () => {+ vi.mocked(api.listOrgGrants).mockResolvedValue({ grants: [] })+ vi.mocked(api.createOrgGrant).mockResolvedValue({+ id: 'g1',+ pluginName: '@acme/db',+ granteeOrg: 'beta',+ })+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)+ const input = await screen.findByLabelText(/grantee org/i)+ fireEvent.change(input, { target: { value: 'beta' } })+ fireEvent.keyDown(input, { key: 'Enter' })+ await waitFor(() =>+ expect(api.createOrgGrant).toHaveBeenCalledWith({+ pluginName: '@acme/db',+ granteeOrg: 'beta',+ })+ )+ })++ it('shows retry banner when grant list fails to load', async () => {+ vi.mocked(api.listOrgGrants).mockRejectedValue(new Error('boom'))+ render(<GrantAccessModal entryName="db" orgScope="acme" onClose={() => {}} />)+ expect(await screen.findByRole('button', { name: /retry/i })).toBeInTheDocument()+ })})diff --git a/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsxindex f3eda8eee..fb5e24d43 100644--- a/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx+++ b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx@@ -72,7 +72,7 @@ afterEach(() => {})describe('LlmDiscoveryPanel merged lifecycle workflow', () => {- it('keeps discovery review and stale models visually distinct and grouped by provider', async () => {+ it('groups discovery review by provider and excludes stale rows', async () => {render(<LlmDiscoveryPanelitems={[reviewModel, staleModel]}@@ -82,14 +82,10 @@ describe('LlmDiscoveryPanel merged lifecycle workflow', () => {)expect(screen.getByText('Discovery review (1)')).toBeInTheDocument()- expect(screen.getByText('Stale models (1)')).toBeInTheDocument()expect(screen.getByText(/Newly synced models land here disabled/)).toBeInTheDocument()- expect(screen.getByText(/never auto-disabled or auto-removed/)).toBeInTheDocument()const reviewGroup = screen.getByRole('button', { name: 'Expand OpenAI review models' })- const staleGroup = screen.getByRole('button', { name: 'Expand Anthropic stale models' })expect(reviewGroup).toHaveAttribute('aria-expanded', 'false')- expect(staleGroup).toHaveAttribute('aria-expanded', 'false')expect(screen.queryByText('gpt-5')).toBeNull()expect(screen.queryByText('claude-retired')).toBeNull()@@ -116,18 +112,16 @@ describe('LlmDiscoveryPanel merged lifecycle workflow', () => {expect(onRefresh).toHaveBeenCalledTimes(1)})- it('always renders an explicit empty stale state', () => {+ it('does not render a dedicated stale-model management section', () => {render(<LlmDiscoveryPanel- items={[reviewModel]}+ items={[reviewModel, staleModel]}loading={false}onRefresh={vi.fn().mockResolvedValue(undefined)}/>)- expect(screen.getByText('Stale models (0)')).toBeInTheDocument()- expect(- screen.getByText('No stale models. Every discovered row was present in the latest live sync.')- ).toBeInTheDocument()+ expect(screen.queryByText(/Stale models/)).toBeNull()+ expect(screen.queryByRole('button', { name: /Anthropic stale models/ })).toBeNull()})})diff --git a/control-ui/components/__tests__/LlmModelTable.test.tsx b/control-ui/components/__tests__/LlmModelTable.test.tsxindex 0a39007fa..0f22e9304 100644--- a/control-ui/components/__tests__/LlmModelTable.test.tsx+++ b/control-ui/components/__tests__/LlmModelTable.test.tsx@@ -168,6 +168,14 @@ describe('LlmModelTable provider groups', () => {)})+ it('surfaces stale counts in the collapsed provider summary', () => {+ renderTable([{ ...baseModel, source: 'discovery', stale: true }])++ expect(screen.getByRole('button', { name: 'Expand Anthropic models' })).toHaveTextContent(+ '1 stale'+ )+ })+it('opens matching groups while searching and shows the match count', () => {renderTable([baseModel,diff --git a/control-ui/components/__tests__/OwnedEntries.test.tsx b/control-ui/components/__tests__/OwnedEntries.test.tsxindex 960ff3244..bc352e724 100644--- a/control-ui/components/__tests__/OwnedEntries.test.tsx+++ b/control-ui/components/__tests__/OwnedEntries.test.tsx@@ -6,7 +6,7 @@ import { ToastProvider } from '../Toast'vi.mock('../../lib/api', () => ({getOwnedRegistryEntries: vi.fn(),- // ShareAccessPanel deps (rendered lazily on expand):+ // GrantAccessModal deps (mounted lazily when Share access is clicked):listOrgGrants: vi.fn().mockResolvedValue({ grants: [] }),createOrgGrant: vi.fn(),revokeOrgGrant: vi.fn(),@@ -92,13 +92,29 @@ describe('OwnedEntries', () => {expect(screen.getByText(/no grant needed/i)).toBeInTheDocument()})- it('expanding Share access mounts the grants panel', async () => {+ it('clicking Share access opens the Grant access modal', async () => {vi.mocked(api.getOwnedRegistryEntries).mockResolvedValue({data: [{ name: '@acme/db', version: '1.0.0', visibility: 'private', status: 'published' }],})render(<OwnedEntries orgScope="acme" />)+ // Modal is not in the DOM until the button is clicked.+ expect(screen.queryByRole('dialog')).toBeNull()fireEvent.click(await screen.findByRole('button', { name: /share access/i }))+ expect(await screen.findByRole('dialog', { name: /grant access/i })).toBeInTheDocument()expect(await screen.findByLabelText(/grantee org/i)).toBeInTheDocument()+ expect(api.listOrgGrants).toHaveBeenCalledWith('@acme/db')+ })++ it('closing the modal unmounts it from the DOM', async () => {+ vi.mocked(api.getOwnedRegistryEntries).mockResolvedValue({+ data: [{ name: '@acme/db', version: '1.0.0', visibility: 'private', status: 'published' }],+ })+ render(<OwnedEntries orgScope="acme" />)+ fireEvent.click(await screen.findByRole('button', { name: /share access/i }))+ expect(await screen.findByRole('dialog', { name: /grant access/i })).toBeInTheDocument()+ // Disambiguate from the icon close button (aria-label="Close") using text.+ fireEvent.click(screen.getByText('Close', { selector: 'button' }))+ expect(screen.queryByRole('dialog', { name: /grant access/i })).toBeNull()})it('empty state when no owned entries', async () => {diff --git a/control-ui/components/__tests__/PublisherView.test.tsx b/control-ui/components/__tests__/PublisherView.test.tsxindex f5f8b114d..eb318493e 100644--- a/control-ui/components/__tests__/PublisherView.test.tsx+++ b/control-ui/components/__tests__/PublisherView.test.tsx@@ -14,6 +14,9 @@ vi.mock('../PublisherView/GrantedToMe', () => ({vi.mock('../PublisherView/DockerCredentials', () => ({DockerCredentialsPanel: () => <div>docker-credentials-panel</div>,}))+vi.mock('../RegistryApiKeysPanel', () => ({+ default: () => <div>api-keys-panel</div>,+}))vi.mock('../../lib/hooks/usePublishScope', async orig => {const actual = await orig<typeof import('../../lib/hooks/usePublishScope')>()return { ...actual, usePublishScope: vi.fn() }@@ -93,6 +96,16 @@ describe('PublisherView', () => {expect(screen.getByText('docker-credentials-panel')).toBeInTheDocument()})+ it('renders API-key management on the API keys tab', () => {+ vi.mocked(hook.usePublishScope).mockReturnValue({+ scope: { scope: 'acme', curator: false, orgName: 'Acme' },+ loading: false,+ error: false,+ })+ render(<PublisherView activeTab="api-keys" />)+ expect(screen.getByText('api-keys-panel')).toBeInTheDocument()+ })+it('renders the granted-to-me panel on the shared tab', () => {vi.mocked(hook.usePublishScope).mockReturnValue({scope: { scope: 'acme', curator: false, orgName: 'Acme' },@@ -112,6 +125,10 @@ describe('PublisherView', () => {render(<PublisherView activeTab="entries" />)const shared = screen.getByRole('tab', { name: /shared with me/i })expect(shared).toHaveAttribute('href', '/publisher/shared-with-me')+ expect(screen.getByRole('tab', { name: /^api keys$/i })).toHaveAttribute(+ 'href',+ '/publisher/api-keys'+ )})it('hides the "Shared with me" tab when inbound grants are unavailable (403)', () => {@@ -129,6 +146,7 @@ describe('PublisherView', () => {expect(screen.queryByRole('tab', { name: /shared with me/i })).toBeNull()expect(screen.getByRole('tab', { name: /published entries/i })).toBeInTheDocument()expect(screen.getByRole('tab', { name: /docker credentials/i })).toBeInTheDocument()+ expect(screen.getByRole('tab', { name: /^api keys$/i })).toBeInTheDocument()})it('shows the "Shared with me" tab when inbound grants are available', () => {diff --git a/control-ui/components/__tests__/RegistryCatalog.test.tsx b/control-ui/components/__tests__/RegistryCatalog.test.tsxindex 22023aea7..388a16f65 100644--- a/control-ui/components/__tests__/RegistryCatalog.test.tsx+++ b/control-ui/components/__tests__/RegistryCatalog.test.tsx@@ -159,7 +159,7 @@ describe('RegistryCatalog tabs and columns', () => {}})- it('provides canonical tabs for connectors and plugins', async () => {+ it('shows only the connectors Marketplace tab', async () => {mockApiSuccess()render(<RegistryCatalog />)await screen.findByText('brave-search')@@ -168,10 +168,7 @@ describe('RegistryCatalog tabs and columns', () => {'href','/marketplace/connectors')- expect(screen.getByRole('tab', { name: 'Plugins' })).toHaveAttribute(- 'href',- '/marketplace/plugins'- )+ expect(screen.queryByRole('tab', { name: 'Plugins' })).not.toBeInTheDocument()})it('links entry names to their shareable detail routes', async () => {@@ -322,13 +319,6 @@ describe('RegistryCatalog controls', () => {expect(navigation.push).toHaveBeenCalledWith('/marketplace/publish?type=recipe')})- it('routes to canonical API-key management', async () => {- mockApiSuccess()- render(<RegistryCatalog />)-- fireEvent.click(await screen.findByRole('button', { name: /manage api keys/i }))- expect(navigation.push).toHaveBeenCalledWith('/marketplace/keys')- })})describe('RegistryCatalog state handling', () => {diff --git a/control-ui/components/__tests__/RegistryInstallForm.test.tsx b/control-ui/components/__tests__/RegistryInstallForm.test.tsxindex 16a4b0e94..63e4b5d78 100644--- a/control-ui/components/__tests__/RegistryInstallForm.test.tsx+++ b/control-ui/components/__tests__/RegistryInstallForm.test.tsx@@ -88,7 +88,7 @@ describe('RegistryInstallForm -- pending connector credentials', () => {await waitFor(() => {expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled()})- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByText('Configuration'))expect(await screen.findByText(/Leave all credential fields empty to install now/i)@@ -111,13 +111,30 @@ describe('RegistryInstallForm -- server name default', () => {const scopedEntry = { ...MOCK_ENTRY, name: '@test-oss-jose/helloo' }render(<RegistryInstallForm entry={scopedEntry} onCancel={vi.fn()} onInstalled={vi.fn()} />)- // Advance from step 0 (review) to step 1 (name & credentials).+ // Configuration is deliberately collapsed on the Package step.await waitFor(() => expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled())- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByText('Configuration'))const nameInput = (await screen.findByLabelText('Server name')) as HTMLInputElement// `@test-oss-jose/helloo` sanitized to a valid RFC 1123 label — no manual fix.expect(nameInput.value).toBe('test-oss-jose-helloo')expect(screen.queryByText(/Must be a valid K8s name/i)).toBeNull()})++ it('keeps configuration collapsed and shows only Package and Install flow steps', async () => {+ const { container } = render(+ <RegistryInstallForm entry={MOCK_ENTRY} onCancel={vi.fn()} onInstalled={vi.fn()} />+ )++ await waitFor(() => expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled())++ const configuration = container.querySelector('details.cu-registry-install-configuration')+ expect(configuration).not.toBeNull()+ expect(configuration).not.toHaveAttribute('open')+ expect(screen.getByRole('button', { name: /Package/ })).toBeInTheDocument()+ expect(screen.getByRole('button', { name: /Install/ })).toBeInTheDocument()+ expect(screen.queryByRole('button', { name: /Configure/ })).not.toBeInTheDocument()+ expect(screen.queryByRole('button', { name: /Network/ })).not.toBeInTheDocument()+ expect(screen.queryByText('high')).not.toBeInTheDocument()+ })})diff --git a/control-ui/components/__tests__/Sidebar.test.tsx b/control-ui/components/__tests__/Sidebar.test.tsxindex 0fe748fe5..d84f8849b 100644--- a/control-ui/components/__tests__/Sidebar.test.tsx+++ b/control-ui/components/__tests__/Sidebar.test.tsx@@ -128,6 +128,17 @@ describe('Sidebar publisher gating', () => {}})+ it('uses the folder glyph for the Directories group', () => {+ vi.mocked(hook.usePublishScope).mockReturnValue({ scope: null, loading: false, error: false })+ render(<Sidebar currentTab="directories" />)++ const directories = screen.getByRole('button', { name: 'Directories' })+ expect(directories.querySelector('.cu-sidebar__icon path')).toHaveAttribute(+ 'd',+ 'M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z'+ )+ })+it('hides Agent Files from the sidebar without changing its route', () => {vi.mocked(hook.usePublishScope).mockReturnValue({ scope: null, loading: false, error: false })navigationState.pathname = '/agent-files/example'diff --git a/control-ui/e2e/qa-recorder-llm-models.spec.ts b/control-ui/e2e/qa-recorder-llm-models.spec.tsindex 698e14eb5..00fef6fdf 100644--- a/control-ui/e2e/qa-recorder-llm-models.spec.ts+++ b/control-ui/e2e/qa-recorder-llm-models.spec.ts@@ -22,13 +22,14 @@ test.describe('optional QA recorder: Control UI LLM models and secrets', () => {const mainNav = page.getByRole('navigation', { name: 'Main sections' })- // (1) Unified LLM Models inventory. Catalog, Discovery Review, and Stale- // Models now share this direct sidebar destination.+ // (1) Unified LLM Models surface. Catalog and Discovery Review use+ // route-backed tabs under the same direct sidebar destination.await mainNav.getByRole('link', { name: 'LLM Models', exact: true }).click()await expect(page).toHaveURL(/\/llm-models/, { timeout: 20_000 })await expect(page.getByText('Context window').first()).toBeVisible({ timeout: 20_000 })- await expect(page.getByText(/Discovery review/)).toBeVisible({ timeout: 20_000 })- await expect(page.getByText(/Stale models/)).toBeVisible({ timeout: 20_000 })+ await expect(page.getByRole('tab', { name: 'Discovery review' })).toBeVisible({+ timeout: 20_000,+ })await screenshotAndLog(page, testInfo, 'control-ui-llm-models')// (2) Secrets management (LLM scope). 'Secrets' is a direct sidebar link todiff --git a/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts b/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.tsindex 40696aa53..94f820b40 100644--- a/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts+++ b/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts@@ -1,6 +1,6 @@// control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts//-// Optional headful QA recorder journey for the Control UI Marketplace ->+// Optional headful QA recorder journey for the Control UI Publisher ->// registry API keys panel. MUTATING: it creates a publish-scoped API key,// drives the one-time reveal modal, then revokes the key from the table and// best-effort revokes it through the Control API in finally. Requires@@ -41,11 +41,11 @@ async function waitForKeyId(request: APIRequestContext, description: string): Prthrow new Error(`Created API key "${description}" did not appear through Control API.`)}-test.describe('optional QA recorder: Control UI marketplace API keys', () => {- test('Marketplace API key — create, reveal, revoke', async ({ page }, testInfo) => {+test.describe('optional QA recorder: Control UI publisher API keys', () => {+ test('Publisher API key — create, reveal, revoke', async ({ page }, testInfo) => {requireRecorderConfirm('QA_RECORDER_CONFIRM_MUTATIONS',- 'This journey creates and revokes a marketplace API key.'+ 'This journey creates and revokes a publisher API key.')assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)@@ -57,7 +57,7 @@ test.describe('optional QA recorder: Control UI marketplace API keys', () => {try {await loginThroughUi(page, credentials)- await page.goto(`${CONTROL_UI_URL}/marketplace/keys`)+ await page.goto(`${CONTROL_UI_URL}/publisher/api-keys`)// The "+ Create key" CTA only renders once the panel reaches its ready// state, so it doubles as the shell + readiness assertion.await expect(page.getByRole('button', { name: '+ Create key', exact: true })).toBeVisible({@@ -102,7 +102,7 @@ test.describe('optional QA recorder: Control UI marketplace API keys', () => {await confirmDialog.getByRole('button', { name: 'Revoke', exact: true }).click()await expect(page.getByText(description)).toBeHidden({ timeout: 20_000 })- await screenshotAndLog(page, testInfo, 'control-ui-marketplace-api-keys')+ await screenshotAndLog(page, testInfo, 'control-ui-publisher-api-keys')} finally {const id = keyId || (await findKeyId(page.request, description))if (id) {diff --git a/control-ui/e2e/qa-recorder-navigation.spec.ts b/control-ui/e2e/qa-recorder-navigation.spec.tsindex 69eb0ef5a..f5ea1b626 100644--- a/control-ui/e2e/qa-recorder-navigation.spec.ts+++ b/control-ui/e2e/qa-recorder-navigation.spec.ts@@ -65,8 +65,8 @@ test.describe('optional QA recorder: Control UI navigation', () => {).toBeVisible({ timeout: 20_000 })await screenshotAndLog(page, testInfo, 'control-ui-navigation-external-channels')- // 5) LLM Models — Catalog, Discovery Review, and Stale Models share one- // canonical operator surface, so the sidebar uses one direct link.+ // 5) LLM Models — Catalog and Discovery Review share one tabbed operator+ // surface, so the sidebar uses one direct link.await mainNav.getByRole('link', { name: 'LLM Models', exact: true }).click()await expect(page).toHaveURL(/\/llm-models/, { timeout: 20_000 })// The subtitle is long; anchor on a unique leading substring.diff --git a/control-ui/e2e/registry-install.spec.ts b/control-ui/e2e/registry-install.spec.tsindex 2c2f545fb..d1c507278 100644--- a/control-ui/e2e/registry-install.spec.ts+++ b/control-ui/e2e/registry-install.spec.ts@@ -533,9 +533,9 @@ async function openRegistryInstallPackage(page: Page, entryName: string): Promis}async function continueToRegistryInstallForm(page: Page) {- await page.getByRole('button', { name: 'Continue' }).click()const installForm = page.locator('form').filter({ has: page.locator('#ri-name') })await expect(installForm).toBeVisible({ timeout: 10_000 })+ await installForm.locator('summary', { hasText: 'Configuration' }).click()return installForm}@@ -558,10 +558,6 @@ async function submitRegistryInstallForm(await credentialInputs.nth(i).fill('e2e-test-value')}await installForm.getByRole('button', { name: 'Continue' }).click()- await expect(page.getByRole('heading', { name: 'Network egress' })).toBeVisible({- timeout: 10_000,- })- await page.getByRole('button', { name: 'Continue' }).click()await expect(page.getByText(`Connector ${serverName} will be installed`)).toBeVisible({timeout: 10_000,})@@ -1398,9 +1394,9 @@ test.describe('H. Control-UI Smoke Tests', () => {await expect(page.getByText('Install Connector from Marketplace')).toBeVisible({timeout: 5_000,})- await page.getByRole('button', { name: 'Continue' }).click()const installForm = page.locator('form').filter({ has: page.locator('#ri-name') })await expect(installForm).toBeVisible({ timeout: 10_000 })+ await installForm.locator('summary', { hasText: 'Configuration' }).click()// Fill formconst nameInput = installForm.locator('#ri-name')@@ -1419,10 +1415,6 @@ test.describe('H. Control-UI Smoke Tests', () => {// Submitawait installForm.getByRole('button', { name: 'Continue' }).click()- await expect(page.getByRole('heading', { name: 'Network egress' })).toBeVisible({- timeout: 10_000,- })- await page.getByRole('button', { name: 'Continue' }).click()await expect(page.getByText(`Connector ${serverName} will be installed`)).toBeVisible({timeout: 10_000,})@@ -2166,10 +2158,9 @@ test.describe('J. Operator Egress Editor Journeys', () => {await expect(page.getByText('Install Connector from Marketplace')).toBeVisible({timeout: 10_000,})- await page.getByRole('button', { name: 'Continue' }).click()-const installForm = page.locator('form')await expect(installForm).toBeVisible({ timeout: 10_000 })+ await installForm.locator('summary', { hasText: 'Configuration' }).click()await expect(installForm.locator('#ri-name')).toBeVisible({ timeout: 10_000 })await installForm.locator('#ri-name').fill(deferredMcpServerName)await installForm.locator('#ri-context').selectOption('context1')@@ -2177,12 +2168,6 @@ test.describe('J. Operator Egress Editor Journeys', () => {installForm.getByText(/Leave all credential fields empty to install now/)).toBeVisible()await installForm.getByRole('button', { name: 'Continue' }).click()- await expect(- installForm.getByText(- 'Review and adjust the egress contract that will be installed from this'- )- ).toBeVisible({ timeout: 10_000 })- await installForm.getByRole('button', { name: 'Continue' }).click()await expect(page.getByText(`Connector ${deferredMcpServerName} will be installed`)).toBeVisible({ timeout: 10_000 })diff --git a/control-ui/e2e/support/gfs-resource-crud-journey.test.ts b/control-ui/e2e/support/gfs-resource-crud-journey.test.tsindex 0e9c5a262..d936f2d3c 100644--- a/control-ui/e2e/support/gfs-resource-crud-journey.test.ts+++ b/control-ui/e2e/support/gfs-resource-crud-journey.test.ts@@ -176,7 +176,7 @@ export async function exerciseGfsResourceCrudJourney({await page.getByRole('navigation', { name: 'Breadcrumb' })- .getByRole('button', { name: 'main', exact: true })+ .getByRole('button', { name: 'Drive main', exact: true }).click()await expect(folderRow(fixture.name)).toBeVisible({ timeout: 20_000 })await folderRow(fixture.name)diff --git a/control-ui/lib/__tests__/registryPublisherApi.test.ts b/control-ui/lib/__tests__/registryPublisherApi.test.tsindex a1d875aff..fc3adf606 100644--- a/control-ui/lib/__tests__/registryPublisherApi.test.ts+++ b/control-ui/lib/__tests__/registryPublisherApi.test.ts@@ -104,7 +104,7 @@ describe('registry publisher api', () => {// Field-naming tolerance: the control-api proxy forwards registry items// verbatim, and the registry catalog convention is snake_case. The wrappers- // must normalize either casing to canonical camelCase so ShareAccessPanel's+ // must normalize either casing to canonical camelCase so GrantAccessModal's// pluginName filter and the grant rows don't silently break.it('listOrgGrants normalizes snake_case grant items to camelCase', async () => {fetchMock.mockResolvedValueOnce(diff --git a/control-ui/lib/api.ts b/control-ui/lib/api.tsindex 70aa73874..4123b420a 100644--- a/control-ui/lib/api.ts+++ b/control-ui/lib/api.ts@@ -2880,7 +2880,7 @@ export type GrantedToMeItem = {// tests, so normalize defensively here — accept camelCase OR snake_case — and// hand components one canonical camelCase shape. This keeps the mocked→live// transition safe regardless of which the registry emits, and avoids silent-// empty lists (ShareAccessPanel filters on pluginName) or "@undefined" rows.+// empty lists (GrantAccessModal filters on pluginName) or "@undefined" rows.type RawOrgGrant = {id?: stringpluginName?: stringdiff --git a/docs/concepts/publisher-and-marketplace.md b/docs/concepts/publisher-and-marketplace.mdindex dd5350f14..826350cd8 100644--- a/docs/concepts/publisher-and-marketplace.md+++ b/docs/concepts/publisher-and-marketplace.md@@ -79,15 +79,15 @@ The **Marketplace** is the catalog surface — what every authenticated admin in- **Browse** — `/marketplace`. Search/filter by category, mode, transport. Shows public entries from every org.- **Install** — `/marketplace/install`. Pick an entry, supply credentials if the entry has a credential schema, hit `POST /admin/registry/install` (or `/install-recipe` for plugins). control-api materializes the K8s resource and tags it with `clerum.io/catalog-id` annotations.- **Detail** — `/marketplace/entries/[name]/[version]`. View metadata, version history, install instructions.-- **Manage API keys** — `/marketplace/keys`. Generate `efrk_...` keys for CI publishing.- **Connect** — `/marketplace/connect`. Self-hosted deploys only — bind your deploy to an org.### 4. Publisher-The **Publisher** is the *owner-only* surface. Once your deploy is org-bound, a "Publisher" entry appears in the sidebar with three tabs:+The **Publisher** is the *owner-only* surface. Once your deploy is org-bound, a "Publisher" entry appears in the sidebar with four tabs:- **Published entries** (`/publisher/entries`) — your org's entries. Expand a row to share it with another org (cross-org grant).- **Docker credentials** (`/publisher/credentials`) — mint a `efrk_` API key + docker config so CI can `docker push` images for local-mode connectors.+- **API keys** (`/publisher/api-keys`) — create, scope, expire, and revoke `efrk_` keys for CI and scripts.- **Shared with me** (`/publisher/shared-with-me`) — entries other orgs have granted to yours.The whole surface is hidden in the sidebar if your deploy isn't org-bound, or if `CONTROL_API_PUBLISHER_UI_ENABLED=false`.diff --git a/docs/llm-providers/README.md b/docs/llm-providers/README.mdindex 5245ad814..75de54a83 100644--- a/docs/llm-providers/README.md+++ b/docs/llm-providers/README.md@@ -232,11 +232,11 @@ to the `clerum-llm-allowed-models` ConfigMap for the runtime.- **Fail-closed**: a row must exist and be `enabled`. A provider with no enabledrows is unusable and flagged in the wizard.-- **Discovery review**: `/llm-models` combines the authoritative catalog,- discovery review queue, and stale-model triage in one operator surface. A+- **Discovery review**: `/llm-models` and `/llm-models/discovery` are the+ route-backed Catalog and Discovery Review tabs of one operator surface. Amodels.dev sync still lands rows as **disabled** for the operator to curate —- it never auto-enables anything. The legacy `/llm-models/discovery` URL- redirects to this merged surface.+ it never auto-enables anything. Models missing from the latest live catalog+ remain in Catalog with a **Stale** row indicator and provider-level stale count.- **Deployed resources are never interrupted.** If a model falls out of theallowlist, running Hosts keep working (a `WARN` plus a metric, marked "out ofallowlist" in the UI). Hard enforcement applies only to _new_ selections: hostdiff --git a/docs/surfaces/control-ui.md b/docs/surfaces/control-ui.mdindex 1d2ccf0e1..9affc1e2e 100644--- a/docs/surfaces/control-ui.md+++ b/docs/surfaces/control-ui.md@@ -110,23 +110,23 @@ caveat to the heading: the `GlobalFileSystem` CRD itself is applied out of band(kustomize), and the Global File System screen only manages the brokered gfsresources and grants inside it — it never writes that CR.-| Sidebar label | Route | CRD / control-api resource |-| ------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------- |-| Agent Files | `/agent-files` | `SharedFileSystem` |-| Agent Outputs | `/agent-outputs/recipe-artifacts` | outputs (non-CRD) |-| Agents | `/agents` | `Host` |-| Connectors | `/connectors` | `McpServer` |-| Contexts | `/contexts` | `Context` |-| Cost & Usage | `/cost-and-usage/usage`, `/cost-and-usage/llm-prices`, `/cost-and-usage/token-budgets` | cost (non-CRD) |-| External Channels | `/external-channels` | `CommunicationChannel` |-| Global File System | `/global-file-system` | gfs resources & grants (non-CRD) |-| LLM Models | `/llm-models` | model allowlist and discovery review (non-CRD) |-| Marketplace | `/marketplace/connectors` | registry (non-CRD) |-| Plugins | `/plugins` | `WorkflowRecipe` |-| Publisher | `/publisher` | publisher (non-CRD) |-| Secrets | `/secrets/llm` | secrets (non-CRD) |-| Settings | `/settings/ui` | settings (non-CRD) |-| Users & Teams | `/users-and-teams/users` | users/teams (non-CRD) |+| Sidebar label | Route | CRD / control-api resource |+| ------------------ | -------------------------------------------------------------------------------------- | ----------------------------------------------------- |+| Agent Files | `/agent-files` | `SharedFileSystem` |+| Agent Outputs | `/agent-outputs/recipe-artifacts` | outputs (non-CRD) |+| Agents | `/agents` | `Host` |+| Connectors | `/connectors` | `McpServer` |+| Contexts | `/contexts` | `Context` |+| Cost & Usage | `/cost-and-usage/usage`, `/cost-and-usage/llm-prices`, `/cost-and-usage/token-budgets` | cost (non-CRD) |+| External Channels | `/external-channels` | `CommunicationChannel` |+| Global File System | `/global-file-system` | gfs resources & grants (non-CRD) |+| LLM Models | `/llm-models`, `/llm-models/discovery` | tabbed model allowlist and discovery review (non-CRD) |+| Marketplace | `/marketplace/connectors` | registry (non-CRD) |+| Plugins | `/plugins` | `WorkflowRecipe` |+| Publisher | `/publisher` | publisher (non-CRD) |+| Secrets | `/secrets/llm` | secrets (non-CRD) |+| Settings | `/settings/ui` | settings (non-CRD) |+| Users & Teams | `/users-and-teams/users` | users/teams (non-CRD) |Secret **values are write-only from the UI**: the Secrets screen lets anadmin create or replace a value, but never displays one back.