Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat: improve control UI workflows
Miguelon Peluchonea4d1a74c4b8
diff --git a/control-ui/app/constants/connectorEdit.ts b/control-ui/app/constants/connectorEdit.tsindex dc60b27a7..bcecb49ee 100644--- a/control-ui/app/constants/connectorEdit.ts+++ b/control-ui/app/constants/connectorEdit.ts@@ -1,10 +1,11 @@-export const CONNECTOR_EDIT_DEFAULT_TAB = 'egress'+export const CONNECTOR_EDIT_DEFAULT_TAB = 'credentials'-export const CONNECTOR_EDIT_TABS = ['egress', 'credentials'] as const+export const CONNECTOR_EDIT_TABS = ['credentials', 'egress', 'context'] as constexport type ConnectorEditTab = (typeof CONNECTOR_EDIT_TABS)[number]export const CONNECTOR_EDIT_TAB_LABELS: Record<ConnectorEditTab, string> = {egress: 'External Egress',credentials: 'Credentials',+ context: 'Context',}diff --git a/control-ui/app/contexts/[name]/page.tsx b/control-ui/app/contexts/[name]/page.tsxindex ed60c1555..a669f8fb0 100644--- a/control-ui/app/contexts/[name]/page.tsx+++ b/control-ui/app/contexts/[name]/page.tsx@@ -45,7 +45,7 @@ import {} from '../../../lib/api'type ContextTab = 'connectors' | 'agent-files' | 'agents' | 'teams' | 'members'-const CONTEXT_TABS: ContextTab[] = ['connectors', 'agent-files', 'agents', 'teams', 'members']+const CONTEXT_TABS: ContextTab[] = ['connectors', 'agents', 'teams', 'members']const TAB_LABELS: Record<ContextTab, string> = {connectors: 'Connectors',diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex 43eb31d1c..88edcf83a 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -265,6 +265,11 @@ body.cu-body {max-width: min(28rem, 100%);}+.cu-connector-credentials-form {+ display: grid;+ gap: 0.75rem;+}+.cu-form-grid {display: grid;gap: var(--cu-space-3);@@ -2502,6 +2507,246 @@ textarea.cu-input {padding: var(--cu-space-3) var(--cu-space-4);}+.cu-registry-install-flow .cu-agent-form-stack--wide {+ max-width: 100%;+}++.cu-registry-context-access {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));+ gap: var(--cu-space-2);+ padding: var(--cu-space-2);+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius-sm);+ background: rgba(var(--cu-panel-rgb), 0.35);+}++.cu-registry-context-access__intro {+ display: grid;+ gap: 0.15rem;+ margin-top: var(--cu-space-1);+}++.cu-registry-context-access__intro > span {+ color: var(--cu-text-muted);+ font-size: 0.7rem;+ font-weight: 600;+ letter-spacing: 0.06em;+ text-transform: uppercase;+}++.cu-registry-context-access__intro > p {+ margin: 0;+ color: var(--cu-text-soft);+ font-size: 0.8125rem;+ line-height: 1.45;+}++.cu-registry-context-access__group {+ position: relative;+ display: grid;+ align-content: start;+ gap: var(--cu-space-2);+ min-width: 0;+ min-height: 7.75rem;+ padding: var(--cu-space-3);+ border: 1px solid var(--cu-border-subtle);+ border-radius: var(--cu-radius-sm);+ background:+ linear-gradient(145deg, rgba(var(--cu-accent-rgb), 0.09), transparent 52%),+ var(--cu-surface);+ overflow: hidden;+}++.cu-registry-context-access__group::before {+ position: absolute;+ top: 0;+ right: 0;+ left: 0;+ height: 2px;+ background: var(--cu-accent);+ content: '';+}++.cu-registry-context-access__group[data-kind='teams'] {+ background:+ linear-gradient(145deg, rgba(var(--cu-success-rgb), 0.1), transparent 52%),+ var(--cu-surface);+}++.cu-registry-context-access__group[data-kind='teams']::before {+ background: var(--cu-success);+}++.cu-registry-context-access__group[data-kind='agents'] {+ background:+ linear-gradient(145deg, rgba(var(--cu-warning-rgb), 0.1), transparent 52%),+ var(--cu-surface);+}++.cu-registry-context-access__group[data-kind='agents']::before {+ background: var(--cu-warning);+}++.cu-registry-context-access__heading {+ display: flex;+ align-items: baseline;+ justify-content: space-between;+ gap: var(--cu-space-2);+}++.cu-registry-context-access__heading h4 {+ margin: 0;+ color: var(--cu-text);+ font-size: 0.75rem;+ font-weight: 600;+ letter-spacing: 0.04em;+ text-transform: uppercase;+}++.cu-registry-context-access__heading span {+ display: inline-grid;+ place-items: center;+ min-width: 1.5rem;+ min-height: 1.5rem;+ padding: 0.1rem 0.4rem;+ border: 1px solid rgba(var(--cu-accent-rgb), 0.35);+ border-radius: 999px;+ background: rgba(var(--cu-accent-rgb), 0.14);+ color: var(--cu-text-muted);+ font-size: 0.75rem;+ font-variant-numeric: tabular-nums;+}++.cu-registry-context-access__group[data-kind='teams'] .cu-registry-context-access__heading span {+ border-color: rgba(var(--cu-success-rgb), 0.35);+ background: rgba(var(--cu-success-rgb), 0.12);+}++.cu-registry-context-access__group[data-kind='agents'] .cu-registry-context-access__heading span {+ border-color: rgba(var(--cu-warning-rgb), 0.35);+ background: rgba(var(--cu-warning-rgb), 0.12);+}++.cu-registry-context-access__list {+ display: grid;+ gap: var(--cu-space-1);+ max-height: 10rem;+ margin: 0;+ padding: 0;+ overflow: auto;+ color: var(--cu-text-soft);+ font-size: 0.8125rem;+ list-style: none;+}++.cu-registry-context-access__list li {+ display: flex;+ align-items: center;+ gap: 0.45rem;+ min-width: 0;+}++.cu-registry-context-access__list li::before {+ width: 0.35rem;+ height: 0.35rem;+ flex: 0 0 auto;+ border-radius: 999px;+ background: rgba(var(--cu-accent-rgb), 0.75);+ content: '';+}++.cu-registry-context-access__group[data-kind='teams'] .cu-registry-context-access__list li::before {+ background: rgba(var(--cu-success-rgb), 0.8);+}++.cu-registry-context-access__group[data-kind='agents'] .cu-registry-context-access__list li::before {+ background: rgba(var(--cu-warning-rgb), 0.8);+}++.cu-registry-context-access__list li > span {+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.cu-registry-context-access__group .cu-muted {+ margin: 0;+ font-size: 0.8125rem;+}++.cu-registry-install-access-summary {+ display: grid;+}++.cu-registry-install-access-summary__row {+ display: grid;+ grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);+ gap: var(--cu-space-3);+ padding: 0.65rem 0;+ border-top: 1px solid var(--cu-border-subtle);+ color: var(--cu-text-soft);+ font-size: 0.875rem;+}++.cu-registry-install-access-summary__row:first-child {+ padding-top: 0;+ border-top: 0;+}++.cu-registry-install-access-summary__row:last-child {+ padding-bottom: 0;+}++.cu-registry-install-access-summary__row strong {+ color: var(--cu-text);+ overflow-wrap: anywhere;+}++.cu-modal-panel--install-success {+ width: min(27rem, calc(100vw - (var(--cu-space-4) * 2)));+ justify-items: center;+ padding: 1.6rem;+ text-align: center;+}++.cu-registry-install-success__icon {+ display: grid;+ place-items: center;+ width: 3.25rem;+ height: 3.25rem;+ border: 1px solid rgba(var(--cu-success-rgb), 0.48);+ border-radius: 999px;+ background: rgba(var(--cu-success-rgb), 0.14);+ color: var(--cu-success);+}++.cu-registry-install-success__content {+ display: grid;+ gap: var(--cu-space-2);+}++.cu-registry-install-success__eyebrow {+ margin: 0;+ color: var(--cu-success);+ font-size: 0.7rem;+ font-weight: 600;+ letter-spacing: 0.06em;+ text-transform: uppercase;+}++.cu-modal-panel--install-success .cu-modal-copy {+ max-width: 23rem;+}++.cu-modal-panel__foot.cu-registry-install-success__actions {+ display: flex;+ justify-content: center;+ width: 100%;+ border-top: 0;+ padding-top: 0;+}+.cu-registry-trust-chip {border-radius: 4px;padding: 1px 6px;@@ -5054,6 +5299,19 @@ textarea.cu-input {background: var(--cu-bg-elevated);}+.cu-connector-edit-tabs {+ margin-inline: var(--cu-space-3);+}++.cu-connector-edit-context-name {+ margin: 0 0 var(--cu-space-3);+ color: var(--cu-text-muted);+}++.cu-connector-edit-context-name strong {+ color: var(--cu-text);+}+.cu-connector-edit-form {flex: 1;min-height: 0;diff --git a/control-ui/app/mcp-servers/[name]/edit/page.tsx b/control-ui/app/mcp-servers/[name]/edit/page.tsxindex da2caa36a..1e81ac3c3 100644--- a/control-ui/app/mcp-servers/[name]/edit/page.tsx+++ b/control-ui/app/mcp-servers/[name]/edit/page.tsx@@ -4,9 +4,12 @@ import React, { useCallback, useEffect, useState } from 'react'import { useParams, useRouter } from 'next/navigation'import { AuthGate } from '@components/AuthGate'import { FormSectionsSkeleton } from '@components/BodyLoadingSkeleton'-import { DetailPageShell } from '@components/DetailPageShell'+import { CreateFlowPanel } from '@components/CreateFlowPanel'+import { CreatePageHeader } from '@components/CreatePageHeader'+import { DashboardLayout } from '@components/DashboardLayout'import { EgressEditor } from '@components/EgressEditor'import { IconCable } from '@components/Sidebar/icons'+import { TabBar } from '@components/TabBar'import { useToast } from '@components/Toast'import { UpdateConnectorCredentials } from '@components/UpdateConnectorCredentials'import {@@ -16,7 +19,8 @@ import {type ConnectorEditTab,} from '@constants/connectorEdit'import { CONTROL_ROUTES } from '@constants/routes'-import { getMcpServer, updateMcpServer } from '@lib/api'+import { getAgentDisplayName } from '@lib/agentName'+import { getContextTeams, getContextUsers, getHosts, getMcpServer, updateMcpServer } from '@lib/api'import type { EgressBinding, EnvSecret, EnvSecretKeyMapping, McpServerResource } from '@lib/api'import type { EgressEditorStatus } from '@lib/egressModel'@@ -47,6 +51,32 @@ function parseConnectorEditTab(value: string | string[] | undefined): ConnectorEreturn CONNECTOR_EDIT_TABS.find(tab => tab === candidate) ?? CONNECTOR_EDIT_DEFAULT_TAB}+type ContextAccess = {+ agents: Array<{ id: string; label: string }>+ teams: Array<{ id: string; label: string }>+ users: Array<{ id: string; label: string }>+}++function resolveRegistryCredentialSource(+ metadata: McpServerResource['metadata'] | undefined+): { name: string; version: string } | undefined {+ const labels = (metadata?.labels ?? {}) as Record<string, unknown>+ const annotations = (metadata?.annotations ?? {}) as Record<string, unknown>+ const name = String(annotations['clerum.io/catalog-id'] ?? labels['clerum.io/catalog-id'] ?? '').trim()+ const version = String(+ annotations['clerum.io/catalog-version'] ?? labels['clerum.io/catalog-version'] ?? ''+ ).trim()+ return name && version ? { name, version } : undefined+}++const EMPTY_CONTEXT_ACCESS: ContextAccess = { agents: [], teams: [], users: [] }++const CONTEXT_ACCESS_GROUPS: Array<{ key: keyof ContextAccess; title: string }> = [+ { key: 'users', title: 'Users' },+ { key: 'teams', title: 'Teams' },+ { key: 'agents', title: 'Agents' },+]+export default function EditMcpServerPage() {const router = useRouter()const params = useParams<{ name: string; tab?: string | string[] }>()@@ -62,6 +92,9 @@ export default function EditMcpServerPage() {const [saveError, setSaveError] = useState('')const [egressBindings, setEgressBindings] = useState<EgressBinding[] | undefined>(undefined)const [egressStatus, setEgressStatus] = useState<EgressEditorStatus | null>(null)+ const [contextAccess, setContextAccess] = useState<ContextAccess>(EMPTY_CONTEXT_ACCESS)+ const [contextAccessError, setContextAccessError] = useState('')+ const [loadingContextAccess, setLoadingContextAccess] = useState(false)function backToList() {router.push(CONTROL_ROUTES.connectors.root)@@ -107,6 +140,66 @@ export default function EditMcpServerPage() {}}, [name])+ const contextRef =+ typeof server?.spec?.contextRef === 'string' ? server.spec.contextRef.trim() : ''++ useEffect(() => {+ if (!contextRef) {+ setContextAccess(EMPTY_CONTEXT_ACCESS)+ setContextAccessError('')+ setLoadingContextAccess(false)+ return+ }++ let cancelled = false+ setLoadingContextAccess(true)+ setContextAccessError('')++ void (async () => {+ const [usersResult, teamsResult, hostsResult] = await Promise.allSettled([+ getContextUsers(contextRef),+ getContextTeams(contextRef),+ getHosts(),+ ])+ if (cancelled) return++ const failed =+ usersResult.status === 'rejected' ||+ teamsResult.status === 'rejected' ||+ hostsResult.status === 'rejected'+ setContextAccess({+ users:+ usersResult.status === 'fulfilled'+ ? (usersResult.value.items ?? []).map(user => ({+ id: user.id,+ label: user.displayName || user.name || user.email || user.id,+ }))+ : [],+ teams:+ teamsResult.status === 'fulfilled'+ ? (teamsResult.value.items ?? []).map(team => ({ id: team.id, label: team.name }))+ : [],+ agents:+ hostsResult.status === 'fulfilled'+ ? (hostsResult.value.items ?? [])+ .filter(host => String(host.spec?.contextRef ?? '').trim() === contextRef)+ .map(host => {+ const agentName = host.metadata?.name || 'unknown'+ return { id: agentName, label: getAgentDisplayName(agentName) || agentName }+ })+ : [],+ })+ setContextAccessError(+ failed ? 'Some access information could not be loaded. The lists below may be incomplete.' : ''+ )+ setLoadingContextAccess(false)+ })()++ return () => {+ cancelled = true+ }+ }, [contextRef])+async function handleSave(event: React.FormEvent<HTMLFormElement>) {event.preventDefault()if (!server?.spec || saving || egressStatus?.errors.length) return@@ -132,103 +225,188 @@ export default function EditMcpServerPage() {const envSecret = server?.spec? resolveEnvSecret(server.spec as Record<string, unknown>): undefined+ const registryCredentialSource = resolveRegistryCredentialSource(server?.metadata)return (<AuthGate>- <DetailPageShell<ConnectorEditTab>- activeTab={activeTab}- backLabel="Back to connectors"- icon={<IconCable />}- onBack={backToList}- onTabChange={selectTab}- subtitle="Update external egress and rotate credentials for this connector."- tabAriaLabel="Connector edit sections"- tabClassName="cu-tabs--compact"- tabs={CONNECTOR_EDIT_TABS.map(tab => ({- value: tab,- label: CONNECTOR_EDIT_TAB_LABELS[tab],- href:- tab === CONNECTOR_EDIT_DEFAULT_TAB- ? CONTROL_ROUTES.connectors.edit(name)- : CONTROL_ROUTES.connectors.editTab(name, tab),- }))}- title={`Edit Connector: ${name}`}- error={loadError || undefined}- >- {loading ? (- activeTab === 'credentials' ? (- <div- role="status"- aria-busy="true"- aria-label="Loading connector credentials"- className="cu-body-loading-skeleton"- >- <section className="cu-body-loading-skeleton__section">- <span className="cu-skeleton cu-body-loading-skeleton__heading" />- <span className="cu-skeleton cu-body-loading-skeleton__line" />- <div className="cu-body-loading-skeleton__fields">- <span className="cu-skeleton cu-body-loading-skeleton__field" />- <span className="cu-skeleton cu-body-loading-skeleton__field" />- </div>- </section>- </div>- ) : (- <FormSectionsSkeleton label="Connector" primaryActionLabel="Save egress" sections={2} />- )- ) : server ? (- activeTab === 'credentials' ? (- <UpdateConnectorCredentials serverName={name} envSecret={envSecret} />- ) : (- <form className="cu-connector-edit-content" onSubmit={handleSave}>- <div className="cu-connector-edit-meta">- <div>- <strong>Image:</strong>{' '}- <code>{typeof server.spec?.image === 'string' ? server.spec.image : '-'}</code>- </div>- <div>- <strong>Context:</strong>{' '}- <code>- {typeof server.spec?.contextRef === 'string' ? server.spec.contextRef : '-'}- </code>- </div>+ <DashboardLayout isDetailPage>+ <CreateFlowPanel+ header={+ <CreatePageHeader+ icon={<IconCable />}+ title={`Edit Connector: ${name}`}+ subtitle="Review context access, rotate credentials, and update external egress for this connector."+ backLabel="Back to connectors"+ onBack={backToList}+ />+ }+ >+ <TabBar<ConnectorEditTab>+ ariaLabel="Connector edit sections"+ activeValue={activeTab}+ className="cu-tabs--compact cu-connector-edit-tabs"+ onChange={selectTab}+ options={CONNECTOR_EDIT_TABS.map(tab => ({+ value: tab,+ label: CONNECTOR_EDIT_TAB_LABELS[tab],+ href:+ tab === CONNECTOR_EDIT_DEFAULT_TAB+ ? CONTROL_ROUTES.connectors.edit(name)+ : CONTROL_ROUTES.connectors.editTab(name, tab),+ }))}+ />++ {loadError ? <div className="cu-banner cu-banner--error">{loadError}</div> : null}++ {loading ? (+ activeTab === 'credentials' ? (+ <div+ role="status"+ aria-busy="true"+ aria-label="Loading connector credentials"+ className="cu-connector-edit-form cu-body-loading-skeleton"+ >+ <section className="cu-body-loading-skeleton__section">+ <span className="cu-skeleton cu-body-loading-skeleton__heading" />+ <span className="cu-skeleton cu-body-loading-skeleton__line" />+ <div className="cu-body-loading-skeleton__fields">+ <span className="cu-skeleton cu-body-loading-skeleton__field" />+ <span className="cu-skeleton cu-body-loading-skeleton__field" />+ </div>+ </section>+ </div>+ ) : (+ <div className="cu-connector-edit-form">+ <FormSectionsSkeleton+ label="Connector"+ primaryActionLabel="Save egress"+ sections={2}+ /></div>+ )+ ) : server ? (+ activeTab === 'credentials' ? (+ <div className="cu-connector-edit-form">+ <UpdateConnectorCredentials+ serverName={name}+ envSecret={envSecret}+ registryCredentialSource={registryCredentialSource}+ />+ </div>+ ) : activeTab === 'context' ? (+ <div className="cu-connector-edit-form cu-connector-edit-content">+ <section className="cu-form-section" aria-labelledby="connector-context-title">+ <div className="cu-form-section__header">+ <h2 id="connector-context-title" className="cu-form-section__title">+ Context access+ </h2>+ <p className="cu-form-section__description">+ This connector is available in the context shown below. Context assignments+ cannot be changed here yet.+ </p>+ </div>- <EgressEditor- allowCidr- key={`${name}-${JSON.stringify(server.spec?.egressBindings ?? [])}`}- initialBindings={server.spec?.egressBindings as EgressBinding[] | undefined}- onChange={handleEgressChange}- title="External Egress"- description="Adjust only the external egress contract. Other connector settings are preserved."- />-- {saveError ? (- <div className="cu-banner cu-banner--error" role="alert">- {saveError}- </div>- ) : null}-- <div className="cu-create-actions">- <button- type="button"- className="cu-btn cu-btn--ghost"- disabled={saving}- onClick={backToList}- >- Cancel- </button>- <button- type="submit"- className="cu-btn cu-btn--primary"- disabled={saving || Boolean(egressStatus?.errors.length)}- >- {saving ? 'Saving...' : 'Save egress'}- </button>+ <p className="cu-connector-edit-context-name" aria-label="Connector context">+ Context: <strong>{contextRef || 'No context assigned'}</strong>+ </p>++ {contextRef ? (+ loadingContextAccess ? (+ <p className="cu-muted">Loading context access…</p>+ ) : (+ <>+ {contextAccessError ? (+ <p className="cu-banner cu-banner--warn" role="status">+ {contextAccessError}+ </p>+ ) : null}+ <section className="cu-registry-context-access" aria-label="Context access">+ {CONTEXT_ACCESS_GROUPS.map(group => (+ <section+ className="cu-registry-context-access__group"+ data-kind={group.key}+ key={group.key}+ >+ <div className="cu-registry-context-access__heading">+ <h4>{group.title}</h4>+ <span>{contextAccess[group.key].length}</span>+ </div>+ {contextAccess[group.key].length > 0 ? (+ <ul className="cu-registry-context-access__list">+ {contextAccess[group.key].map(principal => (+ <li key={principal.id}>+ <span>{principal.label}</span>+ </li>+ ))}+ </ul>+ ) : (+ <p className="cu-muted">+ No {group.title.toLowerCase()} have access.+ </p>+ )}+ </section>+ ))}+ </section>+ </>+ )+ ) : null}+ </section></div>- </form>- )- ) : null}- </DetailPageShell>+ ) : (+ <form+ className="cu-connector-edit-form cu-connector-edit-content"+ onSubmit={handleSave}+ >+ <div className="cu-connector-edit-meta">+ <div>+ <strong>Image:</strong>{' '}+ <code>{typeof server.spec?.image === 'string' ? server.spec.image : '-'}</code>+ </div>+ <div>+ <strong>Context:</strong>{' '}+ <code>+ {typeof server.spec?.contextRef === 'string' ? server.spec.contextRef : '-'}+ </code>+ </div>+ </div>++ <EgressEditor+ allowCidr+ key={`${name}-${JSON.stringify(server.spec?.egressBindings ?? [])}`}+ initialBindings={server.spec?.egressBindings as EgressBinding[] | undefined}+ onChange={handleEgressChange}+ title="External Egress"+ description="Adjust only the external egress contract. Other connector settings are preserved."+ />++ {saveError ? (+ <div className="cu-banner cu-banner--error" role="alert">+ {saveError}+ </div>+ ) : null}++ <div className="cu-create-actions">+ <button+ type="button"+ className="cu-btn cu-btn--ghost"+ disabled={saving}+ onClick={backToList}+ >+ Cancel+ </button>+ <button+ type="submit"+ className="cu-btn cu-btn--primary"+ disabled={saving || Boolean(egressStatus?.errors.length)}+ >+ {saving ? 'Saving...' : 'Save egress'}+ </button>+ </div>+ </form>+ )+ ) : null}+ </CreateFlowPanel>+ </DashboardLayout></AuthGate>)}diff --git a/control-ui/app/registry/install/page.tsx b/control-ui/app/registry/install/page.tsxindex b72c0f37b..5bf41568f 100644--- a/control-ui/app/registry/install/page.tsx+++ b/control-ui/app/registry/install/page.tsx@@ -657,7 +657,8 @@ function RegistryInstallPageContent() {<RegistryInstallFormentry={entry}onCancel={() => router.push(CONTROL_ROUTES.marketplace.root)}- onInstalled={() => router.push(CONTROL_ROUTES.marketplace.root)}+ onInstalled={() => undefined}+ onViewConnectors={() => router.push(CONTROL_ROUTES.connectors.root)}/>) : null}</CreateFlowPanel>diff --git a/control-ui/app/secrets/new/page.tsx b/control-ui/app/secrets/new/page.tsxindex 5ec75c2ad..093c581ee 100644--- a/control-ui/app/secrets/new/page.tsx+++ b/control-ui/app/secrets/new/page.tsx@@ -16,11 +16,13 @@ import { Button, Field, FormSection, SelectInput, TextInput } from '@components/import { CREATE_FLOW_LOADING } from '@constants/createFlowLoading'import { CONTROL_ROUTES } from '@constants/routes'import {+ type CredentialSchema,type RecipeSecretOwnership,apiSend,createMcpSecret,createRecipeSecret,getRecipes,+ getRegistryCredentialSchema,} from '@lib/api'import { createEmptyLlmKeyDraft, validateLlmSecretData } from '@lib/llm'@@ -29,7 +31,7 @@ const HOST_SECRET_LABEL_VALUE = 'true'const MCP_SECRET_NAME_PATTERN = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/type SecretScope = 'llm' | 'mcp' | 'recipe'-type SecretDraftRow = { id: string; secretKey: string; value: string }+type SecretDraftRow = { id: string; secretKey: string; value: string; label?: string }const STEPS = ['Secret', 'Values'] as const@@ -46,8 +48,8 @@ const STEP_DETAILS = [},] as const-function createSecretDraftRow(id: string, secretKey = '', value = ''): SecretDraftRow {- return { id, secretKey, value }+function createSecretDraftRow(id: string, secretKey = '', value = '', label?: string): SecretDraftRow {+ return { id, secretKey, value, label }}function CreateSecretPageContent() {@@ -72,11 +74,16 @@ function CreateSecretPageContent() {const [llmKeyDraft, setLlmKeyDraft] = useState<Record<string, string>>(createEmptyLlmKeyDraft)const prefillMcpName = scope === 'mcp' ? (searchParams.get('name') ?? '').trim() : ''+ const registryEntryName = scope === 'mcp' ? (searchParams.get('registryEntry') ?? '').trim() : ''+ const registryEntryVersion =+ scope === 'mcp' ? (searchParams.get('registryVersion') ?? '').trim() : ''const [mcpName, setMcpName] = useState(prefillMcpName)const [mcpRows, setMcpRows] = useState<SecretDraftRow[]>(() => [createSecretDraftRow('mcp-secret-row-0'),])const mcpNextRowId = useRef(1)+ const [mcpCredentialSchema, setMcpCredentialSchema] = useState<CredentialSchema | null>(null)+ const [mcpCredentialSchemaLoading, setMcpCredentialSchemaLoading] = useState(false)const prefillRecipeName = scope === 'recipe' ? (searchParams.get('name') ?? '').trim() : ''const prefillRecipeNamespace =@@ -138,6 +145,39 @@ function CreateSecretPageContent() {}}, [scope, prefillOwnerRecipe])+ useEffect(() => {+ if (!registryEntryName || !registryEntryVersion) {+ setMcpCredentialSchema(null)+ setMcpCredentialSchemaLoading(false)+ return+ }++ let cancelled = false+ setMcpCredentialSchemaLoading(true)+ void getRegistryCredentialSchema(registryEntryName, registryEntryVersion)+ .then(schema => {+ if (cancelled) return+ setMcpCredentialSchema(schema)+ if (schema.keys.length === 0) return+ setMcpRows(current => {+ if (current.some(row => row.secretKey.trim() || row.value.trim())) return current+ return schema.keys.map((key, index) =>+ createSecretDraftRow(`mcp-schema-row-${index}`, key.name, '', key.label || key.name)+ )+ })+ })+ .catch(() => {+ if (!cancelled) setMcpCredentialSchema(null)+ })+ .finally(() => {+ if (!cancelled) setMcpCredentialSchemaLoading(false)+ })++ return () => {+ cancelled = true+ }+ }, [registryEntryName, registryEntryVersion])+const llmCanSubmit = useMemo(() => {if (!llmName.trim()) return falsereturn Object.values(llmKeyDraft).some(value => value.trim().length > 0) && !saving@@ -146,10 +186,15 @@ function CreateSecretPageContent() {const mcpCanSubmit = useMemo(() => {if (!mcpName.trim()) return falseif (!MCP_SECRET_NAME_PATTERN.test(mcpName.trim()) || mcpName.trim().length > 253) return false- return (- mcpRows.some(row => row.secretKey.trim().length > 0 && row.value.trim().length > 0) && !saving+ const hasValues = mcpRows.some(+ row => row.secretKey.trim().length > 0 && row.value.trim().length > 0)- }, [mcpName, mcpRows, saving])+ const schemaComplete =+ !mcpCredentialSchema?.required ||+ mcpRows.length === mcpCredentialSchema.keys.length &&+ mcpRows.every(row => row.secretKey.trim().length > 0 && row.value.trim().length > 0)+ return hasValues && schemaComplete && !saving+ }, [mcpCredentialSchema, mcpName, mcpRows, saving])const recipeCanSubmit = useMemo(() => {if (!recipeName.trim()) return false@@ -457,46 +502,69 @@ function CreateSecretPageContent() {{step === 1 && scope === 'mcp' ? (<div className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide"><FormSection title="Secret values">- <div className="cu-form-grid">- {mcpRows.map((row, index) => (- <div className="cu-form-inline" key={row.id}>- <TextInput- monospace- value={row.secretKey}- onChange={event =>- updateMcpDraftRow(index, 'secretKey', event.target.value)- }- placeholder="API_KEY"- disabled={saving}- />- <TextInput- monospace- value={row.value}- onChange={event =>- updateMcpDraftRow(index, 'value', event.target.value)- }- placeholder="secret value"- type="password"- autoComplete="off"- disabled={saving}- />- <button- type="button"- className="cu-btn cu-btn--icon cu-btn--danger-icon"- onClick={() => removeMcpDraftRow(index)}- disabled={saving || mcpRows.length === 1}- aria-label={`Remove MCP secret key row ${index + 1}`}- title={`Remove MCP secret key row ${index + 1}`}- >- <IconX width={16} height={16} />- </button>+ {mcpCredentialSchemaLoading ? (+ <p className="cu-muted">Loading connector credential fields…</p>+ ) : mcpCredentialSchema?.keys.length ? (+ <div className="cu-form-stack">+ {mcpRows.map((row, index) => (+ <Field key={row.id} label={row.label || row.secretKey}>+ <TextInput+ value={row.value}+ onChange={event =>+ updateMcpDraftRow(index, 'value', event.target.value)+ }+ placeholder={row.label || 'Credential value'}+ type="password"+ autoComplete="off"+ disabled={saving}+ />+ </Field>+ ))}+ </div>+ ) : (+ <>+ <div className="cu-form-grid">+ {mcpRows.map((row, index) => (+ <div className="cu-form-inline" key={row.id}>+ <TextInput+ monospace+ value={row.secretKey}+ onChange={event =>+ updateMcpDraftRow(index, 'secretKey', event.target.value)+ }+ placeholder="API_KEY"+ disabled={saving}+ />+ <TextInput+ monospace+ value={row.value}+ onChange={event =>+ updateMcpDraftRow(index, 'value', event.target.value)+ }+ placeholder="secret value"+ type="password"+ autoComplete="off"+ disabled={saving}+ />+ <button+ type="button"+ className="cu-btn cu-btn--icon cu-btn--danger-icon"+ onClick={() => removeMcpDraftRow(index)}+ disabled={saving || mcpRows.length === 1}+ aria-label={`Remove MCP secret key row ${index + 1}`}+ title={`Remove MCP secret key row ${index + 1}`}+ >+ <IconX width={16} height={16} />+ </button>+ </div>+ ))}</div>- ))}- </div>- <Button type="button" size="sm" onClick={addMcpDraftRow} disabled={saving}>- Add key- </Button>+ <Button type="button" size="sm" onClick={addMcpDraftRow} disabled={saving}>+ Add key+ </Button>+ </>+ )}</FormSection></div>) : null}diff --git a/control-ui/components/CommunicationChannelsTable.tsx b/control-ui/components/CommunicationChannelsTable.tsxindex 30643a7c4..b596a6d51 100644--- a/control-ui/components/CommunicationChannelsTable.tsx+++ b/control-ui/components/CommunicationChannelsTable.tsx@@ -30,9 +30,7 @@ function summary(item: CommunicationChannelItem): string {const COMMUNICATION_CHANNEL_COLUMNS: TableHeaderColumn[] = [{ key: 'name', label: 'Name' },{ key: 'agent', label: 'Agent', width: '18%' },- { key: 'telegram', label: 'Telegram', width: '10%' },- { key: 'slack', label: 'Slack', width: '10%' },- { key: 'teams', label: 'Teams', width: '10%' },+ { key: 'type', label: 'Type', width: '18%' },{ key: 'actions', width: '7rem', align: 'right', ariaLabel: 'Actions' },]@@ -238,9 +236,10 @@ export function CommunicationChannelsTable({{filteredRows.map(({ key, item }) => {const name = item.metadata?.name || '-'const spec = item.spec || {}- const telegramCount = Array.isArray(spec.telegram) ? spec.telegram.length : 0- const slackCount = Array.isArray(spec.slack) ? spec.slack.length : 0- const teamsCount = Array.isArray(spec.teams) ? spec.teams.length : 0+ const configuredProviderTypes = configuredProviders(item)+ const providerTypes = COMMUNICATION_CHANNEL_PROVIDERS.filter(provider =>+ configuredProviderTypes.has(provider)+ )return (<React.Fragment key={key}><tr>@@ -257,9 +256,7 @@ export function CommunicationChannelsTable({<td><span className="cu-table__cell-muted">{spec.hostRef || '-'}</span></td>- <td>{telegramCount}</td>- <td>{slackCount}</td>- <td>{teamsCount}</td>+ <td>{providerTypes.map(communicationChannelProviderLabel).join(', ') || '-'}</td><td><div className="cu-table-actions"><CopyChannelMenudiff --git a/control-ui/components/ContextTable.tsx b/control-ui/components/ContextTable.tsxindex 7bece2246..a83afd6f4 100644--- a/control-ui/components/ContextTable.tsx+++ b/control-ui/components/ContextTable.tsx@@ -13,8 +13,7 @@ import { IconPencil, IconRefresh, IconX } from './icons'type ContextRef = { name: string }const CONTEXT_COLUMNS: TableHeaderColumn[] = [- { key: 'name', label: 'Context Name', minWidth: '7rem' },- { key: 'description', label: 'Description' },+ { key: 'name', label: 'Context Name' },{ key: 'servers', label: 'Connectors', width: '7rem' },{ key: 'actions', label: 'Actions', width: '8rem', align: 'right' },]@@ -122,7 +121,7 @@ export function ContextTable({<TableHeaderRow columns={CONTEXT_COLUMNS} /></thead><tbody>- <SkeletonTableRows columns={4} rows={4} />+ <SkeletonTableRows columns={CONTEXT_COLUMNS.length} rows={4} /></tbody></table></div>@@ -147,22 +146,10 @@ export function ContextTable({aria-label={`Open context ${name}`}><td>- <button- type="button"- className="cu-link"- onClick={event => {- event.stopPropagation()- openContext(name)- }}- onKeyDown={event => event.stopPropagation()}- >- {name}- </button>- </td>- <td style={{ color: 'var(--cu-text-soft)', maxWidth: '28rem' }}>- <span style={{ display: 'inline-block', verticalAlign: 'top' }}>+ <span className="cu-expandable-row__name">{name}</span>+ <div className="cu-registry-description" title={item.spec?.description || '—'}>{item.spec?.description || '—'}- </span>+ </div></td><td style={{ color: 'var(--cu-text-muted)', fontVariantNumeric: 'tabular-nums' }}>{mcpServers.length}diff --git a/control-ui/components/CreateMcpServerForm/index.tsx b/control-ui/components/CreateMcpServerForm/index.tsxindex b6f540ceb..04fad6444 100644--- a/control-ui/components/CreateMcpServerForm/index.tsx+++ b/control-ui/components/CreateMcpServerForm/index.tsx@@ -12,25 +12,34 @@ import {createMcpServer,deleteMcpSecret,getContext,+ getContextTeams,+ getContextUsers,getContexts,+ getHosts,listOrgImages,updateContext,} from '@/lib/api'import type { EnvSecretKeyMapping, EnvVar, OrgImage } from '@/lib/api'import type { EgressBinding } from '@/lib/api'import type { EgressEditorStatus } from '@/lib/egressModel'+import { getAgentDisplayName } from '@/lib/agentName'import { EgressEditor } from '../EgressEditor'import { DEFAULT_REGISTRY_HOST, buildImageCoordinate } from '../PublisherView/dockerCredential'import { MCP_SERVER_NAME_PATTERN, TRANSPORT_TYPES } from './constants'import type { CreateMcpServerFormProps, TransportType } from './types'-const STEPS = ['Connector', 'Secrets'] as const+const STEPS = ['Connector', 'Context', 'Secrets'] as constconst STEP_DETAILS = [{- description: 'Name, image, and context',+ description: 'Name, image, and runtime',title: 'Connector identity',- subtitle: 'Register the connector name, image, and Context allowlist target.',+ subtitle: 'Register the connector name, image, and runtime configuration.',+ },+ {+ description: 'Choose connector access',+ title: 'Context',+ subtitle: 'Choose where this connector will be available and review who can use it.',},{description: 'Environment and credentials',@@ -39,6 +48,20 @@ const STEP_DETAILS = [},] as const+type ContextAccess = {+ agents: Array<{ id: string; label: string }>+ teams: Array<{ id: string; label: string }>+ users: Array<{ id: string; label: string }>+}++const EMPTY_CONTEXT_ACCESS: ContextAccess = { agents: [], teams: [], users: [] }++const CONTEXT_ACCESS_GROUPS: Array<{ key: keyof ContextAccess; title: string }> = [+ { key: 'users', title: 'Users' },+ { key: 'teams', title: 'Teams' },+ { key: 'agents', title: 'Agents' },+]+type OrgImageOption = {value: stringlabel: string@@ -177,6 +200,9 @@ export function CreateMcpServerForm({const [contexts, setContexts] = useState<Array<{ name: string }>>([])const [contextsLoading, setContextsLoading] = useState(true)const [contextsError, setContextsError] = useState('')+ const [contextAccess, setContextAccess] = useState<ContextAccess>(EMPTY_CONTEXT_ACCESS)+ const [contextAccessError, setContextAccessError] = useState('')+ const [loadingContextAccess, setLoadingContextAccess] = useState(false)const [orgImages, setOrgImages] = useState<OrgImage[]>([])const [orgImageScope, setOrgImageScope] = useState('')const [managed, setManaged] = useState(true)@@ -214,8 +240,10 @@ export function CreateMcpServerForm({egressValid &&credentialsConfigured &&!submitting+ const connectorComplete = Boolean(name && image && nameValid) && egressValid+ const contextComplete = Boolean(contextRef)const canContinue =- step === 0 ? Boolean(name && image && contextRef && nameValid) && egressValid : egressValid+ step === 0 ? connectorComplete : step === 1 ? contextComplete : egressValidconst contextOptions = useMemo(() => contexts.map(context => ({ value: context.name, label: context.name })),[contexts]@@ -271,6 +299,64 @@ export function CreateMcpServerForm({}}, [])+ useEffect(() => {+ const selectedContext = contextRef.trim()+ if (!selectedContext) {+ setContextAccess(EMPTY_CONTEXT_ACCESS)+ setContextAccessError('')+ setLoadingContextAccess(false)+ return+ }++ let cancelled = false+ setLoadingContextAccess(true)+ setContextAccessError('')++ void (async () => {+ const [usersResult, teamsResult, hostsResult] = await Promise.allSettled([+ getContextUsers(selectedContext),+ getContextTeams(selectedContext),+ getHosts(),+ ])+ if (cancelled) return++ const failed =+ usersResult.status === 'rejected' ||+ teamsResult.status === 'rejected' ||+ hostsResult.status === 'rejected'+ setContextAccess({+ users:+ usersResult.status === 'fulfilled'+ ? (usersResult.value.items ?? []).map(user => ({+ id: user.id,+ label: user.displayName || user.name || user.email || user.id,+ }))+ : [],+ teams:+ teamsResult.status === 'fulfilled'+ ? (teamsResult.value.items ?? []).map(team => ({ id: team.id, label: team.name }))+ : [],+ agents:+ hostsResult.status === 'fulfilled'+ ? (hostsResult.value.items ?? [])+ .filter(host => String(host.spec?.contextRef ?? '').trim() === selectedContext)+ .map(host => {+ const agentName = host.metadata?.name || 'unknown'+ return { id: agentName, label: getAgentDisplayName(agentName) || agentName }+ })+ : [],+ })+ setContextAccessError(+ failed ? 'Some access information could not be loaded. The lists below may be incomplete.' : ''+ )+ setLoadingContextAccess(false)+ })()++ return () => {+ cancelled = true+ }+ }, [contextRef])+useEffect(() => {let cancelled = false@@ -296,7 +382,8 @@ export function CreateMcpServerForm({function canSelectStep(targetStep: number) {if (targetStep <= step) return true- return Boolean(name && image && contextRef && nameValid && egressValid)+ if (targetStep === 1) return connectorComplete+ return connectorComplete && contextComplete}const handleEgressChange = useCallback(@@ -525,7 +612,7 @@ export function CreateMcpServerForm({<form onSubmit={handleSubmit}><CreateStepFlowariaLabel="Create connector steps"- className="cu-create-step-flow--2"+ className="cu-create-step-flow--3"currentStep={step}onStepChange={setStep}canSelectStep={canSelectStep}@@ -558,6 +645,15 @@ export function CreateMcpServerForm({/></Field>+ <Field label="Description">+ <TextInput+ onChange={event => setDescription(event.target.value)}+ placeholder="Optional description of this connector"+ disabled={submitting}+ value={description}+ />+ </Field>+<Fielddescription="Choose one of your organization’s images or enter another container image URL."label="Image"@@ -571,40 +667,6 @@ export function CreateMcpServerForm({/></Field>- <Field- description={- contextsLoading- ? 'Loading available contexts...'- : contexts.length > 0- ? "The server will be added to this context's allowlist."- : 'Create a context before creating a connector.'- }- error={contextsError || undefined}- label="Context"- required- >- <SelectionDropdown- multiple={false}- onChange={next => setContextRef(next[0] ?? '')}- disabled={submitting || contextsLoading || contexts.length === 0}- value={contextRef ? [contextRef] : []}- options={contextOptions}- placeholder={contextsLoading ? 'Loading contexts...' : 'Select a context...'}- searchPlaceholder="Search contexts..."- emptyLabel="No contexts available."- selectionLabel="Context"- />- </Field>-- <Field label="Description">- <TextInput- onChange={event => setDescription(event.target.value)}- placeholder="Optional description of this connector"- disabled={submitting}- value={description}- />- </Field>-<details className="cu-advanced-details"><summary>Advanced options</summary><p className="cu-advanced-details__hint">@@ -705,6 +767,89 @@ export function CreateMcpServerForm({) : null}{step === 1 ? (+ <div className="cu-form-stack cu-agent-form-stack cu-agent-form-stack--wide">+ <section className="cu-form-section">+ <div className="cu-form-section__header">+ <h3 className="cu-form-section__title">Context access</h3>+ <p className="cu-form-section__description">+ Choose the context where this connector will be available. The access lists+ update for the selected context.+ </p>+ </div>+ <Field+ description={+ contextsLoading+ ? 'Loading available contexts...'+ : contexts.length > 0+ ? "The connector will be added to this context's allowlist."+ : 'Create a context before creating a connector.'+ }+ error={contextsError || undefined}+ label="Context"+ required+ >+ <SelectionDropdown+ id="create-connector-context"+ multiple={false}+ onChange={next => setContextRef(next[0] ?? '')}+ disabled={submitting || contextsLoading || contexts.length === 0}+ value={contextRef ? [contextRef] : []}+ options={contextOptions}+ placeholder={contextsLoading ? 'Loading contexts...' : 'Select a context...'}+ searchPlaceholder="Search contexts..."+ emptyLabel="No contexts available."+ selectionLabel="Context"+ showSelectedChips={false}+ />+ </Field>++ {loadingContextAccess ? (+ <p className="cu-muted">Loading context access…</p>+ ) : contextRef ? (+ <>+ {contextAccessError ? (+ <p className="cu-banner cu-banner--warn" role="status">+ {contextAccessError}+ </p>+ ) : null}+ <div className="cu-registry-context-access__intro">+ <span>Access preview</span>+ <p>These people and agents can use this connector in {contextRef}.</p>+ </div>+ <section className="cu-registry-context-access" aria-label="Context access">+ {CONTEXT_ACCESS_GROUPS.map(group => (+ <section+ className="cu-registry-context-access__group"+ data-kind={group.key}+ key={group.key}+ >+ <div className="cu-registry-context-access__heading">+ <h4>{group.title}</h4>+ <span>{contextAccess[group.key].length}</span>+ </div>+ {contextAccess[group.key].length > 0 ? (+ <ul className="cu-registry-context-access__list">+ {contextAccess[group.key].map(principal => (+ <li key={principal.id}>+ <span>{principal.label}</span>+ </li>+ ))}+ </ul>+ ) : (+ <p className="cu-muted">+ No {group.title.toLowerCase()} have access.+ </p>+ )}+ </section>+ ))}+ </section>+ </>+ ) : null}+ </section>+ </div>+ ) : null}++ {step === 2 ? (<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 2fe5ea3bf..f9317d64d 100644--- a/control-ui/components/GfsBrowser.tsx+++ b/control-ui/components/GfsBrowser.tsx@@ -85,14 +85,6 @@ function hasDraggedFiles(event: React.DragEvent<HTMLElement>): boolean {return Array.from(event.dataTransfer.types || []).includes('Files')}-function isDroppedPreviewFile(file: File): boolean {- return (- file.type.toLowerCase().startsWith('image/') ||- gfsImagePreviewMimeType(file.name) !== null ||- isGfsMarkdownPreviewFile(file.name)- )-}-function isGfsPreviewFile(fileName: string): boolean {return gfsImagePreviewMimeType(fileName) !== null || isGfsMarkdownPreviewFile(fileName)}@@ -316,24 +308,16 @@ export function GfsBrowser(): React.JSX.Element {}const droppedFiles = Array.from(event.dataTransfer.files || [])- const previewFiles = droppedFiles.filter(isDroppedPreviewFile)- if (!previewFiles.length) {- showToast('Only image and Markdown files can be dropped here.', { tone: 'error' })+ if (!droppedFiles.length) {+ showToast('No files were dropped.', { tone: 'error' })return}- setDroppedUploadCount(previewFiles.length)+ setDroppedUploadCount(droppedFiles.length)try {- for (const file of previewFiles) {+ for (const file of droppedFiles) {await uploadFile(file)}- const skippedCount = droppedFiles.length - previewFiles.length- if (skippedCount > 0) {- showToast(- `${skippedCount} unsupported ${skippedCount === 1 ? 'file was' : 'files were'} skipped.`,- { tone: 'error' }- )- }} finally {setDroppedUploadCount(0)}@@ -474,7 +458,7 @@ export function GfsBrowser(): React.JSX.Element {{droppedUploadCount > 0? `Uploading ${droppedUploadCount} ${droppedUploadCount === 1 ? 'file' : 'files'}…`: current?.id- ? `Drop images or Markdown files to upload to ${currentLabel}`+ ? `Drop files to upload to ${currentLabel}`: 'Files cannot be uploaded until a destination folder is available.'}</div>) : null}diff --git a/control-ui/components/McpServerTable.tsx b/control-ui/components/McpServerTable.tsxindex ad780932b..bc750e2ae 100644--- a/control-ui/components/McpServerTable.tsx+++ b/control-ui/components/McpServerTable.tsx@@ -274,6 +274,7 @@ export function McpServerTable({onCreate ? (<RowActionsMenuariaLabel="Connector actions"+ horizontalTriggeractions={[{key: 'create',@@ -379,6 +380,12 @@ export function McpServerTable({</td><td><span className="cu-expandable-row__name">{name}</span>+ <div+ className="cu-registry-description"+ title={spec.description || 'No description provided.'}+ >+ {spec.description || 'No description provided.'}+ </div></td><td><BoolBadge value={spec.enabled} trueLabel="Yes" falseLabel="No" />diff --git a/control-ui/components/RegistryInstallForm/index.tsx b/control-ui/components/RegistryInstallForm/index.tsxindex ddb3a44d4..92a543fe6 100644--- a/control-ui/components/RegistryInstallForm/index.tsx+++ b/control-ui/components/RegistryInstallForm/index.tsx@@ -3,18 +3,27 @@import React, { useEffect, useMemo, useRef, useState } from 'react'import { CreateStepFlow } from '@components/CreateStepFlow'import { EgressEditor } from '@components/EgressEditor'-import { useToast } from '@components/Toast'+import { IconCheck } from '@components/icons'+import { SelectionDropdown } from '@components/SelectionDropdown'import { Button } from '@components/ui'import type { CredentialSchema } from '@lib/api'-import { getContexts, getRegistryCredentialSchema, installFromRegistry } from '@lib/api'+import {+ getContextTeams,+ getContextUsers,+ getContexts,+ getHosts,+ getRegistryCredentialSchema,+ installFromRegistry,+} from '@lib/api'import { registryEntryToEgressBindings } from '@lib/egressModel'import type { EgressBinding, EgressEditorStatus } from '@lib/egressModel'+import { getAgentDisplayName } from '@lib/agentName'import { isValidK8sName, toK8sName } from '@lib/k8sValidation'import { buildPastedValue } from '@lib/pasteUtils'-import { getEmbeddedCredentialSchema, getExternalEgressNotice } from '../registryInstallHelpers'+import { getEmbeddedCredentialSchema } from '../registryInstallHelpers'import type { RegistryInstallFormProps } from './types'-const STEPS = ['Package', 'Install'] as const+const STEPS = ['Package', 'Context', 'Credentials', 'Install'] as constconst STEP_DETAILS = [{@@ -22,6 +31,16 @@ const STEP_DETAILS = [title: 'Marketplace package',subtitle: 'Review the package and optionally adjust its installation configuration.',},+ {+ description: 'Choose connector access',+ title: 'Context',+ subtitle: 'Choose where to install this connector and review who can use it.',+ },+ {+ description: 'Add connector credentials',+ title: 'Credentials',+ subtitle: 'Optionally add the credentials needed by this connector.',+ },{description: 'Confirm install',title: 'Review install',@@ -29,8 +48,26 @@ const STEP_DETAILS = [},] as const-export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInstallFormProps) {- const { showToast } = useToast()+type ContextAccess = {+ agents: Array<{ id: string; label: string }>+ teams: Array<{ id: string; label: string }>+ users: Array<{ id: string; label: string }>+}++const EMPTY_CONTEXT_ACCESS: ContextAccess = { agents: [], teams: [], users: [] }++const CONTEXT_ACCESS_GROUPS: Array<{ key: keyof ContextAccess; title: string }> = [+ { key: 'users', title: 'Users' },+ { key: 'teams', title: 'Teams' },+ { key: 'agents', title: 'Agents' },+]++export function RegistryInstallForm({+ entry,+ onCancel,+ onInstalled,+ onViewConnectors,+}: RegistryInstallFormProps) {const [step, setStep] = useState(0)// Default to a K8s-valid name derived from the scoped registry name (e.g.// `@org/name` → `org-name`); `entry.name` itself is not a valid resource name.@@ -44,6 +81,10 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInconst [error, setError] = useState('')const [egressBindings, setEgressBindings] = useState<EgressBinding[] | undefined>(undefined)const [egressStatus, setEgressStatus] = useState<EgressEditorStatus | null>(null)+ const [contextAccess, setContextAccess] = useState<ContextAccess>(EMPTY_CONTEXT_ACCESS)+ const [contextAccessError, setContextAccessError] = useState('')+ const [loadingContextAccess, setLoadingContextAccess] = useState(false)+ const [installed, setInstalled] = useState(false)const installInFlightRef = useRef(false)const registryInitialEgressBindings = useMemo(() => registryEntryToEgressBindings(entry), [entry])@@ -55,6 +96,9 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInsetCredValues({})setEgressBindings(registryInitialEgressBindings)setEgressStatus(null)+ setContextAccess(EMPTY_CONTEXT_ACCESS)+ setContextAccessError('')+ setInstalled(false)setLoading(true);(async () => {try {@@ -82,6 +126,64 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn})()}, [entry, registryInitialEgressBindings])+ useEffect(() => {+ const selectedContext = contextRef.trim()+ if (!selectedContext) {+ setContextAccess(EMPTY_CONTEXT_ACCESS)+ setContextAccessError('')+ setLoadingContextAccess(false)+ return+ }++ let cancelled = false+ setLoadingContextAccess(true)+ setContextAccessError('')++ void (async () => {+ const [usersResult, teamsResult, hostsResult] = await Promise.allSettled([+ getContextUsers(selectedContext),+ getContextTeams(selectedContext),+ getHosts(),+ ])+ if (cancelled) return++ const failed =+ usersResult.status === 'rejected' ||+ teamsResult.status === 'rejected' ||+ hostsResult.status === 'rejected'+ setContextAccess({+ users:+ usersResult.status === 'fulfilled'+ ? (usersResult.value.items ?? []).map(user => ({+ id: user.id,+ label: user.displayName || user.name || user.email || user.id,+ }))+ : [],+ teams:+ teamsResult.status === 'fulfilled'+ ? (teamsResult.value.items ?? []).map(team => ({ id: team.id, label: team.name }))+ : [],+ agents:+ hostsResult.status === 'fulfilled'+ ? (hostsResult.value.items ?? [])+ .filter(host => String(host.spec?.contextRef ?? '').trim() === selectedContext)+ .map(host => {+ const name = host.metadata?.name || 'unknown'+ return { id: name, label: getAgentDisplayName(name) || name }+ })+ : [],+ })+ setContextAccessError(+ failed ? 'Some access information could not be loaded. The lists below may be incomplete.' : ''+ )+ setLoadingContextAccess(false)+ })()++ return () => {+ cancelled = true+ }+ }, [contextRef])+const nameValid = isValidK8sName(serverName)const credHasKeys = (credSchema?.keys?.length ?? 0) > 0const credRequired = !!credSchema?.required && credHasKeys@@ -94,7 +196,6 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn.map(key => key.label || key.name): []const credComplete = !credStarted || missingCredentialKeys.length === 0- const externalEgressNotice = getExternalEgressNotice(entry)const remoteRequiresEgress = entry.server_mode === 'remote'const egressValid =egressStatus !== null &&@@ -102,28 +203,18 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn!(remoteRequiresEgress && egressStatus.mode === 'none')const canSubmit =nameValid && contextRef.trim() !== '' && credComplete && egressValid && !installing+ const packageComplete = !loading && nameValid && egressValid+ const contextComplete = contextRef.trim() !== ''const canContinue =- step === 0- ? !loading && nameValid && contextRef.trim() !== '' && credComplete && egressValid- : true+ step === 0 ? packageComplete : step === 1 ? contextComplete : step === 2 ? credComplete : truefunction canSelectStep(targetStep: number) {if (targetStep <= step) return true- return nameValid && contextRef.trim() !== '' && credComplete && egressValid+ if (targetStep === 1) return packageComplete+ if (targetStep === 2) return packageComplete && contextComplete+ return packageComplete && contextComplete && credComplete}- const externalTargetsText = useMemo(- () =>- externalEgressNotice?.targets.length- ? externalEgressNotice.targets.join(', ')- : 'public internet',- [externalEgressNotice]- )- const externalPortsText = useMemo(- () => externalEgressNotice?.ports.join(', ') ?? '',- [externalEgressNotice]- )-async function handleInstall() {if (!canSubmit || installInFlightRef.current) return@@ -155,9 +246,7 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryInegressBindings: selectedEgressBindings,})- showToast(`"${serverName}" was installed and added to context "${contextRef}".`, {- tone: 'success',- })+ setInstalled(true)onInstalled()} catch (installError) {setError(installError instanceof Error ? installError.message : 'Installation failed')@@ -181,7 +270,7 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn<><CreateStepFlowariaLabel="Install connector steps"- className="cu-create-step-flow--2"+ className="cu-create-step-flow--4 cu-registry-install-flow"currentStep={step}onStepChange={setStep}canSelectStep={canSelectStep}@@ -199,52 +288,6 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn</p></div>- {externalEgressNotice && (- <div className="cu-warning-card" role="alert">- <span>- {externalEgressNotice.isRemote- ? 'Remote connector.'- : externalEgressNotice.wideCidr- ? 'Public web egress required.'- : 'External API access required.'}{' '}- {externalEgressNotice.wideCidr- ? 'Installing this CRD authorizes public web egress on TCP ports '- : 'Installing this CRD authorizes outbound egress to '}- {!externalEgressNotice.wideCidr && <strong>{externalTargetsText}</strong>}- {!externalEgressNotice.wideCidr && ' on port'}- {!externalEgressNotice.wideCidr &&- (externalEgressNotice.ports.length > 1 ? 's ' : ' ')}- {externalEgressNotice.wideCidr && (- <>- <strong>{externalPortsText}</strong>. Private, metadata, cluster-internal,- link-local, multicast, and reserved ranges remain blocked.- {externalEgressNotice.targets.length > 0 && (- <>- {' '}- Listed domains ({externalTargetsText}) are examples and not the complete- enforcement boundary.- </>- )}- </>- )}- {!externalEgressNotice.wideCidr && <strong>{externalPortsText}</strong>}- {!externalEgressNotice.wideCidr && '.'} This expands to{' '}- <strong>{externalEgressNotice.bindingCount}</strong> egress binding- {externalEgressNotice.bindingCount === 1 ? '' : 's'}.- {externalEgressNotice.isRemote && (- <>- {' '}- Credentials are stored in Kubernetes and forwarded via the egress proxy. The- pod runs nginx in our cluster, NOT the vendor's image.- </>- )}- </span>- {externalEgressNotice.blockingError ? (- <div className="cu-field__error">{externalEgressNotice.blockingError}</div>- ) : null}- </div>- )}-<div className="cu-registry-entry-card"><div className="cu-registry-entry-card__head"><strong className="cu-registry-name">{entry.name}</strong>@@ -296,64 +339,6 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn) : null}</div>- <div className="cu-field cu-field--compact">- <label htmlFor="ri-context">Context</label>- <select- id="ri-context"- className="cu-input"- value={contextRef}- onChange={event => setContextRef(event.target.value)}- >- <option value="">Select a context...</option>- {contexts.map(context => (- <option key={context.name} value={context.name}>- {context.name}- </option>- ))}- </select>- </div>-- {credHasKeys ? (- <fieldset className="cu-form-section">- <legend className="cu-section-title">- Credentials ({credSchema!.authType}- {credRequired ? '' : ' - optional'})- </legend>- {credSchema!.keys.map(key => (- <div className="cu-field cu-field--compact" key={key.name}>- <label htmlFor={`ri-cred-${key.name}`}>{key.label}</label>- <input- id={`ri-cred-${key.name}`}- className="cu-input"- type={- key.kind === 'api-key' || key.kind === 'password'- ? 'password'- : 'text'- }- value={credValues[key.name] ?? ''}- onChange={event =>- setCredValues(previous => ({- ...previous,- [key.name]: event.target.value,- }))- }- onPaste={event => pasteCredentialValue(key.name, event)}- autoComplete="new-password"- placeholder={key.description}- />- </div>- ))}- {credRequired ? (- <div- className={`cu-banner ${credStarted && !credComplete ? 'cu-banner--error' : 'cu-banner--info'}`}- >- {credStarted && !credComplete- ? `Complete all credential fields or clear them all to install pending. Missing: ${missingCredentialKeys.join(', ')}.`- : 'Leave all credential fields empty to install now and add this connector secret later from Secrets, or fill every field to create it during install.'}- </div>- ) : null}- </fieldset>- ) : null}<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."@@ -374,9 +359,169 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn) : null}{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}.+ <div className="cu-agent-form-stack cu-agent-form-stack--wide">+ <section className="cu-form-section">+ <div className="cu-form-section__header">+ <h3 className="cu-form-section__title">Context access</h3>+ <p className="cu-form-section__description">+ Choose the context where this connector will be available. The access lists+ update for the selected context.+ </p>+ </div>+ <div className="cu-field cu-field--compact">+ <label>Context</label>+ <SelectionDropdown+ id="ri-context"+ multiple={false}+ value={contextRef ? [contextRef] : []}+ onChange={next => setContextRef(next[0] ?? '')}+ options={contexts.map(context => ({ value: context.name, label: context.name }))}+ placeholder="Select a context..."+ searchPlaceholder="Search contexts..."+ selectionLabel="Context"+ showSelectedChips={false}+ emptyLabel="No contexts available."+ />+ </div>++ {loadingContextAccess ? (+ <p className="cu-muted">Loading context access…</p>+ ) : contextRef ? (+ <>+ {contextAccessError ? (+ <p className="cu-banner cu-banner--warn" role="status">+ {contextAccessError}+ </p>+ ) : null}+ <div className="cu-registry-context-access__intro">+ <span>Access preview</span>+ <p>These people and agents can use this connector in {contextRef}.</p>+ </div>+ <section className="cu-registry-context-access" aria-label="Context access">+ {CONTEXT_ACCESS_GROUPS.map(group => (+ <section+ className="cu-registry-context-access__group"+ data-kind={group.key}+ key={group.key}+ >+ <div className="cu-registry-context-access__heading">+ <h4>{group.title}</h4>+ <span>{contextAccess[group.key].length}</span>+ </div>+ {contextAccess[group.key].length > 0 ? (+ <ul className="cu-registry-context-access__list">+ {contextAccess[group.key].map(principal => (+ <li key={principal.id}>+ <span>{principal.label}</span>+ </li>+ ))}+ </ul>+ ) : (+ <p className="cu-muted">No {group.title.toLowerCase()} have access.</p>+ )}+ </section>+ ))}+ </section>+ </>+ ) : null}+ </section>+ </div>+ ) : null}++ {step === 2 ? (+ <div className="cu-agent-form-stack cu-agent-form-stack--wide">+ {credHasKeys ? (+ <fieldset className="cu-form-section">+ <legend className="cu-section-title">+ Credentials ({credSchema!.authType}+ {credRequired ? '' : ' - optional'})+ </legend>+ {credSchema!.keys.map(key => (+ <div className="cu-field cu-field--compact" key={key.name}>+ <label htmlFor={`ri-cred-${key.name}`}>{key.label}</label>+ <input+ id={`ri-cred-${key.name}`}+ className="cu-input"+ type={key.kind === 'api-key' || key.kind === 'password' ? 'password' : 'text'}+ value={credValues[key.name] ?? ''}+ onChange={event =>+ setCredValues(previous => ({+ ...previous,+ [key.name]: event.target.value,+ }))+ }+ onPaste={event => pasteCredentialValue(key.name, event)}+ autoComplete="new-password"+ placeholder={key.label}+ />+ </div>+ ))}+ {credRequired ? (+ <div+ className={`cu-banner ${credStarted && !credComplete ? 'cu-banner--error' : 'cu-banner--info'}`}+ >+ {credStarted && !credComplete+ ? `Complete all credential fields or clear them all to install pending. Missing: ${missingCredentialKeys.join(', ')}.`+ : 'Leave all credential fields empty to install now and add this connector secret later from Secrets, or fill every field to create it during install.'}+ </div>+ ) : null}+ </fieldset>+ ) : (+ <div className="cu-agent-review">This connector does not require credentials.</div>+ )}+ </div>+ ) : null}++ {step === 3 ? (+ <div className="cu-form-stack cu-agent-form-stack--wide">+ <section className="cu-summary-list" aria-label="Install summary">+ <div className="cu-summary-list__row">+ <span>Connector</span>+ <strong>{serverName || '-'}</strong>+ </div>+ <div className="cu-summary-list__row">+ <span>Context</span>+ <strong>{contextRef || '-'}</strong>+ </div>+ <div className="cu-summary-list__row">+ <span>Marketplace package</span>+ <strong>{entry.name}</strong>+ </div>+ <div className="cu-summary-list__row">+ <span>Version</span>+ <strong>{entry.version}</strong>+ </div>+ </section>+ <section className="cu-form-section" aria-labelledby="connector-access-title">+ <div className="cu-form-section__header">+ <h3 id="connector-access-title" className="cu-form-section__title">+ Connector access+ </h3>+ <p className="cu-form-section__description">+ Members, teams, and agents with access to <strong>{contextRef}</strong> will+ be able to use this connector.+ </p>+ </div>+ {loadingContextAccess ? (+ <p className="cu-muted">Loading connector access…</p>+ ) : (+ <section+ className="cu-registry-install-access-summary"+ aria-label="Connector access"+ >+ {CONTEXT_ACCESS_GROUPS.map(group => (+ <div className="cu-registry-install-access-summary__row" key={group.key}>+ <span>{group.key === 'users' ? 'Members' : group.title}</span>+ <strong>+ {contextAccess[group.key].length > 0+ ? contextAccess[group.key].map(principal => principal.label).join(', ')+ : `No ${group.key === 'users' ? 'members' : group.title.toLowerCase()}`}+ </strong>+ </div>+ ))}+ </section>+ )}+ </section></div>) : null}@@ -405,6 +550,37 @@ export function RegistryInstallForm({ entry, onCancel, onInstalled }: RegistryIn</form>)}</CreateStepFlow>+ {installed ? (+ <div className="cu-modal-backdrop" role="presentation">+ <section+ className="cu-modal-panel cu-modal-panel--install-success"+ role="dialog"+ aria-modal="true"+ aria-labelledby="registry-install-success-title"+ aria-describedby="registry-install-success-copy"+ >+ <div className="cu-registry-install-success__icon" aria-hidden="true">+ <IconCheck width={26} height={26} />+ </div>+ <div className="cu-registry-install-success__content">+ <p className="cu-registry-install-success__eyebrow">Connector installed</p>+ <h2 id="registry-install-success-title" className="cu-modal-panel__title">+ Congratulations — you're ready to go+ </h2>+ <p id="registry-install-success-copy" className="cu-modal-copy">+ <strong>{serverName}</strong> is available in <strong>{contextRef}</strong>. You+ can now use it in the desktop app; visit Connectors to check its status or adjust+ its settings.+ </p>+ </div>+ <div className="cu-modal-panel__foot cu-registry-install-success__actions">+ <Button type="button" variant="primary" onClick={onViewConnectors}>+ Go to Connectors+ </Button>+ </div>+ </section>+ </div>+ ) : null}</>)}diff --git a/control-ui/components/RegistryInstallForm/types.ts b/control-ui/components/RegistryInstallForm/types.tsindex 8d2a3bc41..d61ac9c4c 100644--- a/control-ui/components/RegistryInstallForm/types.ts+++ b/control-ui/components/RegistryInstallForm/types.ts@@ -4,4 +4,5 @@ export type RegistryInstallFormProps = {entry: RegistryEntryonCancel: () => voidonInstalled: () => void+ onViewConnectors?: () => void}diff --git a/control-ui/components/RowActionsMenu/index.tsx b/control-ui/components/RowActionsMenu/index.tsxindex a1cb279e9..00cb6a717 100644--- a/control-ui/components/RowActionsMenu/index.tsx+++ b/control-ui/components/RowActionsMenu/index.tsx@@ -2,7 +2,7 @@import { useEffect, useLayoutEffect, useRef, useState } from 'react'import { createPortal } from 'react-dom'-import { IconDotsVertical } from '@components/icons'+import { IconDotsVertical, IconMoreHorizontal } from '@components/icons'export type RowAction = {key: string@@ -15,9 +15,11 @@ export type RowAction = {export function RowActionsMenu({ariaLabel,actions,+ horizontalTrigger = false,}: {ariaLabel: stringactions: RowAction[]+ horizontalTrigger?: boolean}) {const [open, setOpen] = useState(false)const ref = useRef<HTMLDivElement>(null)@@ -94,7 +96,11 @@ export function RowActionsMenu({setOpen(value => !value)}}>- <IconDotsVertical width={16} height={16} />+ {horizontalTrigger ? (+ <IconMoreHorizontal width={16} height={16} />+ ) : (+ <IconDotsVertical width={16} height={16} />+ )}</button>{open? createPortal(diff --git a/control-ui/components/SecretsTable.tsx b/control-ui/components/SecretsTable.tsxindex 3a9067a0e..2ec2c316a 100644--- a/control-ui/components/SecretsTable.tsx+++ b/control-ui/components/SecretsTable.tsx@@ -11,7 +11,12 @@ import {getRecipeSecrets,getRecipes,} from '../lib/api'-import { createEmptyLlmKeyDraft, validateLlmSecretData } from '../lib/llm'+import {+ createEmptyLlmKeyDraft,+ getProviderLabel,+ getProvidersWithCompleteCredentials,+ validateLlmSecretData,+} from '../lib/llm'import { collectWorkflowRecipeSecretRefs } from '../lib/workflowRecipeSecretRefs'import { useConfirmDialog } from './ConfirmDialog'import { LlmCredentialFields } from './LlmCredentialFields'@@ -35,6 +40,7 @@ type McpSecretRow = {name: stringservers: string[]registryEntries: string[]+ registrySources: Array<{ name: string; version: string }>}type RecipeSecretStatus = 'provisioned' | 'missing'type RecipeSecretRowOwnership =@@ -137,8 +143,13 @@ export function SecretsTable({const normalizedLlmSearch = llmSearchQuery.trim().toLowerCase()const filteredRows = useMemo(() => {if (!normalizedLlmSearch) return rows- return rows.filter(name => name.toLowerCase().includes(normalizedLlmSearch))- }, [normalizedLlmSearch, rows])+ return rows.filter(name => {+ const providerNames = getProvidersWithCompleteCredentials(keysByName.get(name) ?? []).map(+ getProviderLabel+ )+ return [name, ...providerNames].join(' ').toLowerCase().includes(normalizedLlmSearch)+ })+ }, [keysByName, normalizedLlmSearch, rows])const normalizedMcpSearch = mcpSearchQuery.trim().toLowerCase()const filteredMcpRows = useMemo(() => {@@ -263,10 +274,13 @@ export function SecretsTable({setMcpError('')try {const result = await getMcpServers()- const usage = new Map<string, { servers: Set<string>; registryEntries: Set<string> }>()+ const usage = new Map<+ string,+ { servers: Set<string>; registrySources: Map<string, { name: string; version: string }> }+ >()const addSecret = (secretName: string) => {if (!usage.has(secretName)) {- usage.set(secretName, { servers: new Set<string>(), registryEntries: new Set<string>() })+ usage.set(secretName, { servers: new Set<string>(), registrySources: new Map() })}return usage.get(secretName)!}@@ -290,16 +304,25 @@ export function SecretsTable({const catalogVersion =annotations['clerum.io/catalog-version'] ?? labels['clerum.io/catalog-version']if (catalogId && catalogVersion) {- row.registryEntries.add(`${catalogId}@${catalogVersion}`)+ row.registrySources.set(`${catalogId}@${catalogVersion}`, {+ name: catalogId,+ version: catalogVersion,+ })}}const nextRows = Array.from(usage.entries())- .map(([name, details]) => ({- name,- servers: Array.from(details.servers).sort((a, b) => a.localeCompare(b)),- registryEntries: Array.from(details.registryEntries).sort((a, b) => a.localeCompare(b)),- }))+ .map(([name, details]) => {+ const registrySources = Array.from(details.registrySources.values()).sort((a, b) =>+ `${a.name}@${a.version}`.localeCompare(`${b.name}@${b.version}`)+ )+ return {+ name,+ servers: Array.from(details.servers).sort((a, b) => a.localeCompare(b)),+ registryEntries: registrySources.map(source => `${source.name}@${source.version}`),+ registrySources,+ }+ }).sort((a, b) => a.name.localeCompare(b.name))setMcpRows(nextRows)@@ -583,6 +606,7 @@ export function SecretsTable({<thead><tr><th>Name</th>+ <th>Providers</th><th style={{ width: '8rem', textAlign: 'right' }} aria-label="Actions" /></tr></thead>@@ -595,6 +619,9 @@ export function SecretsTable({style={{ width: `${55 + ((idx * 13) % 25)}%` }}/></td>+ <td>+ <div className="cu-skeleton cu-skeleton--cell" style={{ width: '8rem' }} />+ </td><td><divclassName="cu-skeleton cu-skeleton--cell"@@ -616,38 +643,55 @@ export function SecretsTable({<thead><tr><th>Name</th>+ <th>Providers</th><th style={{ width: '8rem', textAlign: 'right' }} aria-label="Actions" /></tr></thead><tbody>- {filteredRows.map(name => (- <tr key={name}>- <td>{name}</td>- <td style={{ textAlign: 'right' }}>- <div style={{ display: 'inline-flex', gap: '0.35rem' }}>- <button- type="button"- className="cu-btn cu-btn--icon cu-btn--toolbar"- onClick={() => openUpdate(name)}- aria-label={`Update LLM secret ${name}`}- >- <IconPencil width={16} height={16} />- </button>- <button- type="button"- className="cu-btn cu-btn--icon cu-btn--danger-icon"- onClick={() => void deleteSecret(name)}- disabled={deletingName === name}- aria-label={- deletingName === name ? 'Deleting…' : `Delete LLM secret ${name}`- }- >- <IconX width={16} height={16} />- </button>- </div>- </td>- </tr>- ))}+ {filteredRows.map(name => {+ const providers = getProvidersWithCompleteCredentials(keysByName.get(name) ?? [])+ return (+ <tr key={name}>+ <td>{name}</td>+ <td>+ {providers.length > 0 ? (+ <div className="cu-chip-row" aria-label={`Providers for ${name}`}>+ {providers.map(provider => (+ <span key={provider} className="cu-chip">+ {getProviderLabel(provider)}+ </span>+ ))}+ </div>+ ) : (+ <span style={{ color: 'var(--cu-text-soft)' }}>—</span>+ )}+ </td>+ <td style={{ textAlign: 'right' }}>+ <div style={{ display: 'inline-flex', gap: '0.35rem' }}>+ <button+ type="button"+ className="cu-btn cu-btn--icon cu-btn--toolbar"+ onClick={() => openUpdate(name)}+ aria-label={`Update LLM secret ${name}`}+ >+ <IconPencil width={16} height={16} />+ </button>+ <button+ type="button"+ className="cu-btn cu-btn--icon cu-btn--danger-icon"+ onClick={() => void deleteSecret(name)}+ disabled={deletingName === name}+ aria-label={+ deletingName === name ? 'Deleting…' : `Delete LLM secret ${name}`+ }+ >+ <IconX width={16} height={16} />+ </button>+ </div>+ </td>+ </tr>+ )+ })}</tbody></table></div>@@ -717,9 +761,18 @@ export function SecretsTable({<buttontype="button"className="cu-btn cu-btn--primary cu-btn--sm"- onClick={() =>- router.push(CONTROL_ROUTES.secrets.new({ scope: 'mcp', name: row.name }))- }+ onClick={() => {+ const source =+ row.registrySources.length === 1 ? row.registrySources[0] : undefined+ router.push(+ CONTROL_ROUTES.secrets.new({+ scope: 'mcp',+ name: row.name,+ registryEntry: source?.name,+ registryVersion: source?.version,+ })+ )+ }}aria-label={`Add connector secret ${row.name}`}>Adddiff --git a/control-ui/components/UpdateConnectorCredentials/index.tsx b/control-ui/components/UpdateConnectorCredentials/index.tsxindex d2f51b262..9b5a0d032 100644--- a/control-ui/components/UpdateConnectorCredentials/index.tsx+++ b/control-ui/components/UpdateConnectorCredentials/index.tsx@@ -4,7 +4,7 @@ import React, { useEffect, useRef, useState } from 'react'import { useConfirmDialog } from '@components/ConfirmDialog'import { useToast } from '@components/Toast'import { Button, Field, FormSection, TextInput } from '@components/ui'-import { getMcpServer, getMcpServers, updateMcpSecret } from '@lib/api'+import { getMcpServer, getMcpServers, getRegistryCredentialSchema, updateMcpSecret } from '@lib/api'import type { McpServerCondition } from '@lib/api'import type { RotationPhase, UpdateConnectorCredentialsProps } from './types'@@ -82,6 +82,7 @@ function findFreshDeploymentReady(export function UpdateConnectorCredentials({serverName,envSecret,+ registryCredentialSource,}: UpdateConnectorCredentialsProps) {const { showToast } = useToast()const { confirm, confirmDialog } = useConfirmDialog()@@ -99,6 +100,7 @@ export function UpdateConnectorCredentials({const [phaseMessage, setPhaseMessage] = useState('')const [rotationCutoff, setRotationCutoff] = useState<string | null>(null)const [rotationAffected, setRotationAffected] = useState<string[]>([])+ const [credentialLabels, setCredentialLabels] = useState<Record<string, string>>({})// The HCC's most recent RolloutIncomplete diagnostic, kept across polls (a// ref, not state: it only matters at the timeout boundary, so it must not// re-render or re-fire the poll effect). Seeing RolloutIncomplete never@@ -135,6 +137,32 @@ export function UpdateConnectorCredentials({}}, [envSecret])+ useEffect(() => {+ if (!registryCredentialSource) {+ setCredentialLabels({})+ return+ }++ let cancelled = false+ void getRegistryCredentialSchema(+ registryCredentialSource.name,+ registryCredentialSource.version+ )+ .then(schema => {+ if (cancelled) return+ setCredentialLabels(+ Object.fromEntries(schema.keys.map(key => [key.name, key.label || key.name]))+ )+ })+ .catch(() => {+ if (!cancelled) setCredentialLabels({})+ })++ return () => {+ cancelled = true+ }+ }, [registryCredentialSource])+// Poll THIS connector's own McpServer CRD until DeploymentReady resolves,// fails, or the bounded timeout expires. Success is NEVER declared from the// PUT's 200 alone (Fase 3 §4 corolario vinculante).@@ -329,75 +357,81 @@ export function UpdateConnectorCredentials({>{confirmDialog}- <div className="cu-table-wrap">- <table className="cu-table">- <thead>- <tr>- <th>Secret key</th>- <th>Env var</th>- </tr>- </thead>- <tbody>- {envSecret.keys.map(k => (- <tr key={k.secretKey}>- <td>- <code>{k.secretKey}</code>- </td>- <td>- <code>{k.envVar}</code>- </td>- </tr>- ))}- </tbody>- </table>- </div>-- <form className="cu-form-stack" onSubmit={handleSubmit}>- {envSecret.keys.map(k => (- <Field key={k.secretKey} htmlFor={`mcp-cred-${k.secretKey}`} label={k.secretKey}>- <TextInput- id={`mcp-cred-${k.secretKey}`}- type="password"- autoComplete="new-password"- placeholder="Leave blank to keep current value"- value={draft[k.secretKey] || ''}- onChange={e => updateField(k.secretKey, e.target.value)}- disabled={busy}- />- </Field>- ))}-- {validationError ? (- <div className="cu-banner cu-banner--error" role="alert">- {validationError}+ <form className="cu-connector-credentials-form" onSubmit={handleSubmit}>+ <div className="cu-form-stack">+ <div className="cu-table-wrap">+ <table className="cu-table">+ <thead>+ <tr>+ <th>Secret key</th>+ <th>Env var</th>+ </tr>+ </thead>+ <tbody>+ {envSecret.keys.map(k => (+ <tr key={k.secretKey}>+ <td>+ <code>{k.secretKey}</code>+ </td>+ <td>+ <code>{k.envVar}</code>+ </td>+ </tr>+ ))}+ </tbody>+ </table></div>- ) : null}- {phase === 'rotating' ? (- <div className="cu-banner cu-banner--info" role="status">- Rotating credentials — waiting for {serverName} to restart with the new value.- {phaseMessage ? ` ${phaseMessage}` : ''}- </div>- ) : null}+ {envSecret.keys.map(k => (+ <Field+ key={k.secretKey}+ htmlFor={`mcp-cred-${k.secretKey}`}+ label={credentialLabels[k.secretKey] || k.secretKey}+ >+ <TextInput+ id={`mcp-cred-${k.secretKey}`}+ type="password"+ autoComplete="new-password"+ placeholder="Leave blank to keep current value"+ value={draft[k.secretKey] || ''}+ onChange={e => updateField(k.secretKey, e.target.value)}+ disabled={busy}+ />+ </Field>+ ))}- {phase === 'success' ? (- <div className="cu-banner cu-banner--ok" role="status">- Credentials rotated. {serverName} restarted and is serving the new credential.- {otherAffectedNote}- </div>- ) : null}+ {validationError ? (+ <div className="cu-banner cu-banner--error" role="alert">+ {validationError}+ </div>+ ) : null}- {phase === 'failed' ? (- <div className="cu-banner cu-banner--error" role="alert">- Rotation failed: {phaseMessage}- </div>- ) : null}+ {phase === 'rotating' ? (+ <div className="cu-banner cu-banner--info" role="status">+ Rotating credentials — waiting for {serverName} to restart with the new value.+ {phaseMessage ? ` ${phaseMessage}` : ''}+ </div>+ ) : null}- {phase === 'timeout' ? (- <div className="cu-banner cu-banner--warning" role="alert">- {phaseMessage}- </div>- ) : null}+ {phase === 'success' ? (+ <div className="cu-banner cu-banner--ok" role="status">+ Credentials rotated. {serverName} restarted and is serving the new credential.+ {otherAffectedNote}+ </div>+ ) : null}++ {phase === 'failed' ? (+ <div className="cu-banner cu-banner--error" role="alert">+ Rotation failed: {phaseMessage}+ </div>+ ) : null}++ {phase === 'timeout' ? (+ <div className="cu-banner cu-banner--warning" role="alert">+ {phaseMessage}+ </div>+ ) : null}+ </div><div className="cu-create-actions">{phase === 'success' || phase === 'failed' || phase === 'timeout' ? (diff --git a/control-ui/components/UpdateConnectorCredentials/types.ts b/control-ui/components/UpdateConnectorCredentials/types.tsindex af962b03f..e85854edb 100644--- a/control-ui/components/UpdateConnectorCredentials/types.ts+++ b/control-ui/components/UpdateConnectorCredentials/types.ts@@ -1,5 +1,10 @@import type { EnvSecret } from '../../lib/api'+export type RegistryCredentialSource = {+ name: string+ version: string+}+export type UpdateConnectorCredentialsProps = {/*** McpServer CRD name — the connector currently being edited. Also the@@ -14,6 +19,12 @@ export type UpdateConnectorCredentialsProps = {* instead of a form when this is unset.*/envSecret: EnvSecret | undefined+ /**+ * Marketplace source retained on the connector CRD. When present, its+ * credential schema supplies operator-friendly field names while secret+ * keys remain the stable write-only data identifiers.+ */+ registryCredentialSource?: RegistryCredentialSource}/**diff --git a/control-ui/components/__tests__/CommunicationChannelsTable.test.tsx b/control-ui/components/__tests__/CommunicationChannelsTable.test.tsxindex 691835f28..3908903bf 100644--- a/control-ui/components/__tests__/CommunicationChannelsTable.test.tsx+++ b/control-ui/components/__tests__/CommunicationChannelsTable.test.tsx@@ -29,6 +29,30 @@ function renderTable({}describe('CommunicationChannelsTable', () => {+ it('shows configured provider types in one column', () => {+ renderTable({+ items: [+ {+ metadata: { name: 'multi-provider-channel', namespace: 'channels' },+ spec: {+ hostRef: 'agent-a',+ telegramSettings: { botHandle: '@evenfire_bot' },+ slack: [{ channelId: 'C123' }],+ teamsSettings: { appId: 'app-123' },+ },+ },+ ],+ })++ expect(screen.getByRole('columnheader', { name: 'Type' })).toBeInTheDocument()+ expect(+ screen.getByRole('cell', { name: 'Telegram, Slack, Microsoft Teams' })+ ).toBeInTheDocument()+ for (const removedHeading of ['Telegram', 'Slack', 'Teams']) {+ expect(screen.queryByRole('columnheader', { name: removedHeading })).not.toBeInTheDocument()+ }+ })+it('offers copy targets for providers not already configured on the channel', () => {const onCopyChannel = vi.fn()renderTable({diff --git a/control-ui/components/__tests__/ContextTable.test.tsx b/control-ui/components/__tests__/ContextTable.test.tsxindex 336e2aa1c..d01b5a961 100644--- a/control-ui/components/__tests__/ContextTable.test.tsx+++ b/control-ui/components/__tests__/ContextTable.test.tsx@@ -40,6 +40,26 @@ describe('ContextTable', () => {expect(onView).toHaveBeenCalledWith({ name: 'business' })})+ it('stacks a non-link context name and its description in one cell', () => {+ const { container } = render(+ <ContextTable+ items={contexts}+ onView={vi.fn()}+ onEdit={vi.fn()}+ onDelete={vi.fn().mockResolvedValue(undefined)}+ deletingKey={null}+ onRefresh={vi.fn()}+ onCreate={vi.fn()}+ refreshing={false}+ />+ )++ expect(screen.getByText('business')).toHaveClass('cu-expandable-row__name')+ expect(screen.getByText('Business context')).toHaveClass('cu-registry-description')+ expect(container.querySelectorAll('thead th')).toHaveLength(3)+ expect(screen.queryByRole('button', { name: 'business' })).not.toBeInTheDocument()+ })+it('does not open a context from row action buttons', () => {const onView = vi.fn()const onEdit = vi.fn()diff --git a/control-ui/components/__tests__/CreateMcpServerForm.test.tsx b/control-ui/components/__tests__/CreateMcpServerForm.test.tsxindex 9b4eb88c3..2de342aba 100644--- a/control-ui/components/__tests__/CreateMcpServerForm.test.tsx+++ b/control-ui/components/__tests__/CreateMcpServerForm.test.tsx@@ -19,7 +19,10 @@ vi.mock('../../lib/api', () => ({getContext: vi.fn().mockResolvedValue({spec: { contextId: 'context1', mcpServers: [] },}),+ getContextTeams: vi.fn().mockResolvedValue({ items: [] }),+ getContextUsers: vi.fn().mockResolvedValue({ items: [] }),listOrgImages: vi.fn().mockResolvedValue({ org: 'evenfire-dev', images: [] }),+ getHosts: vi.fn().mockResolvedValue({ items: [] }),updateContext: vi.fn().mockResolvedValue({}),}))@@ -33,7 +36,7 @@ function render(children: ReactNode) {}async function fillIdentity(name = 'brave-search') {- await waitFor(() => expect(screen.getByRole('button', { name: 'context1' })).toBeInTheDocument())+ await waitFor(() => expect(api.getContexts).toHaveBeenCalledTimes(1))fireEvent.change(screen.getByPlaceholderText('my-mcp-server'), {target: { value: name },})@@ -49,6 +52,7 @@ function openAdvanced() {function continueToSecrets() {fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))}function chooseNoCredentials() {@@ -78,10 +82,12 @@ describe('CreateMcpServerForm — render', () => {expect(continueButton).not.toBeDisabled()})- it('loads available contexts into a selector', async () => {+ it('loads available contexts into the dedicated Context step', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)- await waitFor(() => expect(api.getContexts).toHaveBeenCalledTimes(1))+ await fillIdentity()+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ await waitFor(() => expect(screen.getByRole('heading', { name: 'Context access' })).toBeInTheDocument())const contextSelector = screen.getByRole('button', { name: 'context1' })fireEvent.click(contextSelector)@@ -103,7 +109,9 @@ describe('CreateMcpServerForm — render', () => {})render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)- const imageField = await screen.findByRole('combobox')+ const imageField = await screen.findByPlaceholderText(+ 'us-central1-docker.pkg.dev/my-project/repo/mcp-server:latest'+ )fireEvent.focus(imageField)fireEvent.click(screen.getByRole('option', { name: 'todoist-mcp-server:1.0.0' }))@@ -112,13 +120,33 @@ describe('CreateMcpServerForm — render', () => {).toBeInTheDocument()})- it('uses two connector steps', () => {+ it('uses connector, context, and secrets steps', () => {const { container } = render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)- expect(container.querySelectorAll('.cu-agent-step-rail__item')).toHaveLength(2)+ expect(container.querySelectorAll('.cu-agent-step-rail__item')).toHaveLength(3)expect(screen.queryByText('Step 1 of 3')).not.toBeInTheDocument()expect(screen.queryByText('Step 1 of 4')).not.toBeInTheDocument()})+ it('previews the selected context access before continuing to secrets', async () => {+ vi.mocked(api.getContextUsers).mockResolvedValueOnce({+ items: [{ id: 'user-1', displayName: 'Josue', email: '[email protected]', name: 'josue' }],+ })+ vi.mocked(api.getContextTeams).mockResolvedValueOnce({+ items: [{ id: 'team-1', name: 'Development Team' }],+ })+ vi.mocked(api.getHosts).mockResolvedValueOnce({+ items: [{ metadata: { name: 'agents/product' }, spec: { contextRef: 'context1' } }],+ })+ render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)++ await fillIdentity()+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))++ expect(await screen.findByText('Josue')).toBeInTheDocument()+ expect(screen.getByText('Development Team')).toBeInTheDocument()+ expect(screen.getByText('product')).toBeInTheDocument()+ })+it('hides the advanced options by default and reveals them on toggle', async () => {render(<CreateMcpServerForm onCancel={vi.fn()} onCreated={vi.fn()} />)await fillIdentity()@@ -299,7 +327,7 @@ describe('CreateMcpServerForm — submit', () => {fireEvent.change(screen.getByPlaceholderText('443'), {target: { value: '443' },})- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ continueToSecrets()chooseNoCredentials()@@ -324,7 +352,7 @@ describe('CreateMcpServerForm — submit', () => {fireEvent.change(screen.getByDisplayValue('No external egress (closed by default)'), {target: { value: 'public-web' },})- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ continueToSecrets()chooseNoCredentials()@@ -353,7 +381,7 @@ describe('CreateMcpServerForm — submit', () => {fireEvent.change(screen.getByPlaceholderText('443'), {target: { value: '443' },})- fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ continueToSecrets()chooseNoCredentials()diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsxindex 12e6ca5a7..a4355b043 100644--- a/control-ui/components/__tests__/GfsBrowser.test.tsx+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx@@ -280,7 +280,7 @@ describe('GfsBrowser', () => {)})- it('uploads dropped images and Markdown files into the current folder', async () => {+ it('uploads dropped files into the current folder', async () => {const rootId = '11111111-1111-1111-1111-111111111111'const rootRid = '11111111111111111111111111111111'mockApiGet.mockResolvedValue({@@ -295,11 +295,12 @@ describe('GfsBrowser', () => {const browser = screen.getByRole('region', { name: 'Global File System browser' })const image = new File(['operator image'], 'diagram.png', { type: 'image/png' })const markdown = new File(['# Operator notes'], 'notes.md', { type: 'text/markdown' })- const dataTransfer = { dropEffect: 'none', files: [image, markdown], types: ['Files'] }+ const pdf = new File(['%PDF operator report'], 'report.pdf', { type: 'application/pdf' })+ const dataTransfer = { dropEffect: 'none', files: [image, markdown, pdf], types: ['Files'] }fireEvent.dragEnter(browser.querySelector('.cu-gfs-card')!, { dataTransfer })const dropStatus = screen.getByRole('status')- expect(dropStatus).toHaveTextContent('Drop images or Markdown files to upload to main')+ expect(dropStatus).toHaveTextContent('Drop files to upload to main')expect(dropStatus).toHaveClass('cu-gfs-drop-overlay')fireEvent.drop(browser.querySelector('.cu-gfs-card')!, { dataTransfer })@@ -315,15 +316,26 @@ describe('GfsBrowser', () => {}))- expect(mockApiSend).toHaveBeenCalledWith(- 'POST',- `/api/v1/gfs/proxy/v1/resources/${rootRid}/children`,- {- name: 'notes.md',- kind: 'file',- contentBase64: 'IyBPcGVyYXRvciBub3Rlcw==',- }- )+ await waitFor(() => {+ expect(mockApiSend).toHaveBeenCalledWith(+ 'POST',+ `/api/v1/gfs/proxy/v1/resources/${rootRid}/children`,+ {+ name: 'notes.md',+ kind: 'file',+ contentBase64: 'IyBPcGVyYXRvciBub3Rlcw==',+ }+ )+ expect(mockApiSend).toHaveBeenCalledWith(+ 'POST',+ `/api/v1/gfs/proxy/v1/resources/${rootRid}/children`,+ {+ name: 'report.pdf',+ kind: 'file',+ contentBase64: 'JVBERiBvcGVyYXRvciByZXBvcnQ=',+ }+ )+ })})it('rejects oversized dropped files before reading or uploading them', async () => {diff --git a/control-ui/components/__tests__/McpServerTable.test.tsx b/control-ui/components/__tests__/McpServerTable.test.tsxindex 7356714d3..3fc1c51ad 100644--- a/control-ui/components/__tests__/McpServerTable.test.tsx+++ b/control-ui/components/__tests__/McpServerTable.test.tsx@@ -19,6 +19,7 @@ function makeItem(overrides: {namespace?: stringimage?: stringcontextRef?: string+ description?: stringtransportType?: 'sse' | 'streamableHttp' | 'stdio'enabled?: booleanconditions?: McpServerCondition[] | undefined@@ -29,6 +30,7 @@ function makeItem(overrides: {spec: {image: stringcontextRef: string+ description?: stringenabled?: booleantransport: { type: 'sse' | 'streamableHttp' | 'stdio'; url: string }}@@ -41,6 +43,7 @@ function makeItem(overrides: {spec: {image: overrides.image ?? 'ghcr.io/example/mcp:1.0',contextRef: overrides.contextRef ?? 'context1',+ description: overrides.description,enabled: overrides.enabled,transport: {type: overrides.transportType ?? 'streamableHttp',@@ -194,6 +197,24 @@ describe('McpServerTable — column sorting', () => {})})+describe('McpServerTable — marketplace-aligned rows', () => {+ it('renders a connector description below its name in the list row', () => {+ render(+ <McpServerTable+ items={[makeItem({ name: 'brave-search', description: 'Search the public web.' })]}+ />+ )++ const row = screen.getByText('brave-search').closest('tr')+ expect(row).not.toBeNull()+ expect(row).toHaveTextContent('Search the public web.')+ expect(row?.querySelector('.cu-registry-description')).toHaveAttribute(+ 'title',+ 'Search the public web.'+ )+ })+})+describe('McpServerTable — connector access summaries', () => {it('exposes expandable rows as named buttons with their current state', () => {const items = [makeItem({ name: 'airtable-server' })]diff --git a/control-ui/components/__tests__/RegistryInstallForm.test.tsx b/control-ui/components/__tests__/RegistryInstallForm.test.tsxindex 63e4b5d78..64ef00341 100644--- a/control-ui/components/__tests__/RegistryInstallForm.test.tsx+++ b/control-ui/components/__tests__/RegistryInstallForm.test.tsx@@ -15,6 +15,9 @@ vi.mock('../../lib/api', async () => {mod.getContexts = vi.fn().mockResolvedValue({items: [{ metadata: { name: 'context1' } }],})+ mod.getContextUsers = vi.fn().mockResolvedValue({ items: [] })+ mod.getContextTeams = vi.fn().mockResolvedValue({ items: [] })+ mod.getHosts = vi.fn().mockResolvedValue({ items: [] })mod.installFromRegistry = vi.fn().mockResolvedValue({serverName: 'brave-search',namespace: 'mcp-server',@@ -89,10 +92,14 @@ describe('RegistryInstallForm -- pending connector credentials', () => {expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled()})fireEvent.click(screen.getByText('Configuration'))+ expect(screen.queryByLabelText('API Key')).not.toBeInTheDocument()+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))expect(await screen.findByText(/Leave all credential fields empty to install now/i)).toBeInTheDocument()+ expect(screen.getByLabelText('API Key')).toHaveAttribute('placeholder', 'API Key')expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled()fireEvent.change(screen.getByLabelText('API Key'), { target: { value: 'sk-test-123' } })@@ -121,7 +128,7 @@ describe('RegistryInstallForm -- server name default', () => {expect(screen.queryByText(/Must be a valid K8s name/i)).toBeNull()})- it('keeps configuration collapsed and shows only Package and Install flow steps', async () => {+ it('keeps configuration collapsed and shows Package, Context, Credentials, and Install flow steps', async () => {const { container } = render(<RegistryInstallForm entry={MOCK_ENTRY} onCancel={vi.fn()} onInstalled={vi.fn()} />)@@ -132,9 +139,84 @@ describe('RegistryInstallForm -- server name default', () => {expect(configuration).not.toBeNull()expect(configuration).not.toHaveAttribute('open')expect(screen.getByRole('button', { name: /Package/ })).toBeInTheDocument()+ expect(screen.getByRole('button', { name: /Context/ })).toBeInTheDocument()+ expect(screen.getByRole('button', { name: /Credentials/ })).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()})++ it('shows the install details as a stacked summary', async () => {+ render(<RegistryInstallForm entry={MOCK_ENTRY} onCancel={vi.fn()} onInstalled={vi.fn()} />)++ await waitFor(() => expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled())+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))++ const summary = screen.getByLabelText('Install summary')+ expect(summary).toHaveTextContent('Connector')+ expect(summary).toHaveTextContent('brave-search')+ expect(summary).toHaveTextContent('Context')+ expect(summary).toHaveTextContent('context1')+ expect(summary).toHaveTextContent('Marketplace package')+ expect(summary).toHaveTextContent('Version')+ expect(screen.getByLabelText('Connector access')).toBeInTheDocument()+ })++ it('lists the users, teams, and agents that can access the selected context', async () => {+ vi.mocked(api.getContextUsers).mockResolvedValueOnce({+ items: [{ id: 'user-1', email: '[email protected]', name: 'Ada', displayName: 'Ada Lovelace' }],+ })+ vi.mocked(api.getContextTeams).mockResolvedValueOnce({+ items: [{ id: 'team-1', name: 'Platform' }],+ })+ vi.mocked(api.getHosts).mockResolvedValueOnce({+ items: [{ metadata: { name: 'research-agent' }, spec: { contextRef: 'context1' } }],+ })++ render(<RegistryInstallForm entry={MOCK_ENTRY} onCancel={vi.fn()} onInstalled={vi.fn()} />)++ await waitFor(() => expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled())+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))++ const access = await screen.findByLabelText('Context access')+ expect(access).toHaveTextContent('Ada Lovelace')+ expect(access).toHaveTextContent('Platform')+ expect(access).toHaveTextContent('research-agent')++ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))++ const reviewAccess = screen.getByLabelText('Connector access')+ expect(reviewAccess).toHaveTextContent('Ada Lovelace')+ expect(reviewAccess).toHaveTextContent('Platform')+ expect(reviewAccess).toHaveTextContent('research-agent')+ })++ it('shows a success card and lets the user open Connectors after installation', async () => {+ const onViewConnectors = vi.fn()+ render(+ <RegistryInstallForm+ entry={MOCK_ENTRY}+ onCancel={vi.fn()}+ onInstalled={vi.fn()}+ onViewConnectors={onViewConnectors}+ />+ )++ await waitFor(() => expect(screen.getByRole('button', { name: 'Continue' })).not.toBeDisabled())+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Continue' }))+ fireEvent.click(screen.getByRole('button', { name: 'Install' }))++ expect(+ await screen.findByRole('heading', { name: "Congratulations — you're ready to go" })+ ).toBeInTheDocument()+ expect(screen.queryByText(/was installed and added to context/)).not.toBeInTheDocument()+ fireEvent.click(screen.getByRole('button', { name: 'Go to Connectors' }))+ expect(onViewConnectors).toHaveBeenCalledOnce()+ })})diff --git a/control-ui/components/__tests__/SecretsTable.test.tsx b/control-ui/components/__tests__/SecretsTable.test.tsxindex bebf8a32b..702c8f039 100644--- a/control-ui/components/__tests__/SecretsTable.test.tsx+++ b/control-ui/components/__tests__/SecretsTable.test.tsx@@ -93,6 +93,14 @@ describe('SecretsTable — LLM secret update payload', () => {fireEvent.click(screen.getByRole('button', { name: `Update LLM secret ${SECRET}` }))}+ it('shows the providers whose complete credentials are stored in each secret', () => {+ renderLlmTable(['openai-api-key', 'claude-api-key'])++ const providers = screen.getByLabelText(`Providers for ${SECRET}`)+ expect(within(providers).getByText('OpenAI')).toBeInTheDocument()+ expect(within(providers).getByText('Anthropic')).toBeInTheDocument()+ })+const sectionFor = (label: string) =>screen.getByText(label, { selector: '.cu-llm-cred-group__title' }).closest('section')!diff --git a/control-ui/components/__tests__/UpdateConnectorCredentials.test.tsx b/control-ui/components/__tests__/UpdateConnectorCredentials.test.tsxindex 01980efc6..9b982bac4 100644--- a/control-ui/components/__tests__/UpdateConnectorCredentials.test.tsx+++ b/control-ui/components/__tests__/UpdateConnectorCredentials.test.tsx@@ -6,17 +6,19 @@ import {POLL_TIMEOUT_MS,UpdateConnectorCredentials,} from '@components/UpdateConnectorCredentials'-import { getMcpServer, getMcpServers, updateMcpSecret } from '@lib/api'+import { getMcpServer, getMcpServers, getRegistryCredentialSchema, updateMcpSecret } from '@lib/api'import type { EnvSecret, McpServerResource } from '@lib/api'vi.mock('@lib/api', () => ({getMcpServer: vi.fn(),getMcpServers: vi.fn(),+ getRegistryCredentialSchema: vi.fn(),updateMcpSecret: vi.fn(),}))const mockGetMcpServer = vi.mocked(getMcpServer)const mockGetMcpServers = vi.mocked(getMcpServers)+const mockGetRegistryCredentialSchema = vi.mocked(getRegistryCredentialSchema)const mockUpdateMcpSecret = vi.mocked(updateMcpSecret)const SERVER_NAME = 'my-connector'@@ -130,6 +132,7 @@ describe('UpdateConnectorCredentials — masked inputs', () => {await renderPanel(ENV_SECRET)expect(screen.getByText(ENV_SECRET.name)).toBeInTheDocument()+ const rotateButton = screen.getByRole('button', { name: 'Rotate credentials' })const table = screen.getByRole('table')for (const key of ENV_SECRET.keys) {expect(within(table).getByText(key.secretKey)).toBeInTheDocument()@@ -139,6 +142,38 @@ describe('UpdateConnectorCredentials — masked inputs', () => {expect(input).toHaveAttribute('autocomplete', 'new-password')expect(input.value).toBe('')}+ expect(+ rotateButton.compareDocumentPosition(screen.getByLabelText(ENV_SECRET.keys[0].secretKey))+ ).toBe(Node.DOCUMENT_POSITION_PRECEDING)+ })++ it('uses the Marketplace credential label when the connector retains its catalog source', async () => {+ mockGetRegistryCredentialSchema.mockResolvedValueOnce({+ required: true,+ authType: 'api-key',+ keys: [+ {+ name: 'api-key',+ label: 'Linear API key',+ kind: 'api-key',+ },+ ],+ })+ render(+ <ToastProvider>+ <UpdateConnectorCredentials+ serverName={SERVER_NAME}+ envSecret={ENV_SECRET}+ registryCredentialSource={{ name: '@evenfire/linear', version: '1.0.0' }}+ />+ </ToastProvider>+ )++ await flush(3)++ expect(mockGetRegistryCredentialSchema).toHaveBeenCalledWith('@evenfire/linear', '1.0.0')+ expect(screen.getByLabelText('Linear API key')).toBeInTheDocument()+ expect(screen.getByLabelText('workspace-id')).toBeInTheDocument()})it('never renders a stored credential value — inputs stay empty through a full rotation cycle', async () => {diff --git a/control-ui/e2e/qa-recorder-connector-edit.spec.ts b/control-ui/e2e/qa-recorder-connector-edit.spec.tsindex 3254e30c0..fa9641927 100644--- a/control-ui/e2e/qa-recorder-connector-edit.spec.ts+++ b/control-ui/e2e/qa-recorder-connector-edit.spec.ts@@ -128,6 +128,20 @@ test.describe('optional QA recorder: Control UI connector edit', () => {page.getByRole('heading', { name: `Edit Connector: ${connectorName}`, exact: true })).toBeVisible({ timeout: 20_000 })+ // Context is a read-only final tab. It mirrors the selected context's+ // Users, Teams, and Agents access preview without offering a mutation.+ await page.getByRole('tab', { name: 'Context', exact: true }).click()+ await expect(page).toHaveURL(+ new RegExp(`/connectors/${encodeURIComponent(connectorName)}/edit/context$`)+ )+ await expect(page.getByRole('heading', { name: 'Context access', exact: true })).toBeVisible({+ timeout: 20_000,+ })+ await expect(page.getByLabel('Connector context').getByText(contextName)).toBeVisible()+ await expect(page.getByLabel('Context access')).toBeVisible()++ await page.getByRole('tab', { name: 'External Egress', exact: true }).click()+// Image and Context are rendered as static read-only text (not editable inputs).const meta = page.locator('.cu-connector-edit-meta')await expect(meta).toBeVisible({ timeout: 20_000 })diff --git a/control-ui/e2e/registry-install.spec.ts b/control-ui/e2e/registry-install.spec.tsindex d1c507278..923be5309 100644--- a/control-ui/e2e/registry-install.spec.ts+++ b/control-ui/e2e/registry-install.spec.ts@@ -552,13 +552,16 @@ async function submitRegistryInstallForm() {await installForm.locator('#ri-name').clear()await installForm.locator('#ri-name').fill(serverName)- await installForm.locator('#ri-context').selectOption('context1')+ await installForm.getByRole('button', { name: 'Continue' }).click()+ await installForm.locator('#ri-context').click()+ await installForm.getByRole('option', { name: 'context1', exact: true }).click()+ await installForm.getByRole('button', { name: 'Continue' }).click()const credentialInputs = installForm.locator('fieldset input')for (let i = 0; i < (await credentialInputs.count()); i += 1) {await credentialInputs.nth(i).fill('e2e-test-value')}await installForm.getByRole('button', { name: 'Continue' }).click()- await expect(page.getByText(`Connector ${serverName} will be installed`)).toBeVisible({+ await expect(page.getByLabel('Install summary').getByText(serverName, { exact: true })).toBeVisible({timeout: 10_000,})const responsePromise = page.waitForResponse(@@ -579,8 +582,9 @@ async function submitRegistryInstallForm(await page.getByRole('button', { name: /^Install$/ }).click()const response = await responsePromiseexpect(response.status()).toBe(201)- await expect(page).toHaveURL(/\/registry(?:$|\?)/, { timeout: 10_000 })- await expect(page.getByLabel('Search Marketplace entries')).toBeVisible({ timeout: 10_000 })+ await expect(+ page.getByRole('heading', { name: "Congratulations — you're ready to go" })+ ).toBeVisible({ timeout: 10_000 })}function workflowEgressRecipe(name: string, exactHost = 'api.github.com'): Record<string, unknown> {@@ -1402,9 +1406,12 @@ test.describe('H. Control-UI Smoke Tests', () => {const nameInput = installForm.locator('#ri-name')await nameInput.clear()await nameInput.fill(serverName)- await installForm.locator('#ri-context').selectOption('context1')- // Fill credentials if present+ // Advance through Context to Credentials and fill fields if present.+ await installForm.getByRole('button', { name: 'Continue' }).click()+ await installForm.locator('#ri-context').click()+ await installForm.getByRole('option', { name: 'context1', exact: true }).click()+ await installForm.getByRole('button', { name: 'Continue' }).click()const credFieldset = installForm.locator('fieldset')if ((await credFieldset.count()) > 0) {const inputs = credFieldset.locator('input')@@ -1415,9 +1422,9 @@ test.describe('H. Control-UI Smoke Tests', () => {// Submitawait installForm.getByRole('button', { name: 'Continue' }).click()- await expect(page.getByText(`Connector ${serverName} will be installed`)).toBeVisible({- timeout: 10_000,- })+ await expect(+ page.getByLabel('Install summary').getByText(serverName, { exact: true })+ ).toBeVisible({ timeout: 10_000 })const submitBtn = page.getByRole('button', { name: /^Install$/ })await expect(submitBtn).toBeEnabled({ timeout: 10_000 })@@ -1437,8 +1444,9 @@ test.describe('H. Control-UI Smoke Tests', () => {const resp = await responsePromiseexpect(resp.status()).toBe(201)- await expect(page).toHaveURL(/\/registry(?:$|\?)/, { timeout: 10_000 })- await expect(page.getByLabel('Search Marketplace entries')).toBeVisible({ timeout: 10_000 })+ await expect(+ page.getByRole('heading', { name: "Congratulations — you're ready to go" })+ ).toBeVisible({ timeout: 10_000 })const { data } = await api(token, 'GET', '/api/v1/admin/mcp-servers')const items = data.items as Array<{ metadata: { name: string } }>expect(items.some(item => item.metadata.name === serverName)).toBe(true)@@ -1537,18 +1545,14 @@ test.describe('I. Registry Egress Contracts via Control UI', () => {await waitForRegistryEntry(token, publicEntryName)})- test('I1. Exact-host entry shows bounded egress warning and installs exact-host CRD', async ({+ test('I1. Exact-host entry shows its egress configuration and installs exact-host CRD', async ({page,}) => {await login(page)await openRegistryInstallPackage(page, exactEntryName)- const egressAlert = page.getByRole('alert').filter({ hasText: 'External API access required' })-- await expect(egressAlert).toContainText('External API access required')- await expect(egressAlert).toContainText('api.airtable.com')- await expect(egressAlert).toContainText('443')- await expect(egressAlert).not.toContainText('Public web egress required')const installForm = await continueToRegistryInstallForm(page)+ await expect(installForm.getByText('External Egress')).toBeVisible()+ await expect(installForm.getByDisplayValue('Exact-host egress')).toBeVisible()await submitRegistryInstallForm(page, installForm, exactServerName, exactEntryName)@@ -1564,19 +1568,14 @@ test.describe('I. Registry Egress Contracts via Control UI', () => {])})- test('I2. Public-web entry shows explicit warning and installs public-web CRD', async ({+ test('I2. Public-web entry shows its warning in configuration and installs public-web CRD', async ({page,}) => {await login(page)await openRegistryInstallPackage(page, publicEntryName)- const egressAlert = page.getByRole('alert').filter({ hasText: 'Public web egress required' })-- await expect(egressAlert).toContainText('Public web egress required')- await expect(egressAlert).toContainText('public web egress')- await expect(egressAlert).toContainText('Private, metadata, cluster-internal')- await expect(egressAlert).toContainText('Listed domains')- await expect(egressAlert).toContainText('api.search.brave.com')const installForm = await continueToRegistryInstallForm(page)+ await expect(installForm.getByDisplayValue('Public web egress')).toBeVisible()+ await expect(installForm.getByText(/Public web egress allows outbound TCP 80\/443/i)).toBeVisible()await submitRegistryInstallForm(page, installForm, publicServerName, publicEntryName)@@ -1606,6 +1605,7 @@ test.describe('I. Registry Egress Contracts via Control UI', () => {await expect(page.getByRole('heading', { name: `Edit Connector: ${exactServerName}` })).toBeVisible()+ await page.getByRole('tab', { name: 'External Egress', exact: true }).click()const egressSection = page.locator('section', { hasText: 'External Egress' })await expect(egressSection.getByText('Egress summary:')).toBeVisible()@@ -1642,6 +1642,7 @@ test.describe('I. Registry Egress Contracts via Control UI', () => {await expect(editedRow).toBeVisible({ timeout: 15_000 })await editedRow.getByRole('button', { name: `Edit connector ${exactServerName}` }).click()await page.waitForURL(new RegExp(`/mcp-servers/${exactServerName}/edit`), { timeout: 10_000 })+ await page.getByRole('tab', { name: 'External Egress', exact: true }).click()const restoredEgressSection = page.locator('section', { hasText: 'External Egress' })await restoredEgressSection.locator('select').first().selectOption('exact-host')@@ -2163,13 +2164,16 @@ test.describe('J. Operator Egress Editor Journeys', () => {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')+ await installForm.getByRole('button', { name: 'Continue' }).click()+ await installForm.locator('#ri-context').click()+ await installForm.getByRole('option', { name: 'context1', exact: true }).click()+ await installForm.getByRole('button', { name: 'Continue' }).click()await expect(installForm.getByText(/Leave all credential fields empty to install now/)).toBeVisible()await installForm.getByRole('button', { name: 'Continue' }).click()await expect(- page.getByText(`Connector ${deferredMcpServerName} will be installed`)+ page.getByLabel('Install summary').getByText(deferredMcpServerName, { exact: true })).toBeVisible({ timeout: 10_000 })const installResponse = page.waitForResponse(@@ -2215,8 +2219,9 @@ test.describe('J. Operator Egress Editor Journeys', () => {field: 'spec.envSecret',}),])- await expect(page.getByText(/^Marketplace \(\d+\)$/)).toBeVisible({ timeout: 10_000 })- await expect(entryRow.getByRole('button', { name: 'Installed' })).toBeVisible()+ await expect(+ page.getByRole('heading', { name: "Congratulations — you're ready to go" })+ ).toBeVisible({ timeout: 10_000 })const expectedSecretName = `${deferredMcpServerName}-credentials`const server = await waitForMcpServer(