Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(control-ui): land on the new agent's detail page after creation (TASK-229)
M33e754dd3690
diff --git a/control-ui/app/hosts/[name]/page.tsx b/control-ui/app/hosts/[name]/page.tsxindex 8d595cd46..b67c59ddb 100644--- a/control-ui/app/hosts/[name]/page.tsx+++ b/control-ui/app/hosts/[name]/page.tsx@@ -1056,7 +1056,11 @@ export default function HostDetailsPage() {label: TAB_LABELS[tab],href: hostTabHref(tab),}))}- title={`Agent: ${routeName}`}+ // TASK-229 / rename propagation: the header leads with the agent's+ // display name (spec.host, editable on Overview) and carries the route+ // URL built from the immutable slug so both identities are visible.+ title={`Agent: ${hostDisplaySaved || routeName}`}+ eyebrow={CONTROL_ROUTES.agents.detail(routeName)}titleActions={<AgentActionsMenubusy={busy || deletingAgent}diff --git a/control-ui/app/hosts/new/page.tsx b/control-ui/app/hosts/new/page.tsxindex 52755effc..c0abebd37 100644--- a/control-ui/app/hosts/new/page.tsx+++ b/control-ui/app/hosts/new/page.tsx@@ -1,6 +1,6 @@'use client'-import React, { useEffect, useState } from 'react'+import React, { useEffect, useRef, useState } from 'react'import { useRouter } from 'next/navigation'import { AuthGate } from '@components/AuthGate'import { CreateFlowSkeleton } from '@components/CreateFlowSkeleton'@@ -46,7 +46,23 @@ export default function CreateHostPage() {void loadFormData()}, [])- const backToAgents = () => router.push(CONTROL_ROUTES.agents.root)+ // TASK-229: land on the new agent's detail page after creation — its header+ // shows the agent's name plus the route URL, instead of dumping the operator+ // back on the list where the new agent has to be found again.+ const createdAgentRef = useRef<string | null>(null)+ const handleCreated = async (created?: { name: string }) => {+ if (!created?.name) return+ createdAgentRef.current = created.name+ router.push(CONTROL_ROUTES.agents.tab(created.name, 'overview'))+ }++ const backToAgents = () => {+ // After a successful create the wizard still calls onClose on its way out;+ // the forward navigation above already happened, so this must not override+ // it with a backward jump to the list.+ if (createdAgentRef.current) return+ router.push(CONTROL_ROUTES.agents.root)+ }return (<AuthGate>@@ -63,7 +79,7 @@ export default function CreateHostPage() {mode="page"mcpServers={mcpServers as any}existingSecrets={secrets as any}- onCreated={async () => Promise.resolve()}+ onCreated={handleCreated}onClose={backToAgents}pageHeader={<CreatePageHeaderdiff --git a/control-ui/components/HostWizard/index.tsx b/control-ui/components/HostWizard/index.tsxindex 370f0d36b..d29dee4d9 100644--- a/control-ui/components/HostWizard/index.tsx+++ b/control-ui/components/HostWizard/index.tsx@@ -765,7 +765,9 @@ export function HostWizard({if (!mountedRef.current) returnshowToast('Agent created successfully.', { tone: 'success' })- await onCreated()+ // TASK-229: hand the created agent's identifier back so the host page can+ // route straight to the new agent's detail view (name + route URL header).+ await onCreated({ name: normalizedHostName })if (!mountedRef.current) returnonClose()} catch (e) {diff --git a/control-ui/components/HostWizard/types.ts b/control-ui/components/HostWizard/types.tsindex 42b94250f..d9ef34aec 100644--- a/control-ui/components/HostWizard/types.ts+++ b/control-ui/components/HostWizard/types.ts@@ -40,12 +40,15 @@ export type CreatedResource = {// and omits spec.secretRef; mixed/static chains still require an exact Secret.export type HostLlmSecretMode = 'existing' | 'new'+// TASK-229: onCreated receives the created agent's identifier (metadata.name)+// so page hosts can route to the new agent's detail view. Optional payload+// keeps older no-arg consumers (tests, modal hosts) source-compatible.export type HostWizardProps = {existingSecrets: SecretMeta[]mcpServers: McpServer[]mode?: 'modal' | 'page'onClose: () => void- onCreated: () => Promise<void>+ onCreated: (created?: { name: string }) => Promise<void>pageHeader?: ReactNode}diff --git a/control-ui/components/__tests__/HostWizard.test.tsx b/control-ui/components/__tests__/HostWizard.test.tsxindex fdbf0b83d..8585e2e57 100644--- a/control-ui/components/__tests__/HostWizard.test.tsx+++ b/control-ui/components/__tests__/HostWizard.test.tsx@@ -637,6 +637,19 @@ describe('HostWizard — free-text agent name with derived identifier (TASK-230)})})+describe('HostWizard — created-agent handoff (TASK-229)', () => {+ it('hands the created agent identifier to onCreated so hosts can route to the detail page', async () => {+ const { onCreated } = await renderWizard()+ await walkToAccessStep({ agentName: 'Support Bot' })+ continueToConnectorsStep()+ submitFromConnectorsStep()++ await waitFor(() => {+ expect(onCreated).toHaveBeenCalledWith({ name: 'support-bot' })+ })+ })+})+describe('HostWizard — submit path uses the atomic agent-centric endpoints', () => {it('creates an agent without access grants when no users or teams are selected', async () => {await renderWizard()diff --git a/control-ui/e2e/qa-recorder-agent-create.spec.ts b/control-ui/e2e/qa-recorder-agent-create.spec.tsindex 437e064f1..83c9d2cc2 100644--- a/control-ui/e2e/qa-recorder-agent-create.spec.ts+++ b/control-ui/e2e/qa-recorder-agent-create.spec.ts@@ -92,7 +92,11 @@ test.describe('optional QA recorder: Control UI agent creation', () => {await cleanupAgentFlowResources(sessionRequest, { agentName })await page.getByRole('link', { name: 'Agents', exact: true }).click()- await expect(page).toHaveURL(/\/(?:hosts|agents)$/)+ // TASK-229: creation lands on the new agent's detail page (header shows+ // the agent's name + route URL), not back on the agents list.+ await expect(page).toHaveURL(+ new RegExp(`\\/(?:hosts|agents)\\/${agentName}(?:\\/overview)?$`)+ )const createAgent = page.getByRole('button', { name: 'Create agent', exact: true })await expect(createAgent).toBeEnabled()@@ -124,7 +128,11 @@ test.describe('optional QA recorder: Control UI agent creation', () => {await expect(submitAgent).toBeEnabled()await submitAgent.click()- await expect(page).toHaveURL(/\/(?:hosts|agents)$/)+ // TASK-229: creation lands on the new agent's detail page (header shows+ // the agent's name + route URL), not back on the agents list.+ await expect(page).toHaveURL(+ new RegExp(`\\/(?:hosts|agents)\\/${agentName}(?:\\/overview)?$`)+ )const created = await waitForAgent(sessionRequest, agentName)expect((created.metadata as { name?: string } | undefined)?.name).toBe(agentName)contextName = String((created.spec as { contextRef?: string } | undefined)?.contextRef || '')diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 6e19a7ac7..03eccd756 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.576",+ "version": "0.1.577","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.576",+ "version": "0.1.577","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 3d70dd5e1..3028160ce 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.576",+ "version": "0.1.577","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",