diff --git a/desktop/src/features/channels/ui/AddChannelBotDialog.tsx b/desktop/src/features/channels/ui/AddChannelBotDialog.tsx index 45c33d59ef..231e0973b3 100644 --- a/desktop/src/features/channels/ui/AddChannelBotDialog.tsx +++ b/desktop/src/features/channels/ui/AddChannelBotDialog.tsx @@ -1,4 +1,4 @@ -import { AlertTriangle, ChevronDown } from "lucide-react"; +import { AlertTriangle, ChevronDown, ChevronRight } from "lucide-react"; import * as React from "react"; import { @@ -43,6 +43,7 @@ import { getActivePersonas } from "@/features/agents/lib/catalog"; import { getUsableTeams } from "@/features/agents/lib/teamPersonas"; import { useLastRuntimeProvider } from "@/features/agents/lib/useLastRuntimeProvider"; import { CreateAgentRespondToField } from "@/features/agents/ui/RespondToField"; +import { cn } from "@/shared/lib/cn"; type AddChannelBotDialogProps = { backendProviders?: BackendProviderCandidate[]; @@ -92,6 +93,43 @@ function formatBatchFailureSummary( .join("; "); } +// ── Collapsible section ───────────────────────────────────────────────────── + +function DisclosureSection({ + children, + defaultOpen = false, + label, + testId, +}: { + children: React.ReactNode; + defaultOpen?: boolean; + label: string; + testId?: string; +}) { + const [isOpen, setIsOpen] = React.useState(defaultOpen); + + return ( +
+ + {isOpen ?
{children}
: null} +
+ ); +} + +// ── Main dialog ───────────────────────────────────────────────────────────── + export function AddChannelBotDialog({ backendProviders, backendProvidersLoading, @@ -418,9 +456,6 @@ export function AddChannelBotDialog({ } } - // Allowlist mode requires at least one entry, mirroring the harness's own - // validation. If we let it through empty, the agent crash-loops at startup - // with a config error. const respondToValid = respondTo !== "allowlist" || respondToAllowlist.length > 0; @@ -453,7 +488,7 @@ export function AddChannelBotDialog({