Skip to content

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

TypeScript

feat(control-ui): improve workflows and navigation

Miguelon Peluchon01b8aaa0ac48
diff --git a/control-ui/app/constants/createFlowLoading.ts b/control-ui/app/constants/createFlowLoading.ts
index 1b0feab5e..ded53ba87 100644
--- a/control-ui/app/constants/createFlowLoading.ts
+++ b/control-ui/app/constants/createFlowLoading.ts
@@ -4,10 +4,10 @@ export const CREATE_FLOW_LOADING = {
createAgent: {
iconKey: 'robot',
title: 'Create agent',
- subtitle: 'Provision a new agent with context, channels, and access.',
+ subtitle: 'Provision a new agent with context, credentials, and access.',
backLabel: 'Back to agents',
- steps: ['Agent', 'Context', 'Model & Credentials', 'Access', 'Channels'],
- stepFlowClassName: 'cu-create-step-flow--5',
+ steps: ['Agent', 'Context', 'Model & Credentials', 'Access'],
+ stepFlowClassName: 'cu-create-step-flow--4',
},
createCommunicationChannel: {
iconKey: 'broadcast',
diff --git a/control-ui/app/control-api/[...path]/route.ts b/control-ui/app/control-api/[...path]/route.ts
index 4216c0072..bf38a65e1 100644
--- a/control-ui/app/control-api/[...path]/route.ts
+++ b/control-ui/app/control-api/[...path]/route.ts
@@ -110,7 +110,16 @@ const HOP_BY_HOP_HEADERS = new Set([
function buildUpstreamUrl(req: NextRequest, path: string[]): string {
const base = CONTROL_API_INTERNAL_URL.replace(/\/$/, '')
- return `${base}/${path.join('/')}${req.nextUrl.search}`
+ const proxyPrefix = '/control-api'
+ // App Router decodes catch-all params, so a scoped registry name such as
+ // `@org/connector` arrives in `path` with its encoded `%2F` restored to `/`.
+ // Joining those params changes one route segment into two and makes the
+ // upstream Express route return 404. Preserve the encoded pathname from the
+ // request itself; retain an encoded-param fallback for direct handler calls.
+ const upstreamPath = req.nextUrl.pathname.startsWith(`${proxyPrefix}/`)
+ ? req.nextUrl.pathname.slice(proxyPrefix.length)
+ : `/${path.map(segment => encodeURIComponent(segment)).join('/')}`
+ return `${base}${upstreamPath}${req.nextUrl.search}`
}
function copyRequestHeaders(req: NextRequest): Headers {
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index c06c28597..88da59318 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -5911,6 +5911,69 @@ textarea.cu-input {
font-weight: 600;
}
+.cu-agent-context-mcp-summary {
+ display: grid;
+ gap: var(--cu-space-2);
+ padding: var(--cu-space-3);
+ border: 1px solid var(--cu-border-subtle);
+ border-radius: var(--cu-radius-sm);
+ background: rgba(var(--cu-panel-rgb), 0.35);
+}
+
+.cu-agent-context-mcp-summary__head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: var(--cu-space-2);
+ color: var(--cu-text-muted);
+ font-size: 0.75rem;
+ font-weight: 600;
+ letter-spacing: 0.04em;
+ text-transform: uppercase;
+}
+
+.cu-agent-context-mcp-summary__head > span:last-child {
+ display: inline-grid;
+ place-items: center;
+ min-width: 1.5rem;
+ min-height: 1.5rem;
+ padding: 0.1rem var(--cu-space-1);
+ border: 1px solid rgba(var(--cu-accent-rgb), 0.35);
+ border-radius: var(--cu-radius-pill);
+ background: rgba(var(--cu-accent-rgb), 0.14);
+ font-variant-numeric: tabular-nums;
+}
+
+.cu-agent-context-mcp-summary__list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--cu-space-1);
+ max-height: 8rem;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+ list-style: none;
+}
+
+.cu-agent-context-mcp-summary__list li {
+ max-width: 100%;
+ padding: 0.2rem var(--cu-space-2);
+ overflow: hidden;
+ border: 1px solid var(--cu-border-subtle);
+ border-radius: var(--cu-radius-pill);
+ background: var(--cu-bg-elevated);
+ color: var(--cu-text-soft);
+ font-size: 0.75rem;
+ line-height: 1.35;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.cu-agent-context-mcp-summary > .cu-muted {
+ margin: 0;
+ font-size: 0.8125rem;
+}
+
.cu-agent-mcp-grid {
display: grid;
gap: var(--cu-space-2);
@@ -10932,14 +10995,6 @@ button.cu-gfs-tree__button:focus-visible,
height: 100%;
}
-.cu-gfs-breadcrumb__drive-label {
- color: var(--cu-text-muted);
- font-size: 0.625rem;
- font-weight: 700;
- letter-spacing: 0.06em;
- text-transform: uppercase;
-}
-
.cu-gfs-list-frame {
--cu-gfs-list-columns: 2.25rem minmax(12rem, 1fr) minmax(5rem, 0.28fr) minmax(6rem, 0.32fr) 5rem;
diff --git a/control-ui/app/hosts/new/page.tsx b/control-ui/app/hosts/new/page.tsx
index 42df0efc7..15ac1a6ce 100644
--- a/control-ui/app/hosts/new/page.tsx
+++ b/control-ui/app/hosts/new/page.tsx
@@ -69,7 +69,7 @@ export default function CreateHostPage() {
<CreatePageHeader
icon={<IconRobot />}
title="Create agent"
- subtitle="Provision a new agent with context, channels, and access."
+ subtitle="Provision a new agent with context, credentials, and access."
backLabel="Back to agents"
onBack={backToAgents}
/>
diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsx
index 3ba31818f..93cd82abf 100644
--- a/control-ui/components/GfsBrowser.tsx
+++ b/control-ui/components/GfsBrowser.tsx
@@ -209,6 +209,7 @@ export function GfsBrowser(): React.JSX.Element {
}
function goToCrumb(index: number): void {
+ if (index === crumbs.length - 1) return
setLoading(true)
setCrumbs(crumbs.slice(0, index + 1))
}
@@ -460,7 +461,7 @@ export function GfsBrowser(): React.JSX.Element {
<TablePanelHeader
title={
<>
- <IconFolder /> Global File System
+ <IconPaperclip /> Global File System
</>
}
subtitle="Browse and manage drive resources and access grants from the admin plane."
@@ -501,7 +502,6 @@ export function GfsBrowser(): React.JSX.Element {
<span className="cu-gfs-breadcrumb__drive-icon" aria-hidden="true">
<IconFolder />
</span>
- <span className="cu-gfs-breadcrumb__drive-label">Drive</span>
<span>{DRIVE}</span>
</>
) : (
diff --git a/control-ui/components/HostWizard/constants.ts b/control-ui/components/HostWizard/constants.ts
index 6d9af4afe..94e7df63f 100644
--- a/control-ui/components/HostWizard/constants.ts
+++ b/control-ui/components/HostWizard/constants.ts
@@ -2,7 +2,7 @@ export const HOST_SECRET_LABEL_KEY = 'clerum.io/host-secret'
export const HOST_SECRET_LABEL_VALUE = 'true'
export const HOST_NAMESPACE = 'mcp-host'
-export const STEPS = ['Agent', 'Context', 'Model & Credentials', 'Access', 'Channels'] as const
+export const STEPS = ['Agent', 'Context', 'Model & Credentials', 'Access'] as const
export const STEP_DETAILS = [
{
@@ -25,9 +25,4 @@ export const STEP_DETAILS = [
title: 'Access',
subtitle: 'Grant members or teams permission to use this agent.',
},
- {
- description: 'Optional channel setup',
- title: 'Channels',
- subtitle: 'Attach an external channel now, or skip and configure one later.',
- },
] as const
diff --git a/control-ui/components/HostWizard/index.tsx b/control-ui/components/HostWizard/index.tsx
index cc231216d..72e00f6ca 100644
--- a/control-ui/components/HostWizard/index.tsx
+++ b/control-ui/components/HostWizard/index.tsx
@@ -1,8 +1,6 @@
'use client'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import { ChannelCredentialsPanel } from '@/components/ChannelCredentialsPanel'
-import type { CredentialDraft } from '@/components/ChannelCredentialsPanel/types'
import { CreateFlowPanel } from '@/components/CreateFlowPanel'
import { CreateStepFlow } from '@/components/CreateStepFlow'
import { LlmProviderConfig } from '@/components/LlmProviderConfig'
@@ -20,7 +18,6 @@ import {
} from '@/lib/api'
import { cn } from '@/lib/cn'
import { useLlmAllowedModels } from '@/lib/hooks/useLlmAllowedModels'
-import { FIRST_PARTY_CHANNEL_WORKFLOW_CONTROL_SCOPES } from '@/lib/hostWorkflowControl'
import {
type HostAllowedModel,
type LlmPolicy,
@@ -44,74 +41,12 @@ import {
STEPS,
STEP_DETAILS,
} from './constants'
-import type {
- ChannelOption,
- ChannelProvider,
- ContextOption,
- HostWizardProps,
- NewChannelDraft,
- WizardSelectProps,
-} from './types'
-
-const CHANNEL_PROVIDER_OPTIONS: Array<{ value: ChannelProvider; label: string; meta: string }> = [
- { value: 'telegram', label: 'Telegram', meta: 'Telegram bot' },
- { value: 'slack', label: 'Slack', meta: 'Slack app' },
-]
+import type { ContextOption, HostWizardProps, WizardSelectProps } from './types'
// Stateless lifecycle support remains intact in the API and existing-agent UI;
// only creation through this wizard is temporarily unavailable.
const SHOW_STATELESS_AGENT_SELECTOR = false
-function createNewChannelDraft(): NewChannelDraft {
- return {
- slackBotHandle: '',
- slackReplyOnlyWhenMentioned: true,
- slackReplyInThreads: false,
- telegramBotHandle: '',
- telegramReplyOnlyWhenMentioned: true,
- }
-}
-
-function requiredCredentialKeysForChannelProvider(
- provider: ChannelProvider
-): Array<keyof CredentialDraft> {
- return provider === 'telegram'
- ? ['telegram-bot-token']
- : ['slack-signing-secret', 'slack-bot-token']
-}
-
-function hasRequiredChannelCredential(
- provider: ChannelProvider,
- credentials: CredentialDraft
-): boolean {
- return requiredCredentialKeysForChannelProvider(provider).every(key =>
- Boolean((credentials[key] || '').trim())
- )
-}
-
-function missingCredentialLabel(
- provider: ChannelProvider,
- credentials: CredentialDraft
-): string | null {
- const missingKey = requiredCredentialKeysForChannelProvider(provider).find(
- key => !(credentials[key] || '').trim()
- )
- switch (missingKey) {
- case 'telegram-bot-token':
- return 'Telegram bot token'
- case 'slack-signing-secret':
- return 'Slack signing secret'
- case 'slack-bot-token':
- return 'Slack Bot User OAuth token'
- default:
- return null
- }
-}
-
-function isValidTelegramBotHandle(value: string): boolean {
- return /^@?[A-Za-z0-9_]{5,32}$/.test(value.trim())
-}
-
// Asymmetric save gate (spec Topic 1b): the PRIMARY provider must be usable —
// its required credential slot(s) filled — before create is allowed. Fallbacks
// are optional and only warn, so they never enter this gate.
@@ -119,28 +54,6 @@ function primaryCredentialUsable(provider: LlmProvider, draft: Record<string, st
return isProviderUsable(provider, key => (draft[key] ?? '').trim().length > 0)
}
-function providerSettings(provider: ChannelProvider, draft: NewChannelDraft) {
- if (provider === 'telegram') {
- return {
- slack: [],
- telegram: [],
- telegramSettings: {
- botHandle: draft.telegramBotHandle.trim(),
- replyOnlyWhenMentioned: draft.telegramReplyOnlyWhenMentioned,
- },
- }
- }
- return {
- slack: [],
- slackSettings: {
- botHandle: draft.slackBotHandle.trim(),
- replyOnlyWhenMentioned: draft.slackReplyOnlyWhenMentioned,
- replyInThreads: draft.slackReplyInThreads,
- },
- telegram: [],
- }
-}
-
function WizardSelect({
className,
disabled,
@@ -218,12 +131,6 @@ function isStepValid(
contextName: string
selectedExistingContext: string
selectedMcp: string[]
- channelMode: 'existing' | 'new' | 'skip'
- channelName: string
- channelProvider: ChannelProvider
- newChannelDraft: NewChannelDraft
- pendingCredentials: CredentialDraft
- selectedExistingChannel: string
secretMode: 'existing' | 'new'
existingSecret: string
newSecretName: string
@@ -261,25 +168,7 @@ function isStepValid(
validateLlmSecretData(projectedDraft).length === 0
return hasValidSecret && state.modelName.trim().length > 0
}
- if (stepIndex === 3) {
- return true
- }
- if (stepIndex === 4) {
- if (state.channelMode === 'skip') return true
- if (state.channelMode === 'existing') return state.selectedExistingChannel.trim().length > 0
- if (!toKebabCase(state.channelName)) return false
- if (!hasRequiredChannelCredential(state.channelProvider, state.pendingCredentials)) return false
- if (
- state.channelProvider === 'telegram' &&
- !isValidTelegramBotHandle(state.newChannelDraft.telegramBotHandle)
- ) {
- return false
- }
- if (state.channelProvider === 'slack') {
- if (!state.newChannelDraft.slackBotHandle.trim()) return false
- }
- return true
- }
+ if (stepIndex === 3) return true
return false
}
@@ -317,22 +206,9 @@ export function HostWizard({
const [existingContexts, setExistingContexts] = useState<ContextOption[]>([])
const contextSelectRef = useRef<HTMLDivElement | null>(null)
- const [channelName, setChannelName] = useState('')
- const [channelMode, setChannelMode] = useState<'existing' | 'new' | 'skip'>('existing')
- const [channelProvider, setChannelProvider] = useState<ChannelProvider>('telegram')
- const [newChannelDraft, setNewChannelDraft] = useState<NewChannelDraft>(() =>
- createNewChannelDraft()
- )
- const [selectedExistingChannel, setSelectedExistingChannel] = useState('')
- const [channelSelectOpen, setChannelSelectOpen] = useState(false)
- const [existingChannels, setExistingChannels] = useState<ChannelOption[]>([])
- const channelSelectRef = useRef<HTMLDivElement | null>(null)
- const [pendingCredentials, setPendingCredentials] = useState<CredentialDraft>({})
-
- // Per-host secret: default to a new, auto-named Secret ("this agent's
- // credentials") so the operator never has to name a Kubernetes Secret; reusing
- // an existing shared Secret stays a first-class choice (spec Topic 1b R4).
- const [secretMode, setSecretMode] = useState<'existing' | 'new'>('new')
+ // Reuse an existing shared Secret by default. Creating an agent-specific Secret
+ // remains available when the operator explicitly chooses New credential.
+ const [secretMode, setSecretMode] = useState<'existing' | 'new'>('existing')
const [existingSecret, setExistingSecret] = useState('')
const [newSecretName, setNewSecretName] = useState('')
const [secretNameTouched, setSecretNameTouched] = useState(false)
@@ -402,18 +278,26 @@ export function HostWizard({
[existingContexts, selectedExistingContext]
)
const selectedContextLabel = selectedContextOption?.contextId || 'Select context...'
- const selectedChannelOption = useMemo(
- () =>
- existingChannels.find(
- channel => `${channel.namespace}/${channel.name}` === selectedExistingChannel
- ) || null,
- [existingChannels, selectedExistingChannel]
- )
- const selectedChannelLabel = selectedChannelOption?.name || 'Select channel...'
const providerModelOptions = useMemo(
() => getModelOptions(allowedCatalog, provider),
[allowedCatalog, provider]
)
+ const handleExistingSecretChange = useCallback(
+ (secretName: string) => {
+ setExistingSecret(secretName)
+ const selectedSecret = existingSecrets.find(
+ secret => (secret.name || secret.metadata?.name) === secretName
+ )
+ if (!Array.isArray(selectedSecret?.keys)) return
+ const [linkedProvider] = getProvidersWithCompleteCredentials(selectedSecret.keys)
+ if (!linkedProvider) return
+ setProvider(linkedProvider)
+ setModelName(
+ resolveDefaultModel(linkedProvider, getModelOptions(allowedCatalog, linkedProvider))
+ )
+ },
+ [allowedCatalog, existingSecrets]
+ )
// Keep the selected model valid for the current provider's enabled models:
// seed the default once the allowlist loads, and re-default if a provider
// switch left the model out of range.
@@ -466,8 +350,6 @@ export function HostWizard({
[teams]
)
- const visibleChannelTypes = useMemo(() => [channelProvider], [channelProvider])
-
const canNext = useMemo(() => {
return isStepValid(step, {
hostName,
@@ -475,12 +357,6 @@ export function HostWizard({
contextName,
selectedExistingContext,
selectedMcp,
- channelMode,
- channelName,
- channelProvider,
- newChannelDraft,
- pendingCredentials,
- selectedExistingChannel,
secretMode,
existingSecret,
newSecretName,
@@ -499,12 +375,6 @@ export function HostWizard({
contextName,
selectedExistingContext,
selectedMcp,
- channelMode,
- channelName,
- channelProvider,
- newChannelDraft,
- pendingCredentials,
- selectedExistingChannel,
secretMode,
existingSecret,
newSecretName,
@@ -522,7 +392,7 @@ export function HostWizard({
setDirectoryLoadError('')
setError('')
try {
- const [usersData, teamsData, contextsData, channelsData] = await Promise.all([
+ const [usersData, teamsData, contextsData] = await Promise.all([
getAdminUsers(''),
getAdminTeams(),
apiGet('/api/v1/admin/contexts') as Promise<{
@@ -531,12 +401,6 @@ export function HostWizard({
spec?: { contextId?: string; mcpServers?: unknown[] }
}>
}>,
- apiGet('/api/v1/admin/communication-channels') as Promise<{
- items?: Array<{
- metadata?: { name?: string; namespace?: string }
- spec?: Record<string, unknown>
- }>
- }>,
])
if (!mountedRef.current) return
setUsers(Array.isArray(usersData.items) ? usersData.items : [])
@@ -556,15 +420,6 @@ export function HostWizard({
.filter(ctx => ctx.name && ctx.contextId)
.sort((a, b) => `${a.namespace}/${a.name}`.localeCompare(`${b.namespace}/${b.name}`))
setExistingContexts(contextOptions)
- const channelOptions = (channelsData.items || [])
- .map(channel => ({
- name: String(channel.metadata?.name || '').trim(),
- namespace: String(channel.metadata?.namespace || 'default').trim(),
- spec: (channel.spec || {}) as Record<string, unknown>,
- }))
- .filter(channel => channel.name)
- .sort((a, b) => `${a.namespace}/${a.name}`.localeCompare(`${b.namespace}/${b.name}`))
- setExistingChannels(channelOptions)
} catch (e) {
if (!mountedRef.current) return
const message =
@@ -593,12 +448,6 @@ export function HostWizard({
contextName,
selectedExistingContext,
selectedMcp,
- channelMode,
- channelName,
- channelProvider,
- newChannelDraft,
- pendingCredentials,
- selectedExistingChannel,
secretMode,
existingSecret,
newSecretName,
@@ -623,12 +472,6 @@ export function HostWizard({
contextName,
selectedExistingContext,
selectedMcp,
- channelMode,
- channelName,
- channelProvider,
- newChannelDraft,
- pendingCredentials,
- selectedExistingChannel,
secretMode,
existingSecret,
newSecretName,
@@ -665,30 +508,6 @@ export function HostWizard({
const slotErrors = validateLlmSecretData(projected)
if (slotErrors.length > 0) return slotErrors[0]
}
- if (step === 4 && channelMode === 'existing' && !selectedExistingChannel.trim())
- return 'Select an existing channel or skip channel setup.'
- if (step === 4 && channelMode === 'new' && !toKebabCase(channelName))
- return 'CommunicationChannel name is required, or skip channel setup.'
- if (
- step === 4 &&
- channelMode === 'new' &&
- !hasRequiredChannelCredential(channelProvider, pendingCredentials)
- )
- return `${missingCredentialLabel(channelProvider, pendingCredentials) || 'Channel credential'} is required, or skip channel setup.`
- if (
- step === 4 &&
- channelMode === 'new' &&
- channelProvider === 'telegram' &&
- !isValidTelegramBotHandle(newChannelDraft.telegramBotHandle)
- )
- return 'A valid Telegram bot handle is required, or skip channel setup.'
- if (
- step === 4 &&
- channelMode === 'new' &&
- channelProvider === 'slack' &&
- !newChannelDraft.slackBotHandle.trim()
- )
- return 'Slack App Name is required, or skip channel setup.'
return ''
}, [
step,
@@ -697,12 +516,6 @@ export function HostWizard({
contextName,
selectedExistingContext,
selectedMcp,
- channelMode,
- channelName,
- channelProvider,
- newChannelDraft,
- pendingCredentials,
- selectedExistingChannel,
secretMode,
existingSecret,
newSecretName,
@@ -737,14 +550,7 @@ export function HostWizard({
setSelectedExistingContext('')
setContextSelectOpen(false)
setSelectedMcp([])
- setChannelName('')
- setChannelMode('existing')
- setChannelProvider('telegram')
- setNewChannelDraft(createNewChannelDraft())
- setSelectedExistingChannel('')
- setChannelSelectOpen(false)
- setPendingCredentials({})
- setSecretMode('new')
+ setSecretMode('existing')
setExistingSecret('')
setNewSecretName('')
setSecretNameTouched(false)
@@ -777,30 +583,14 @@ export function HostWizard({
setContextSelectOpen(false)
}
- function selectExistingChannel(channel: ChannelOption) {
- setSelectedExistingChannel(`${channel.namespace}/${channel.name}`)
- setChannelSelectOpen(false)
- }
-
- function handleChannelProviderChange(provider: ChannelProvider) {
- setChannelProvider(provider)
- setPendingCredentials({})
- setError('')
- }
-
- async function submitAll(options: { skipChannels?: boolean } = {}) {
+ async function submitAll() {
setBusy(true)
setError('')
try {
- const shouldSkipChannels = options.skipChannels || channelMode === 'skip'
const normalizedHostName = toKebabCase(hostName)
const normalizedContextName = toKebabCase(contextName)
const resolvedContextName =
contextMode === 'existing' ? selectedContextOption?.contextId || '' : normalizedContextName
- const normalizedChannelName = toKebabCase(channelName)
- const resolvedChannelName =
- channelMode === 'existing' ? selectedChannelOption?.name || '' : normalizedChannelName
- const channelRefs = shouldSkipChannels ? [] : [resolvedChannelName]
const normalizedSecretName = toKebabCase(newSecretName)
if (secretMode === 'new') {
@@ -849,53 +639,6 @@ export function HostWizard({
)
}
- if (!shouldSkipChannels && channelMode === 'new') {
- const cleanedCredentials: CredentialDraft = {}
- for (const [key, value] of Object.entries(pendingCredentials) as Array<
- [keyof CredentialDraft, string | undefined]
- >) {
- const trimmed = (value || '').trim()
- if (trimmed.length > 0) cleanedCredentials[key] = trimmed
- }
- const channelAccess = {
- users: Array.from(new Set(selectedUserIds)),
- teams: Array.from(new Set(selectedTeamIds)),
- }
- const channelSpec = {
- hostRef: normalizedHostName,
- access: channelAccess,
- ...providerSettings(channelProvider, newChannelDraft),
- }
-
- await upsertResource(
- 'admin/communication-channels',
- normalizedChannelName,
- {
- metadata: { name: normalizedChannelName },
- spec: channelSpec,
- credentials: cleanedCredentials,
- },
- {
- spec: channelSpec,
- }
- )
- } else if (!shouldSkipChannels && channelMode === 'existing' && selectedChannelOption) {
- await apiSend(
- 'PUT',
- `/api/v1/admin/communication-channels/${encodeURIComponent(selectedChannelOption.name)}`,
- {
- spec: {
- ...selectedChannelOption.spec,
- hostRef: normalizedHostName,
- access: {
- users: Array.from(new Set(selectedUserIds)),
- teams: Array.from(new Set(selectedTeamIds)),
- },
- },
- }
- )
- }
-
// Effective per-host model subset (Topic 3a): prune the draft to the
// providers actually in this host's domain (primary + fallbacks), then
// collapse unrestricted/all-selected providers via buildAllowedModelsSpec.
@@ -912,7 +655,7 @@ export function HostWizard({
host: normalizedHostName,
contextRef: resolvedContextName,
secretRef: secretMode === 'existing' ? existingSecret : normalizedSecretName,
- channels: channelRefs,
+ channels: [],
model: {
provider,
name: modelName,
@@ -925,9 +668,6 @@ export function HostWizard({
// unrestricted providers are omitted so absent=all-global holds.
...(allowedModelsSpec.length > 0 ? { allowedModels: allowedModelsSpec } : {}),
...(stateless ? { lifecycle: { stateless: true } } : {}),
- ...(channelRefs.length > 0
- ? { workflowControl: { scopes: [...FIRST_PARTY_CHANNEL_WORKFLOW_CONTROL_SCOPES] } }
- : {}),
}
await upsertResource(
@@ -1106,57 +846,74 @@ export function HostWizard({
</div>
{contextMode === 'existing' ? (
<>
- <div
- className="cu-agent-select"
- ref={contextSelectRef}
- onBlur={event => {
- if (!event.currentTarget.contains(event.relatedTarget)) {
- setContextSelectOpen(false)
- }
- }}
- >
- <button
- type="button"
- className="cu-agent-select__button"
- aria-expanded={contextSelectOpen}
- aria-haspopup="listbox"
- onClick={() => setContextSelectOpen(open => !open)}
+ <div className="cu-agent-access-section">
+ <strong>Select Context</strong>
+ <div
+ className="cu-agent-select"
+ ref={contextSelectRef}
+ onBlur={event => {
+ if (!event.currentTarget.contains(event.relatedTarget)) {
+ setContextSelectOpen(false)
+ }
+ }}
>
- <span>{selectedContextLabel}</span>
- <span className="cu-agent-select__chevron" aria-hidden="true" />
- </button>
- {contextSelectOpen ? (
- <div className="cu-agent-select__menu" role="listbox">
- {existingContexts.length === 0 ? (
- <span className="cu-agent-select__empty">No contexts available.</span>
- ) : (
- existingContexts.map(ctx => {
- const value = `${ctx.namespace}/${ctx.name}`
- return (
- <button
- key={value}
- type="button"
- className="cu-agent-select__option"
- data-active={selectedExistingContext === value ? 'true' : 'false'}
- role="option"
- aria-selected={selectedExistingContext === value}
- onClick={() => selectExistingContext(ctx)}
- >
- {ctx.contextId}
- </button>
- )
- })
- )}
- </div>
- ) : null}
+ <button
+ type="button"
+ className="cu-agent-select__button"
+ aria-expanded={contextSelectOpen}
+ aria-haspopup="listbox"
+ onClick={() => setContextSelectOpen(open => !open)}
+ >
+ <span>{selectedContextLabel}</span>
+ <span className="cu-agent-select__chevron" aria-hidden="true" />
+ </button>
+ {contextSelectOpen ? (
+ <div className="cu-agent-select__menu" role="listbox">
+ {existingContexts.length === 0 ? (
+ <span className="cu-agent-select__empty">No contexts available.</span>
+ ) : (
+ existingContexts.map(ctx => {
+ const value = `${ctx.namespace}/${ctx.name}`
+ return (
+ <button
+ key={value}
+ type="button"
+ className="cu-agent-select__option"
+ data-active={selectedExistingContext === value ? 'true' : 'false'}
+ role="option"
+ aria-selected={selectedExistingContext === value}
+ onClick={() => selectExistingContext(ctx)}
+ >
+ {ctx.contextId}
+ </button>
+ )
+ })
+ )}
+ </div>
+ ) : null}
+ </div>
</div>
{selectedContextOption && (
- <div className="cu-agent-option-meta">
- MCP servers:{' '}
- {selectedContextOption.mcpServers.length > 0
- ? selectedContextOption.mcpServers.join(', ')
- : 'none'}
- </div>
+ <section
+ className="cu-agent-context-mcp-summary"
+ aria-label="Attached MCP servers"
+ >
+ <div className="cu-agent-context-mcp-summary__head">
+ <span>MCP servers</span>
+ <span>{selectedContextOption.mcpServers.length}</span>
+ </div>
+ {selectedContextOption.mcpServers.length > 0 ? (
+ <ul className="cu-agent-context-mcp-summary__list">
+ {selectedContextOption.mcpServers.map(server => (
+ <li key={server} title={server}>
+ {server}
+ </li>
+ ))}
+ </ul>
+ ) : (
+ <p className="cu-muted">No MCP servers attached.</p>
+ )}
+ </section>
)}
</>
) : (
@@ -1196,266 +953,6 @@ export function HostWizard({
</div>
)}
- {step === 4 && (
- <div className="cu-form-stack cu-agent-form-stack">
- <div className="cu-agent-review">
- Review: Agent <b>{toKebabCase(hostName) || '-'}</b>, Context{' '}
- <b>
- {contextMode === 'existing'
- ? selectedContextOption?.contextId || '-'
- : toKebabCase(contextName) || '-'}
- </b>
- , Model <b>{modelName || '-'}</b>, Secret{' '}
- <b>
- {secretMode === 'existing'
- ? existingSecret || '-'
- : toKebabCase(newSecretName) || '-'}
- </b>
- , Channel{' '}
- <b>
- {channelMode === 'existing'
- ? selectedChannelOption?.name || '-'
- : channelMode === 'new'
- ? toKebabCase(channelName) || '-'
- : 'skipped'}
- </b>
- </div>
- <div className="cu-agent-radio-group">
- <label className="cu-agent-radio cu-agent-radio--card">
- <input
- type="radio"
- checked={channelMode === 'existing'}
- onChange={() => setChannelMode('existing')}
- />
- <span className="cu-agent-radio__copy">
- <span className="cu-agent-radio__title">Use existing channel</span>
- <span className="cu-agent-radio__description">
- Attach a saved external channel to this agent.
- </span>
- </span>
- </label>
- <label className="cu-agent-radio cu-agent-radio--card">
- <input
- type="radio"
- checked={channelMode === 'new'}
- onChange={() => setChannelMode('new')}
- />
- <span className="cu-agent-radio__copy">
- <span className="cu-agent-radio__title">Create new channel</span>
- <span className="cu-agent-radio__description">
- Configure a new external channel and attach it immediately.
- </span>
- </span>
- </label>
- </div>
- {channelMode === 'existing' ? (
- <div
- className="cu-agent-select"
- ref={channelSelectRef}
- onBlur={event => {
- if (!event.currentTarget.contains(event.relatedTarget)) {
- setChannelSelectOpen(false)
- }
- }}
- >
- <button
- type="button"
- className="cu-agent-select__button"
- aria-expanded={channelSelectOpen}
- aria-haspopup="listbox"
- onClick={() => setChannelSelectOpen(open => !open)}
- >
- <span>{selectedChannelLabel}</span>
- <span className="cu-agent-select__chevron" aria-hidden="true" />
- </button>
- {channelSelectOpen ? (
- <div className="cu-agent-select__menu" role="listbox">
- {existingChannels.length === 0 ? (
- <span className="cu-agent-select__empty">No channels available.</span>
- ) : (
- existingChannels.map(channel => {
- const value = `${channel.namespace}/${channel.name}`
- return (
- <button
- key={value}
- type="button"
- className="cu-agent-select__option"
- data-active={selectedExistingChannel === value ? 'true' : 'false'}
- role="option"
- aria-selected={selectedExistingChannel === value}
- onClick={() => selectExistingChannel(channel)}
- >
- <span className="cu-agent-select__option-copy">
- <span className="cu-agent-select__option-name">{channel.name}</span>
- <span className="cu-agent-select__option-meta">
- {channel.namespace}
- </span>
- </span>
- </button>
- )
- })
- )}
- </div>
- ) : null}
- </div>
- ) : (
- <>
- <Field
- description="Automatically formatted to lowercase with hyphens."
- label="CommunicationChannel name"
- >
- <TextInput
- value={channelName}
- onChange={e => setChannelName(toKebabInput(e.target.value))}
- placeholder="channel-name"
- />
- </Field>
- <div className="cu-agent-access-section">
- <strong>Provider</strong>
- <span className="cu-muted cu-agent-access-hint">
- Users will confirm the Telegram chat or Slack conversation after this channel
- exists.
- </span>
- <WizardSelect
- value={channelProvider}
- placeholder="Select provider..."
- options={CHANNEL_PROVIDER_OPTIONS}
- onChange={nextValue =>
- handleChannelProviderChange(nextValue as ChannelProvider)
- }
- />
- {channelProvider === 'telegram' ? (
- <>
- <Field
- description="Public bot username, with or without the leading @."
- label={
- <>
- Telegram bot handle{' '}
- <span
- className="cu-help-tooltip"
- tabIndex={0}
- aria-label="We use this handle to show users which Telegram bot to message when connecting their account or a group."
- data-tooltip="We use this handle to show users which Telegram bot to message when connecting their account or a group."
- >
- ?
- </span>
- </>
- }
- >
- <TextInput
- value={newChannelDraft.telegramBotHandle}
- onChange={e =>
- setNewChannelDraft(current => ({
- ...current,
- telegramBotHandle: e.target.value,
- }))
- }
- placeholder="@your_bot"
- autoComplete="off"
- />
- </Field>
- <CheckboxField
- checked={newChannelDraft.telegramReplyOnlyWhenMentioned}
- description="In groups and supergroups, process messages only when the bot is mentioned or replied to. Private chats are unaffected."
- label="Only respond when mentioned in groups"
- onChange={e =>
- setNewChannelDraft(current => ({
- ...current,
- telegramReplyOnlyWhenMentioned: e.target.checked,
- }))
- }
- />
- </>
- ) : (
- <>
- <div className="cu-banner cu-banner--info">
- Install your Slack app in the workspace first. Store the Signing Secret and
- Bot User OAuth token below. The workspace is detected when a user verifies a
- Slack conversation.
- </div>
- <Field
- description="Shown to users so they know which Slack App to message."
- label={
- <>
- Slack App Name{' '}
- <span
- className="cu-help-tooltip"
- tabIndex={0}
- aria-label="We use this name to show users which Slack App to message"
- data-tooltip="We use this name to show users which Slack App to message"
- >
- ?
- </span>
- </>
- }
- >
- <TextInput
- value={newChannelDraft.slackBotHandle}
- onChange={e =>
- setNewChannelDraft(current => ({
- ...current,
- slackBotHandle: e.target.value,
- }))
- }
- placeholder="Your Slack App"
- autoComplete="off"
- />
- </Field>
- <CheckboxField
- checked={newChannelDraft.slackReplyOnlyWhenMentioned}
- description="Process Slack messages only when the app bot is mentioned."
- label="Only respond when mentioned"
- onChange={e =>
- setNewChannelDraft(current => ({
- ...current,
- slackReplyOnlyWhenMentioned: e.target.checked,
- }))
- }
- />
- <CheckboxField
- checked={newChannelDraft.slackReplyInThreads}
- description={
- <>
- Send app responses in a Slack thread and keep responses in that thread
- until a new top-level message starts a new thread.{' '}
- <span
- className="cu-help-tooltip"
- tabIndex={0}
- aria-label="When enabled, app responses are posted in a Slack thread and follow-up messages in that thread continue there. New top-level messages start a new thread."
- data-tooltip="When enabled, app responses are posted in a Slack thread and follow-up messages in that thread continue there. New top-level messages start a new thread."
- >
- ?
- </span>
- </>
- }
- label="Reply in threads"
- onChange={e =>
- setNewChannelDraft(current => ({
- ...current,
- slackReplyInThreads: e.target.checked,
- }))
- }
- />
- </>
- )}
- </div>
- <ChannelCredentialsPanel
- ccName={channelName.trim()}
- pending={true}
- presentation="inline"
- onPendingChange={setPendingCredentials}
- visibleChannelTypes={visibleChannelTypes}
- />
- <p className="cu-agent-access-note">
- Channel access will use the members and teams selected in the Access step:{' '}
- {selectedUserIds.length} member{selectedUserIds.length === 1 ? '' : 's'} and{' '}
- {selectedTeamIds.length} team{selectedTeamIds.length === 1 ? '' : 's'}.
- </p>
- </>
- )}
- </div>
- )}
-
{step === 2 && (
<div className="cu-form-stack cu-agent-form-stack">
<div className="cu-agent-access-section">
@@ -1492,12 +989,15 @@ export function HostWizard({
</label>
</div>
{secretMode === 'existing' ? (
- <WizardSelect
- value={existingSecret}
- placeholder="Select secret..."
- options={secretOptions}
- onChange={setExistingSecret}
- />
+ <div className="cu-agent-access-section">
+ <strong>Credential</strong>
+ <WizardSelect
+ value={existingSecret}
+ placeholder="Select secret..."
+ options={secretOptions}
+ onChange={handleExistingSecretChange}
+ />
+ </div>
) : (
<Field
description="Auto-named from the agent — edit if you prefer a different name."
@@ -1686,24 +1186,14 @@ export function HostWizard({
Next
</Button>
) : (
- <>
- <Button
- onClick={() => void submitAll({ skipChannels: true })}
- disabled={busy}
- size="sm"
- variant="ghost"
- >
- Skip channel setup
- </Button>
- <Button
- onClick={() => void submitAll()}
- disabled={busy || !canNext}
- size="sm"
- variant="primary"
- >
- {busy ? 'Saving…' : 'Create Agent'}
- </Button>
- </>
+ <Button
+ onClick={() => void submitAll()}
+ disabled={busy || !canNext}
+ size="sm"
+ variant="primary"
+ >
+ {busy ? 'Saving…' : 'Create Agent'}
+ </Button>
)}
</div>
</CreateStepFlow>
diff --git a/control-ui/components/HostWizard/types.ts b/control-ui/components/HostWizard/types.ts
index 98a7e3cf3..3dabd3e8d 100644
--- a/control-ui/components/HostWizard/types.ts
+++ b/control-ui/components/HostWizard/types.ts
@@ -1,5 +1,4 @@
import type { ReactNode } from 'react'
-import type { ChannelType } from '../../lib/channelTypes'
export type McpServer = {
metadata?: { name?: string; namespace?: string }
@@ -13,18 +12,6 @@ export type SecretMeta = {
type?: string
}
-export type { ChannelType }
-
-export type ChannelProvider = Extract<ChannelType, 'telegram' | 'slack'>
-
-export type NewChannelDraft = {
- slackBotHandle: string
- slackReplyOnlyWhenMentioned: boolean
- slackReplyInThreads: boolean
- telegramBotHandle: string
- telegramReplyOnlyWhenMentioned: boolean
-}
-
export type ContextOption = {
contextId: string
mcpServers: string[]
@@ -32,12 +19,6 @@ export type ContextOption = {
namespace: string
}
-export type ChannelOption = {
- name: string
- namespace: string
- spec: Record<string, unknown>
-}
-
export type HostWizardProps = {
existingSecrets: SecretMeta[]
mcpServers: McpServer[]
diff --git a/control-ui/components/RegistryCatalog.tsx b/control-ui/components/RegistryCatalog.tsx
index 335c198b8..a0ff47e9c 100644
--- a/control-ui/components/RegistryCatalog.tsx
+++ b/control-ui/components/RegistryCatalog.tsx
@@ -2,30 +2,23 @@
import { Fragment, useEffect, useMemo, useState } from 'react'
import Link from 'next/link'
-import { usePathname, useRouter } from 'next/navigation'
+import { useRouter } from 'next/navigation'
import { FilterSelect } from '@components/FilterSelect'
import { MarketplaceTabs } from '@components/MarketplaceTabs'
import { type RowAction, RowActionsMenu } from '@components/RowActionsMenu'
import { SectionSearchInput } from '@components/SectionSearchInput'
import { IconStore } from '@components/Sidebar/icons'
import { SkeletonTableRows } from '@components/SkeletonTableRows'
-import { TabBar } from '@components/TabBar'
import { TableHeaderRow } from '@components/TableHeaderRow'
import type { TableHeaderColumn } from '@components/TableHeaderRow/types'
import { TablePanelHeader } from '@components/TablePanelHeader'
import { useToast } from '@components/Toast'
-import { IconChevronRight, IconX } from '@components/icons'
+import { IconChevronRight } from '@components/icons'
import { CONTROL_ROUTES } from '@constants/routes'
-import {
- type RegistryEntry,
- deleteRegistryEntry,
- getRegistryCatalog,
- installRecipeFromRegistry,
-} from '../lib/api'
+import { type RegistryEntry, deleteRegistryEntry, getRegistryCatalog } from '../lib/api'
import { useRegistryCapability } from '../lib/hooks/useRegistryCapability'
import { trustBgColor, trustColor } from '../lib/trustLevel'
-type MarketplaceTab = 'connectors' | 'plugins'
type CatalogSortKey = 'name' | 'version'
type SortDirection = 'asc' | 'desc'
@@ -52,21 +45,14 @@ function compareVersions(left: string, right: string): number {
}
export default function RegistryCatalog() {
- const pathname = usePathname()
const router = useRouter()
const { showToast } = useToast()
- const activeTab: MarketplaceTab =
- pathname === CONTROL_ROUTES.marketplace.plugins ? 'plugins' : 'connectors'
- const activeEntryType = activeTab === 'plugins' ? 'recipe' : 'mcp-server'
const [entries, setEntries] = useState<RegistryEntry[]>([])
const [categories, setCategories] = useState<string[]>([])
const [installedCatalogKeys, setInstalledCatalogKeys] = useState<Set<string>>(new Set())
const [installedServerNames, setInstalledServerNames] = useState<Set<string>>(new Set())
- const [installedRecipeKeys, setInstalledRecipeKeys] = useState<Set<string>>(new Set())
const [loading, setLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
- const [installingRecipeKey, setInstallingRecipeKey] = useState('')
- const [installError, setInstallError] = useState('')
const [search, setSearch] = useState('')
const [categoryFilter, setCategoryFilter] = useState('all')
const [sortKey, setSortKey] = useState<CatalogSortKey | null>(null)
@@ -103,14 +89,20 @@ export default function RegistryCatalog() {
async function loadData() {
setLoading(true)
setError(null)
- setInstallError('')
try {
const catalog = await getRegistryCatalog({ limit: '200' })
setEntries(catalog.data)
- setCategories(catalog.categories)
+ setCategories(
+ Array.from(
+ new Set(
+ catalog.data
+ .filter(entry => entry.entry_type === 'mcp-server')
+ .map(entry => entry.category)
+ )
+ ).sort((left, right) => left.localeCompare(right))
+ )
setInstalledCatalogKeys(new Set(catalog.installed.catalogKeys))
setInstalledServerNames(new Set(catalog.installed.serverNames))
- setInstalledRecipeKeys(new Set(catalog.installed.recipeKeys))
} catch (loadError) {
setError(loadError instanceof Error ? loadError.message : String(loadError))
} finally {
@@ -139,34 +131,12 @@ export default function RegistryCatalog() {
}
}
- async function handleInstallRecipe(entry: RegistryEntry) {
- if (entry.entry_type !== 'recipe' || !entry.recipe_meta?.recipeYaml) return
- const key = `${entry.name}@${entry.version}`
- setInstallingRecipeKey(key)
- setInstallError('')
- try {
- await installRecipeFromRegistry({
- registryEntryName: entry.name,
- registryEntryVersion: entry.version,
- recipeManifest: entry.recipe_meta.recipeYaml,
- })
- setInstalledRecipeKeys(current => new Set(current).add(key))
- showToast(`Installed ${entry.name} v${entry.version}.`, { tone: 'success' })
- } catch (installFailure) {
- setInstallError(
- installFailure instanceof Error ? installFailure.message : 'Failed to install plugin'
- )
- } finally {
- setInstallingRecipeKey('')
- }
- }
-
- const tabEntries = useMemo(
- () => entries.filter(entry => entry.entry_type === activeEntryType),
- [activeEntryType, entries]
+ const connectorEntries = useMemo(
+ () => entries.filter(entry => entry.entry_type === 'mcp-server'),
+ [entries]
)
const filtered = useMemo(() => {
- const visibleEntries = tabEntries.filter(entry => {
+ const visibleEntries = connectorEntries.filter(entry => {
if (entry.visibility === 'private') return false
if (categoryFilter !== 'all' && entry.category !== categoryFilter) return false
if (!search) return true
@@ -187,7 +157,7 @@ export default function RegistryCatalog() {
: compareVersions(left.version, right.version)
return comparison * direction
})
- }, [categoryFilter, search, sortDirection, sortKey, tabEntries])
+ }, [categoryFilter, connectorEntries, search, sortDirection, sortKey])
const isInitialLoad = loading && entries.length === 0
@@ -224,54 +194,31 @@ export default function RegistryCatalog() {
}
function isEntryInstalled(entry: RegistryEntry): boolean {
- if (entry.entry_type === 'mcp-server') {
- return (
- installedCatalogKeys.has(`${entry.name}@${entry.version}`) ||
- installedServerNames.has(entry.name)
- )
- }
- return installedRecipeKeys.has(`${entry.name}@${entry.version}`)
+ return (
+ installedCatalogKeys.has(`${entry.name}@${entry.version}`) ||
+ installedServerNames.has(entry.name)
+ )
}
function renderInstallButton(entry: RegistryEntry) {
const installed = isEntryInstalled(entry)
- const installing = installingRecipeKey === `${entry.name}@${entry.version}`
- if (entry.entry_type === 'mcp-server') {
- return installed ? (
- <button type="button" className="cu-btn cu-btn--sm" disabled>
- Installed
- </button>
- ) : (
- <button
- type="button"
- className="cu-btn cu-btn--sm cu-btn--primary"
- onClick={() =>
- router.push(
- CONTROL_ROUTES.marketplace.install({ entry: entry.name, version: entry.version })
- )
- }
- >
- Install
- </button>
- )
- }
- if (entry.recipe_meta?.recipeYaml) {
- return installed ? (
- <button type="button" className="cu-btn cu-btn--sm" disabled>
- Installed
- </button>
- ) : (
- <button
- type="button"
- className="cu-btn cu-btn--sm cu-btn--primary"
- disabled={installing}
- onClick={() => void handleInstallRecipe(entry)}
- >
- {installing ? 'Installing...' : 'Install'}
- </button>
- )
- }
- return <span className="cu-registry-missing">No plugin data</span>
+ return installed ? (
+ <button type="button" className="cu-btn cu-btn--sm" disabled>
+ Installed
+ </button>
+ ) : (
+ <button
+ type="button"
+ className="cu-btn cu-btn--sm cu-btn--primary"
+ onClick={() =>
+ router.push(
+ CONTROL_ROUTES.marketplace.install({ entry: entry.name, version: entry.version })
+ )
+ }
+ >
+ Install
+ </button>
+ )
}
// An entry belongs to this deployment's org when its name carries the org
@@ -298,7 +245,7 @@ export default function RegistryCatalog() {
<div className="cu-banner cu-banner--info" role="status">
<span>
This deployment isn&apos;t connected to a registry. Connect it to publish and install
- connectors and plugins.
+ connectors.
</span>
<button
type="button"
@@ -325,19 +272,6 @@ export default function RegistryCatalog() {
return (
<div className="cu-registry-layout">
- {installError ? (
- <div className="cu-banner cu-banner--error cu-banner--dismissible" role="alert">
- <span>{installError}</span>
- <button
- type="button"
- className="cu-banner__dismiss"
- onClick={() => setInstallError('')}
- aria-label="Dismiss install error"
- >
- <IconX width={14} height={14} />
- </button>
- </div>
- ) : null}
{connectBanner}
<div className="cu-card cu-card--viewport-fill cu-section-card">
<TablePanelHeader
@@ -381,15 +315,14 @@ export default function RegistryCatalog() {
</button>
) : null}
{/* Publish-to-Marketplace hidden for now under the distribution
- strategy narrowing (plugins are org-private only; users cannot
- publish to a public catalog). Commented out — restore when
- public/org publishing returns to discovery.
+ strategy narrowing. Commented out — restore when public/org
+ connector publishing returns to discovery.
{canManageOrg || isCurator ? (
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
onClick={() =>
- router.push(CONTROL_ROUTES.marketplace.publish({ type: activeEntryType }))
+ router.push(CONTROL_ROUTES.marketplace.publish({ type: 'mcp-server' }))
}
disabled={isInitialLoad}
>
@@ -401,24 +334,6 @@ export default function RegistryCatalog() {
}
/>
<MarketplaceTabs active="connectors" />
-
- <TabBar<MarketplaceTab>
- ariaLabel="Marketplace entry types"
- activeValue={activeTab}
- className="cu-tabs--flush-top"
- options={[
- {
- value: 'connectors',
- href: CONTROL_ROUTES.marketplace.connectors,
- label: 'Connectors',
- },
- {
- value: 'plugins',
- href: CONTROL_ROUTES.marketplace.plugins,
- label: 'Plugins',
- },
- ]}
- />
<div className="cu-table-wrap cu-marketplace-table-wrap">
<table className="cu-table cu-table--header-band cu-expandable-table cu-marketplace-table">
<thead>
@@ -433,7 +348,7 @@ export default function RegistryCatalog() {
const expanded = expandedKeys.has(expandKey)
const typeMeta = entry.server_mode
? `${entry.server_mode}${entry.transport ? ` / ${entry.transport}` : ''}`
- : entry.recipe_type || '—'
+ : '—'
return (
<Fragment key={entry.id}>
<tr
@@ -573,7 +488,7 @@ export default function RegistryCatalog() {
{!isInitialLoad && filtered.length === 0 ? (
<tr>
<td colSpan={columns.length} className="cu-empty">
- No entries match your filters.
+ No connectors match your filters.
</td>
</tr>
) : null}
diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsx
index d13946138..cac44a273 100644
--- a/control-ui/components/__tests__/GfsBrowser.test.tsx
+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx
@@ -162,6 +162,28 @@ describe('GfsBrowser', () => {
expect(mockApiGet).toHaveBeenCalledWith('/api/v1/gfs/tree', { drive: 'main' })
})
+ it('uses the paperclip header, labels the root as main, and ignores current-crumb clicks', async () => {
+ mockApiGet.mockResolvedValueOnce({ items: [], nextCursor: null })
+ renderBrowser()
+ await screen.findByText('No resources are visible in this folder.')
+
+ const title = screen.getByText('Global File System').closest('.cu-panel-title')
+ expect(title?.querySelector('path')).toHaveAttribute(
+ 'd',
+ 'm21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'
+ )
+
+ const breadcrumb = screen.getByRole('navigation', { name: 'Breadcrumb' })
+ expect(within(breadcrumb).queryByText('Drive', { exact: true })).toBeNull()
+ const rootCrumb = within(breadcrumb).getByRole('button', { name: 'main' })
+ expect(rootCrumb).toHaveAttribute('aria-current', 'page')
+
+ fireEvent.click(rootCrumb)
+
+ expect(screen.queryByRole('status', { name: 'Loading files' })).toBeNull()
+ expect(mockApiGet).toHaveBeenCalledTimes(1)
+ })
+
it('shows the subtle loader during initial load and folder navigation', async () => {
let resolveRoot: ((value: unknown) => void) | undefined
let resolveFolder: ((value: unknown) => void) | undefined
diff --git a/control-ui/components/__tests__/HostWizard.test.tsx b/control-ui/components/__tests__/HostWizard.test.tsx
index 008471160..c1213d5a6 100644
--- a/control-ui/components/__tests__/HostWizard.test.tsx
+++ b/control-ui/components/__tests__/HostWizard.test.tsx
@@ -49,6 +49,28 @@ vi.mock('../../lib/api', () => ({
created_at: '',
updated_at: '',
},
+ {
+ id: 'm2',
+ provider: 'claude',
+ model: 'claude-sonnet-4-6',
+ vendor: 'Anthropic',
+ display_name: null,
+ context_window_tokens: null,
+ enabled: true,
+ created_at: '',
+ updated_at: '',
+ },
+ {
+ id: 'm3',
+ provider: 'zai',
+ model: 'glm-5.1',
+ vendor: 'Z.AI',
+ display_name: null,
+ context_window_tokens: null,
+ enabled: true,
+ created_at: '',
+ updated_at: '',
+ },
],
}),
isSilentApiError: vi.fn().mockReturnValue(false),
@@ -121,11 +143,6 @@ async function walkToAccessStep(opts?: { agentName?: string }) {
// Now at the "Access" step.
}
-async function continueFromAccessToChannels() {
- fireEvent.click(screen.getByRole('button', { name: 'Next' }))
- expect(screen.getByRole('button', { name: /Skip channel setup/i })).toBeInTheDocument()
-}
-
function openTeamsAccessTab() {
fireEvent.click(screen.getByRole('tab', { name: /Teams/i }))
}
@@ -155,7 +172,35 @@ describe('HostWizard — credential draft is projected onto the active provider
fireEvent.click(screen.getByLabelText(/Use an existing Secret/i))
fireEvent.click(screen.getByRole('button', { name: /Select secret/i }))
- expect(screen.getByText('Providers: OpenAI, Amazon Bedrock')).toBeInTheDocument()
+ expect(screen.getByText(/Providers: OpenAI, Amazon Bedrock/)).toBeInTheDocument()
+ })
+
+ it('matches the primary provider to the selected credential', async () => {
+ await renderWizard({
+ existingSecrets: [
+ { name: 'zai-only', keys: ['zai-api-key'] },
+ { name: 'anthropic-and-zai', keys: ['claude-api-key', 'zai-api-key'] },
+ ],
+ })
+ await waitFor(() => expect(api.getAdminUsers).toHaveBeenCalled())
+
+ fireEvent.change(screen.getByPlaceholderText(/agent-name/i), { target: { value: 'testagent' } })
+ fireEvent.click(screen.getByRole('button', { name: 'Next' }))
+ fireEvent.click(screen.getByLabelText(/Create new context/i))
+ fireEvent.change(screen.getByPlaceholderText(/context-name/i), { target: { value: 'ctx1' } })
+ fireEvent.click(screen.getByRole('button', { name: 'Next' }))
+
+ fireEvent.click(screen.getByRole('button', { name: /Select secret/i }))
+ fireEvent.click(screen.getByRole('option', { name: /zai-only/i }))
+ const providerField = screen.getByText('Provider', { selector: 'label' }).parentElement
+ const modelField = screen.getByText('Default model', { selector: 'label' }).parentElement
+ expect(providerField).toHaveTextContent('Z.AI')
+ expect(modelField).toHaveTextContent('glm-5.1')
+
+ fireEvent.click(screen.getByRole('button', { name: /zai-only/i }))
+ fireEvent.click(screen.getByRole('option', { name: /anthropic-and-zai/i }))
+ expect(providerField).toHaveTextContent('Anthropic')
+ expect(modelField).toHaveTextContent('claude-sonnet-4-6')
})
it('leads with an existing Secret and keeps fallback providers collapsed in create', async () => {
@@ -172,6 +217,9 @@ describe('HostWizard — credential draft is projected onto the active provider
const newCard = screen.getByLabelText(/New credential/i).closest('label')
expect(existingCard).not.toBeNull()
expect(newCard).not.toBeNull()
+ expect(screen.getByLabelText(/Use an existing Secret/i)).toBeChecked()
+ expect(screen.getByLabelText(/New credential/i)).not.toBeChecked()
+ expect(screen.getByText('Credential', { selector: 'strong' })).toBeInTheDocument()
expect(existingCard?.compareDocumentPosition(newCard as Node)).toBe(
Node.DOCUMENT_POSITION_FOLLOWING
)
@@ -198,7 +246,8 @@ describe('HostWizard — credential draft is projected onto the active provider
fireEvent.change(screen.getByPlaceholderText(/context-name/i), { target: { value: 'ctx1' } })
fireEvent.click(screen.getByRole('button', { name: 'Next' }))
- // Step 2: default "new secret". Make the OpenAI primary usable.
+ // Step 2: explicitly create a new Secret and make the OpenAI primary usable.
+ fireEvent.click(screen.getByLabelText(/New credential/i))
fireEvent.change(screen.getByLabelText(/OpenAI API key/i), { target: { value: 'sk-openai' } })
// Add a fallback and switch it to Bedrock (a different provider than the
@@ -222,10 +271,9 @@ describe('HostWizard — credential draft is projected onto the active provider
expect(screen.getByRole('button', { name: 'Next' })).not.toBeDisabled()
})
- // Walk to the last step and create.
+ // Walk to the final Access step and create.
fireEvent.click(screen.getByRole('button', { name: 'Next' })) // → Access
- await continueFromAccessToChannels() // → Channels
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
await waitFor(() => {
expect(api.apiSend).toHaveBeenCalledWith(
@@ -244,6 +292,38 @@ describe('HostWizard — credential draft is projected onto the active provider
})
describe('HostWizard — Context creation', () => {
+ it('titles the existing context selector and shows attached MCP servers as chips', async () => {
+ vi.mocked(api.apiGet)
+ .mockResolvedValueOnce({
+ items: [
+ {
+ metadata: { name: 'business', namespace: 'mcp-host' },
+ spec: { contextId: 'business', mcpServers: ['mcp-a', 'mcp-b'] },
+ },
+ ],
+ })
+ .mockResolvedValueOnce({ items: [] })
+ await renderWizard()
+
+ fireEvent.change(screen.getByPlaceholderText(/agent-name/i), {
+ target: { value: 'existing-context-agent' },
+ })
+ fireEvent.click(screen.getByRole('button', { name: 'Next' }))
+
+ const title = screen.getByText('Select Context', { selector: 'strong' })
+ const selector = screen.getByRole('button', { name: /Select context/i })
+ expect(title.compareDocumentPosition(selector)).toBe(Node.DOCUMENT_POSITION_FOLLOWING)
+
+ fireEvent.click(selector)
+ fireEvent.click(screen.getByRole('option', { name: 'business' }))
+ const summary = screen.getByRole('region', { name: 'Attached MCP servers' })
+ expect(summary).toHaveTextContent('MCP servers')
+ expect(summary).toHaveTextContent('2')
+ expect(summary.querySelectorAll('li')).toHaveLength(2)
+ expect(summary).toHaveTextContent('mcp-a')
+ expect(summary).toHaveTextContent('mcp-b')
+ })
+
it('allows a new context with only a name and no MCP servers selected', async () => {
await renderWizard()
@@ -299,23 +379,23 @@ describe("HostWizard — 'Access' empty state", () => {
})
})
-describe('HostWizard — Access selection does not gate continuing', () => {
- it("keeps 'Next' enabled when selection is empty", async () => {
+describe('HostWizard — Access is the final step', () => {
+ it("keeps 'Create Agent' enabled when selection is empty", async () => {
await renderWizard()
await walkToAccessStep()
- const nextBtn = screen.getByRole('button', { name: 'Next' })
- expect(nextBtn).not.toBeDisabled()
+ expect(screen.queryByText('Channels')).not.toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'Next' })).not.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: /Create Agent/i })).not.toBeDisabled()
})
- it("enables 'Next' when a user is selected", async () => {
+ it("keeps 'Create Agent' enabled when a user is selected", async () => {
await renderWizard()
await walkToAccessStep()
fireEvent.click(screen.getByLabelText(/alice/i))
- const nextBtn = screen.getByRole('button', { name: 'Next' })
- expect(nextBtn).not.toBeDisabled()
+ expect(screen.getByRole('button', { name: /Create Agent/i })).not.toBeDisabled()
})
})
@@ -324,20 +404,24 @@ describe('HostWizard — submit path uses the atomic agent-centric endpoints', (
await renderWizard()
await walkToAccessStep({ agentName: 'empty-access-test' })
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
await waitFor(() => {
expect(screen.queryByText(/Failed to create agent resources/i)).not.toBeInTheDocument()
expect(api.apiSend).toHaveBeenCalledWith(
'PUT',
'/api/v1/admin/hosts/empty-access-test',
- expect.any(Object)
+ expect.objectContaining({ spec: expect.objectContaining({ channels: [] }) })
)
})
expect(vi.mocked(api.updateAgentUsers)).not.toHaveBeenCalled()
expect(vi.mocked(api.updateAgentTeams)).not.toHaveBeenCalled()
+ expect(
+ vi
+ .mocked(api.apiSend)
+ .mock.calls.some(call => String(call[1]).includes('/communication-channels'))
+ ).toBe(false)
})
it('calls updateAgentUsers exactly ONCE when selecting multiple users (not N times as the old loop did)', async () => {
@@ -349,8 +433,7 @@ describe('HostWizard — submit path uses the atomic agent-centric endpoints', (
fireEvent.click(screen.getByLabelText(/bob/i))
// Submit
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
// Wait for the submit pipeline to reach the agent-user association step
await waitFor(() => {
@@ -373,8 +456,7 @@ describe('HostWizard — submit path uses the atomic agent-centric endpoints', (
openTeamsAccessTab()
fireEvent.click(screen.getByLabelText(/engineering/i))
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
await waitFor(() => {
expect(vi.mocked(api.updateAgentTeams)).toHaveBeenCalled()
@@ -391,8 +473,7 @@ describe('HostWizard — submit path uses the atomic agent-centric endpoints', (
fireEvent.click(screen.getByLabelText(/alice/i))
openTeamsAccessTab()
fireEvent.click(screen.getByLabelText(/engineering/i))
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
await waitFor(() => {
expect(vi.mocked(api.updateAgentUsers)).toHaveBeenCalled()
@@ -402,80 +483,6 @@ describe('HostWizard — submit path uses the atomic agent-centric endpoints', (
expect(vi.mocked(api.updateAgentUsers)).toHaveBeenCalledTimes(1)
expect(vi.mocked(api.updateAgentTeams)).toHaveBeenCalledTimes(1)
})
-
- it('creates a new Telegram channel with provider settings and access grants', async () => {
- vi.mocked(api.apiSend).mockImplementation(async (method, url) => {
- if (
- method === 'PUT' &&
- String(url).includes('/api/v1/admin/communication-channels/new-telegram-channel')
- ) {
- throw new Error('not found')
- }
- return {}
- })
-
- await renderWizard()
- await walkToAccessStep({ agentName: 'agent-with-channel' })
-
- fireEvent.click(screen.getByLabelText(/alice/i))
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByLabelText(/Create new channel/i))
- fireEvent.change(screen.getByPlaceholderText(/^channel-name$/i), {
- target: { value: 'new-telegram-channel' },
- })
- fireEvent.change(screen.getByPlaceholderText(/@your_bot/i), {
- target: { value: '@clerum_test_bot' },
- })
- fireEvent.change(screen.getByLabelText(/Telegram Bot Token/i), {
- target: { value: '123:ABC' },
- })
-
- await waitFor(() => {
- expect(screen.getByRole('button', { name: /Create Agent/i })).not.toBeDisabled()
- })
- fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
-
- await waitFor(() => {
- expect(api.apiSend).toHaveBeenCalledWith(
- 'POST',
- '/api/v1/admin/communication-channels',
- expect.objectContaining({
- metadata: { name: 'new-telegram-channel' },
- credentials: { 'telegram-bot-token': '123:ABC' },
- spec: expect.objectContaining({
- hostRef: 'agent-with-channel',
- access: { users: ['user-a'], teams: [] },
- telegram: [],
- slack: [],
- telegramSettings: {
- botHandle: '@clerum_test_bot',
- replyOnlyWhenMentioned: true,
- },
- }),
- })
- )
- })
- await waitFor(() => {
- expect(api.apiSend).toHaveBeenCalledWith(
- 'PUT',
- '/api/v1/admin/hosts/agent-with-channel',
- expect.objectContaining({
- spec: expect.objectContaining({
- channels: ['new-telegram-channel'],
- workflowControl: {
- scopes: [
- 'workflow:list',
- 'workflow:read',
- 'workflow:trigger',
- 'workflow:approval:resolve',
- 'workflow:approval:decide',
- ],
- },
- }),
- })
- )
- })
- })
})
describe('HostWizard — loadDirectory error surfacing (no more silent catch)', () => {
@@ -549,8 +556,7 @@ describe('HostWizard — Agent type (stateless lifecycle)', () => {
it('omits spec.lifecycle from the created Host when Stateful is kept (absent = disabled)', async () => {
await renderWizard()
await walkToAccessStep({ agentName: 'stateful-agent' })
- await continueFromAccessToChannels()
- fireEvent.click(screen.getByRole('button', { name: /Skip channel setup/i }))
+ fireEvent.click(screen.getByRole('button', { name: /Create Agent/i }))
await waitFor(() => {
expect(api.apiSend).toHaveBeenCalledWith(
diff --git a/control-ui/components/__tests__/RegistryCatalog.test.tsx b/control-ui/components/__tests__/RegistryCatalog.test.tsx
index db5575a94..b2c76d586 100644
--- a/control-ui/components/__tests__/RegistryCatalog.test.tsx
+++ b/control-ui/components/__tests__/RegistryCatalog.test.tsx
@@ -19,16 +19,13 @@ vi.mock('../../lib/api', () => ({
getRegistryConnection: vi.fn(),
getPublishScope: vi.fn(),
deleteRegistryEntry: vi.fn(),
- installRecipeFromRegistry: vi.fn(),
}))
const navigation = vi.hoisted(() => ({
- pathname: '/marketplace/connectors',
push: vi.fn(),
}))
vi.mock('next/navigation', () => ({
- usePathname: () => navigation.pathname,
useRouter: () => ({ push: navigation.push }),
}))
@@ -126,7 +123,6 @@ beforeEach(() => {
afterEach(() => {
cleanup()
vi.clearAllMocks()
- navigation.pathname = '/marketplace/connectors'
})
describe('RegistryCatalog tabs and columns', () => {
@@ -142,16 +138,15 @@ describe('RegistryCatalog tabs and columns', () => {
expect(screen.queryByText(/Marketplace \(/)).not.toBeInTheDocument()
})
- it('shows only plugin entries on the plugins route', async () => {
- navigation.pathname = '/marketplace/plugins'
+ it('keeps the catalog connector-only when recipe entries are returned', async () => {
mockApiSuccess()
render(<RegistryCatalog />)
- expect(await screen.findByText('market-report')).toBeInTheDocument()
- expect(screen.queryByText('brave-search')).not.toBeInTheDocument()
+ expect(await screen.findByText('brave-search')).toBeInTheDocument()
+ expect(screen.queryByText('market-report')).not.toBeInTheDocument()
})
- it('uses the same compact columns for both tabs', async () => {
+ it('uses compact connector columns', async () => {
mockApiSuccess()
render(<RegistryCatalog />)
await screen.findByText('brave-search')
@@ -179,19 +174,20 @@ describe('RegistryCatalog tabs and columns', () => {
expect(screen.queryByText('private-search')).not.toBeInTheDocument()
})
- it('provides canonical tabs for connectors and plugins', async () => {
+ it('shows a single Connectors tab and hides the Plugins tab', async () => {
mockApiSuccess()
render(<RegistryCatalog />)
await screen.findByText('brave-search')
+ expect(screen.getAllByRole('tab', { name: 'Connectors' })).toHaveLength(1)
expect(screen.getByRole('tab', { name: 'Connectors' })).toHaveAttribute(
'href',
'/marketplace/connectors'
)
- expect(screen.getByRole('tab', { name: 'Plugins' })).toHaveAttribute(
- 'href',
- '/marketplace/plugins'
- )
+ expect(screen.queryByRole('tab', { name: 'Plugins' })).not.toBeInTheDocument()
+ expect(
+ screen.queryByRole('tablist', { name: 'Marketplace entry types' })
+ ).not.toBeInTheDocument()
})
it('places Marketplace navigation below the panel header', async () => {
@@ -286,24 +282,6 @@ describe('RegistryCatalog expansion and actions', () => {
expect(row).toHaveAttribute('aria-expanded', 'false')
})
- it('installs a plugin from the plugins tab', async () => {
- navigation.pathname = '/marketplace/plugins'
- mockApiSuccess()
- vi.mocked(api.installRecipeFromRegistry).mockResolvedValue({
- recipeName: 'market-report',
- registryEntry: 'market-report',
- registryVersion: '1.0.0',
- correlationId: 'test-correlation',
- })
- render(<RegistryCatalog />)
- const row = (await screen.findByText('market-report')).closest('tr')!
-
- fireEvent.click(within(row).getByRole('button', { name: 'Install' }))
-
- await waitFor(() => expect(api.installRecipeFromRegistry).toHaveBeenCalledOnce())
- expect(row).toHaveAttribute('aria-expanded', 'false')
- })
-
it('marks installed connectors as unavailable for repeat installation', async () => {
mockApiSuccess(undefined, { installed: { serverNames: ['brave-search'] } })
render(<RegistryCatalog />)
@@ -386,7 +364,7 @@ describe('RegistryCatalog state handling', () => {
it('shows the empty state when no entries match', async () => {
mockApiSuccess([MOCK_RECIPE_ENTRY])
render(<RegistryCatalog />)
- expect(await screen.findByText('No entries match your filters.')).toBeInTheDocument()
+ expect(await screen.findByText('No connectors match your filters.')).toBeInTheDocument()
})
})
diff --git a/control-ui/e2e/qa-recorder-agent-create.spec.ts b/control-ui/e2e/qa-recorder-agent-create.spec.ts
index cb414b22c..112dba112 100644
--- a/control-ui/e2e/qa-recorder-agent-create.spec.ts
+++ b/control-ui/e2e/qa-recorder-agent-create.spec.ts
@@ -120,11 +120,9 @@ test.describe('optional QA recorder: Control UI agent creation', () => {
await expect(memberOption).toBeVisible()
await memberOption.click()
}
- await clickWizardNext(page)
-
- const skipChannels = page.getByRole('button', { name: /skip channel setup/i })
- await expect(skipChannels).toBeEnabled()
- await skipChannels.click()
+ const submitAgent = page.getByRole('button', { name: 'Create Agent', exact: true })
+ await expect(submitAgent).toBeEnabled()
+ await submitAgent.click()
await expect(page).toHaveURL(/\/(?:hosts|agents)$/)
const created = await waitForAgent(sessionRequest, agentName)
diff --git a/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts b/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
index a08b25e3e..9a32efe61 100644
--- a/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
+++ b/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
@@ -70,14 +70,12 @@ test.describe('optional QA recorder: Control UI create-form smoke', () => {
await screenshotAndLog(page, testInfo, 'control-ui-create-connector')
})
- test('Create agent form mounts, steps to context, and renders channel providers', async ({
- page,
- }, testInfo) => {
+ test('Create agent form mounts and steps to context', async ({ page }, testInfo) => {
await openCreatePage(page, '/agents/new')
await expectShell(
page,
'Create agent',
- 'Provision a new agent with context, channels, and access.'
+ 'Provision a new agent with context, credentials, and access.'
)
await expect(page.getByPlaceholder('agent-name')).toBeVisible({ timeout: 20_000 })
@@ -91,14 +89,6 @@ test.describe('optional QA recorder: Control UI create-form smoke', () => {
timeout: 20_000,
})
- // The Channels step (Telegram + Slack provider panels) sits behind the
- // Model & Credentials step, which needs a reusable host Secret and a
- // selectable model. Drive there read-only when the environment provides
- // both; otherwise the shell + Context step above already prove the form.
- if (await canReachAgentChannelsStep(page)) {
- await assertAgentChannelProviders(page)
- }
-
await screenshotAndLog(page, testInfo, 'control-ui-create-agent')
})
@@ -279,74 +269,3 @@ test.describe('optional QA recorder: Control UI create-form smoke', () => {
await screenshotAndLog(page, testInfo, 'control-ui-marketplace-install')
})
})
-
-// The agent Channels step renders both first-party provider panels (Telegram,
-// Slack) only after the wizard advances past Model & Credentials. Reaching it
-// read-only needs an existing host Secret and an auto-selected model, so every
-// advance is guarded: if a step cannot be satisfied in this environment, the
-// helper returns false and the smoke falls back to the shell proof above.
-
-async function clickAgentNext(page: Page, timeout = 8_000): Promise<boolean> {
- const next = page.locator('.cu-create-actions').getByRole('button', { name: 'Next', exact: true })
- try {
- await expect(next).toBeEnabled({ timeout })
- await next.click()
- return true
- } catch {
- return false
- }
-}
-
-async function canReachAgentChannelsStep(page: Page): Promise<boolean> {
- const stepTimeout = 8_000
-
- // Context step: create a fresh context so the journey does not depend on an
- // existing one.
- const newContextRadio = page.getByText('Create new context', { exact: true })
- if (!(await newContextRadio.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
- await newContextRadio.click()
- const contextName = page.getByPlaceholder('context-name')
- if (!(await contextName.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
- await contextName.fill('qa-smoke-agent-ctx')
- if (!(await clickAgentNext(page))) return false
-
- // Model & Credentials: reuse an existing host Secret and rely on the
- // allowlist to auto-select a model. Abort if none is available.
- const reuseSecret = page.getByText('Use an existing Secret', { exact: true })
- if (!(await reuseSecret.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
- await reuseSecret.click()
- const secretPicker = page.locator('.cu-agent-select__button').first()
- if (!(await secretPicker.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
- await secretPicker.click()
- const firstSecret = page.locator('.cu-agent-select__option').first()
- if (!(await firstSecret.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
- await firstSecret.click()
- // Next only enables once a model has been auto-selected from the allowlist.
- if (!(await clickAgentNext(page, 15_000))) return false
-
- // Access step: Next is always enabled here.
- if (!(await clickAgentNext(page))) return false
-
- // Channels step.
- return page
- .getByText('Create new channel', { exact: true })
- .isVisible({ timeout: stepTimeout })
- .catch(() => false)
-}
-
-async function assertAgentChannelProviders(page: Page): Promise<void> {
- // Default provider is Telegram, so its panel is shown as soon as "Create new
- // channel" is chosen.
- await page.getByText('Create new channel', { exact: true }).click()
- await expect(page.getByText('Telegram bot handle')).toBeVisible({ timeout: 10_000 })
-
- // Switch to Slack and confirm its panel renders.
- await page.locator('.cu-agent-select__button').first().click()
- await page.locator('.cu-agent-select__option').filter({ hasText: 'Slack' }).first().click()
- await expect(page.getByText('Slack App Name')).toBeVisible({ timeout: 10_000 })
-
- // Switch back to Telegram to prove both providers are wired through the picker.
- await page.locator('.cu-agent-select__button').first().click()
- await page.locator('.cu-agent-select__option').filter({ hasText: 'Telegram' }).first().click()
- await expect(page.getByText('Telegram bot handle')).toBeVisible({ timeout: 10_000 })
-}
diff --git a/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts b/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
index ce32b76c9..f41455d17 100644
--- a/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
+++ b/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
@@ -36,26 +36,30 @@ test.describe('optional QA recorder: Control UI marketplace browse', () => {
await page.getByRole('link', { name: 'Marketplace', exact: true }).click()
await expect(page).toHaveURL(/\/marketplace\/connectors$/)
- // Catalog shell: the TablePanelHeader subtitle and connector-only tablist
+ // Catalog shell: the TablePanelHeader subtitle and top-level Marketplace tabs
// render regardless of catalog size or empty/loading/error state.
await expect(
- page.getByText('Discover and install connectors and plugins from the Marketplace.', {
+ page.getByText('Discover and install connectors from the Marketplace.', {
exact: true,
})
).toBeVisible({ timeout: 20_000 })
- const entryTabs = page.getByRole('tablist', { name: 'Marketplace entry types' })
- await expect(entryTabs.getByRole('tab', { name: 'Connectors', exact: true })).toBeVisible({
- timeout: 20_000,
- })
- await expect(entryTabs.getByRole('tab', { name: 'Plugins', exact: true })).toHaveCount(0)
+ const marketplaceTabs = page.getByRole('tablist', { name: 'Marketplace sections' })
+ await expect(marketplaceTabs.getByRole('tab', { name: 'Connectors', exact: true })).toBeVisible(
+ {
+ timeout: 20_000,
+ }
+ )
+ await expect(page.getByRole('tab', { name: 'Connectors', exact: true })).toHaveCount(1)
+ await expect(page.getByRole('tab', { name: 'Plugins', exact: true })).toHaveCount(0)
+ await expect(page.getByRole('tablist', { name: 'Marketplace entry types' })).toHaveCount(0)
// Search: a query that matches nothing drives the result set to the empty
// state (the catalog also shows it when entirely empty, so this is resilient
// to stripped environments). Wait for initial load to release the input.
- const connectorsSearch = page.getByLabel('Search Marketplace connectors', { exact: true })
+ const connectorsSearch = page.getByLabel('Search the Marketplace', { exact: true })
await expect(connectorsSearch).toBeEnabled({ timeout: 20_000 })
await connectorsSearch.fill('zzzz-no-such-entry')
- await expect(page.getByText('No entries match your filters.', { exact: true })).toBeVisible({
+ await expect(page.getByText('No connectors match your filters.', { exact: true })).toBeVisible({
timeout: 20_000,
})
await connectorsSearch.clear()
diff --git a/control-ui/e2e/qa-recorder-marketplace.spec.ts b/control-ui/e2e/qa-recorder-marketplace.spec.ts
index 0545b4f57..54f184505 100644
--- a/control-ui/e2e/qa-recorder-marketplace.spec.ts
+++ b/control-ui/e2e/qa-recorder-marketplace.spec.ts
@@ -34,16 +34,20 @@ test.describe('optional QA recorder: Control UI marketplace and plugins journey'
// Shell proof: the TablePanelHeader subtitle renders regardless of catalog
// size, filters, or empty state.
await expect(
- page.getByText('Discover and install connectors and plugins from the Marketplace.')
+ page.getByText('Discover and install connectors from the Marketplace.')
).toBeVisible({ timeout: 20_000 })
- // Marketplace now presents a connector-only catalog. Scope to the named
- // tablist so the locator is unambiguous and assert the retired tab is gone.
- const entryTabs = page.getByRole('tablist', { name: 'Marketplace entry types' })
- await expect(entryTabs.getByRole('tab', { name: 'Connectors', exact: true })).toBeVisible({
- timeout: 20_000,
- })
- await expect(entryTabs.getByRole('tab', { name: 'Plugins', exact: true })).toHaveCount(0)
+ // Marketplace uses only its top-level Connectors tab; the nested entry-type
+ // tabs and their Plugins option stay hidden.
+ const marketplaceTabs = page.getByRole('tablist', { name: 'Marketplace sections' })
+ await expect(marketplaceTabs.getByRole('tab', { name: 'Connectors', exact: true })).toBeVisible(
+ {
+ timeout: 20_000,
+ }
+ )
+ await expect(page.getByRole('tab', { name: 'Connectors', exact: true })).toHaveCount(1)
+ await expect(page.getByRole('tab', { name: 'Plugins', exact: true })).toHaveCount(0)
+ await expect(page.getByRole('tablist', { name: 'Marketplace entry types' })).toHaveCount(0)
await screenshotAndLog(page, testInfo, 'control-ui-marketplace')
})
diff --git a/control-ui/lib/__tests__/controlApiProxyRoute.test.ts b/control-ui/lib/__tests__/controlApiProxyRoute.test.ts
index 579b02e22..465090d27 100644
--- a/control-ui/lib/__tests__/controlApiProxyRoute.test.ts
+++ b/control-ui/lib/__tests__/controlApiProxyRoute.test.ts
@@ -68,6 +68,37 @@ describe('control-ui control-api proxy route', () => {
await expect(res.json()).resolves.toEqual({ items: [] })
})
+ it('preserves encoded slashes in scoped Marketplace entry names', async () => {
+ const fetchMock = vi
+ .spyOn(globalThis, 'fetch')
+ .mockResolvedValue(new Response(JSON.stringify({ name: '@evenfire-dev/airtable' })))
+
+ const req = new NextRequest(
+ 'http://localhost:3000/control-api/api/v1/admin/registry/entries/%40evenfire-dev%2Fairtable/versions/1.0.0',
+ { method: 'GET' }
+ )
+
+ await GET(req, {
+ params: {
+ path: [
+ 'api',
+ 'v1',
+ 'admin',
+ 'registry',
+ 'entries',
+ '@evenfire-dev/airtable',
+ 'versions',
+ '1.0.0',
+ ],
+ },
+ })
+
+ expect(fetchMock).toHaveBeenCalledWith(
+ 'http://127.0.0.1:8090/api/v1/admin/registry/entries/%40evenfire-dev%2Fairtable/versions/1.0.0',
+ expect.any(Object)
+ )
+ })
+
it('forwards the HttpOnly admin session cookie for GFS tree requests', async () => {
const fetchMock = vi
.spyOn(globalThis, 'fetch')
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index dcca8f277..4d312c178 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.389",
+ "version": "0.1.390",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.389",
+ "version": "0.1.390",
"dependencies": {
"@clerum/llm-providers": "file:../packages/llm-providers",
"@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",
diff --git a/control-ui/package.json b/control-ui/package.json
index d71b5a910..7467c2e7c 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.389",
+ "version": "0.1.390",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",