Skip to content

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

TypeScript

fix(control-ui): skeleton the agent detail title while loading and drop the route-URL eyebrow (QA)

M313ddeb26a94
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index 12aaa1644..09fa5bc92 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -10324,6 +10324,15 @@ td.cu-registry-description {
border-radius: 6px;
}
+/* Detail-page header title skeleton: bounded inline block so it reads as a
+ * loading title next to the icon, not a full-width bar (QA: no slug flash). */
+.cu-agent-detail-title-skeleton {
+ display: inline-block;
+ width: 11rem;
+ height: 1.25rem;
+ vertical-align: middle;
+}
+
.cu-skeleton--text {
height: 0.875rem;
width: 100%;
diff --git a/control-ui/app/hosts/[name]/page.tsx b/control-ui/app/hosts/[name]/page.tsx
index b67c59ddb..a1c856e94 100644
--- a/control-ui/app/hosts/[name]/page.tsx
+++ b/control-ui/app/hosts/[name]/page.tsx
@@ -197,6 +197,12 @@ export default function HostDetailsPage() {
const [hostNameDraft, setHostNameDraft] = useState(routeName)
const [hostDisplayDraft, setHostDisplayDraft] = useState('')
const [hostDisplaySaved, setHostDisplaySaved] = useState('')
+ // Header title gate: until the first Overview read lands there is no display
+ // name, and falling back to the route slug flashes the backend identifier
+ // before the agent's name (QA). The title shows a skeleton instead.
+ // Deliberately one-way: later partial reloads (model/connectors saves call
+ // loadData('model'|'none')) keep the loaded title — no re-flash.
+ const [overviewReady, setOverviewReady] = useState(false)
const [editingDisplayName, setEditingDisplayName] = useState(false)
const [hostDescription, setHostDescription] = useState('')
const [contextRefDraft, setContextRefDraft] = useState('')
@@ -424,6 +430,7 @@ export default function HostDetailsPage() {
setHostNameDraft(overview.hostName)
setHostDisplayDraft(overview.hostDisplay)
setHostDisplaySaved(overview.hostDisplay)
+ setOverviewReady(true)
setEditingDisplayName(false)
setHostDescription(String(spec.description || '').trim())
setContextRefDraft(overview.contextRef)
@@ -1056,11 +1063,20 @@ export default function HostDetailsPage() {
label: TAB_LABELS[tab],
href: hostTabHref(tab),
}))}
- // 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)}
+ // Rename propagation: the header leads with the agent's display name
+ // (spec.host, editable on Overview). While the first Overview read is
+ // in flight the title is a skeleton — never the raw slug (QA).
+ title={
+ overviewReady ? (
+ `Agent: ${hostDisplaySaved || routeName}`
+ ) : (
+ <span
+ className="cu-skeleton cu-agent-detail-title-skeleton"
+ role="progressbar"
+ aria-label="Loading agent name"
+ />
+ )
+ }
titleActions={
<AgentActionsMenu
busy={busy || deletingAgent}
diff --git a/control-ui/components/CreatePageHeader/types.ts b/control-ui/components/CreatePageHeader/types.ts
index b8e096087..9e3b0f0b6 100644
--- a/control-ui/components/CreatePageHeader/types.ts
+++ b/control-ui/components/CreatePageHeader/types.ts
@@ -8,6 +8,8 @@ export type CreatePageHeaderProps = {
icon: ReactNode
onBack?: () => void
subtitle?: ReactNode
- title: string
+ // ReactNode (not just string) so detail pages can render a loading
+ // skeleton in the title slot while their header data loads.
+ title: ReactNode
titleActions?: ReactNode
}
diff --git a/control-ui/components/DetailPageShell/types.ts b/control-ui/components/DetailPageShell/types.ts
index 2d448e34e..c608bbe5c 100644
--- a/control-ui/components/DetailPageShell/types.ts
+++ b/control-ui/components/DetailPageShell/types.ts
@@ -21,6 +21,8 @@ export type DetailPageShellProps<T extends string> = {
tabAriaLabel: string
tabClassName?: string
tabs?: TabBarOption<T>[]
- title: string
+ // ReactNode (not just string) so detail pages can render a loading
+ // skeleton in the title slot while their header data loads.
+ title: ReactNode
titleActions?: ReactNode
}
diff --git a/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx b/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx
index 94698937b..7a7286f31 100644
--- a/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx
+++ b/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx
@@ -126,6 +126,39 @@ describe('HostDetailsPage identity integration', () => {
expect(container.querySelector('.cu-agent-detail-card')).toBeNull()
})
+ // QA: the header title leads with the display name (spec.host) and NEVER
+ // flashes the route slug while loading — a skeleton holds the slot until the
+ // first Overview read lands. The eyebrow route URL was removed by product.
+ it('skeletonizes the header title while loading, then shows the display name', async () => {
+ let resolveBundle: (value: unknown) => void = () => {}
+ ;(api.getHostDetailBundle as unknown as ReturnType<typeof vi.fn>).mockReturnValue(
+ new Promise(resolve => {
+ resolveBundle = resolve
+ })
+ )
+
+ render(<HostDetailsPage />)
+
+ // Loading: skeleton in the title slot; no slug, no route-URL eyebrow.
+ expect(document.querySelector('.cu-agent-detail-title-skeleton')).not.toBeNull()
+ expect(screen.queryByText('Agent: foo')).toBeNull()
+ expect(screen.queryByText('/agents/foo')).toBeNull()
+
+ resolveBundle({
+ host,
+ contexts: [{ metadata: { name: 'ctx' }, spec: { contextId: 'ctx' } }],
+ secrets: [{ name: 'openai-secret', keys: ['openai-api-key'] }],
+ users: [],
+ teams: [],
+ agentUsers: [],
+ agentTeams: [],
+ })
+
+ expect(await screen.findByRole('heading', { name: 'Agent: foo-display' })).toBeInTheDocument()
+ expect(document.querySelector('.cu-agent-detail-title-skeleton')).toBeNull()
+ expect(screen.queryByText('/agents/foo')).toBeNull()
+ })
+
it('renders the agent detail tabs in order', async () => {
render(<HostDetailsPage />)
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 9877eade8..0539a8260 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.581",
+ "version": "0.1.582",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.581",
+ "version": "0.1.582",
"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.json
index ea964a647..9a5d2a3b3 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.581",
+ "version": "0.1.582",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",