Skip to content

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

TypeScript

fix(control-ui): show agent display names in the team Agents tab

M2d5664ec5681
diff --git a/control-ui/app/profile-admin/teams/[teamId]/page.tsx b/control-ui/app/profile-admin/teams/[teamId]/page.tsx
index d73b412c4..ad4b5f4e2 100644
--- a/control-ui/app/profile-admin/teams/[teamId]/page.tsx
+++ b/control-ui/app/profile-admin/teams/[teamId]/page.tsx
@@ -985,34 +985,41 @@ export default function TeamDetailsPage() {
</div>
) : (
<RecordList>
- {effectiveAgentNames.map(agentName => (
- <RecordListRow key={agentName} className="cu-access-row">
- <button
- type="button"
- className="cu-link"
- onClick={() => router.push(CONTROL_ROUTES.agents.detail(agentName))}
- >
- {agentName}
- </button>
- <RowActionMenu
- ariaLabel={`Actions for agent ${agentName}`}
- actions={[
- {
- key: 'view',
- label: 'View agent details',
- onSelect: () => router.push(CONTROL_ROUTES.agents.detail(agentName)),
- },
- {
- key: 'revoke',
- label: 'Revoke agent access',
- danger: true,
- disabled: busy,
- onSelect: () => void revokeAgentAccess(agentName),
- },
- ]}
- />
- </RecordListRow>
- ))}
+ {effectiveAgentNames.map(agentName => {
+ // Rename propagation: display name (spec.host) — same
+ // resolution as the add-agent picker on this page. Links
+ // and actions stay keyed by the immutable slug.
+ const agentDisplayName = getAgentDisplayName(agentName, hosts)
+ return (
+ <RecordListRow key={agentName} className="cu-access-row">
+ <button
+ type="button"
+ className="cu-link"
+ onClick={() => router.push(CONTROL_ROUTES.agents.detail(agentName))}
+ >
+ {agentDisplayName}
+ </button>
+ <RowActionMenu
+ ariaLabel={`Actions for agent ${agentDisplayName}`}
+ actions={[
+ {
+ key: 'view',
+ label: 'View agent details',
+ onSelect: () =>
+ router.push(CONTROL_ROUTES.agents.detail(agentName)),
+ },
+ {
+ key: 'revoke',
+ label: 'Revoke agent access',
+ danger: true,
+ disabled: busy,
+ onSelect: () => void revokeAgentAccess(agentName),
+ },
+ ]}
+ />
+ </RecordListRow>
+ )
+ })}
</RecordList>
)}
</>
diff --git a/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx b/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx
index ec3249353..9e3ba9f98 100644
--- a/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx
+++ b/control-ui/components/__tests__/ProfileAdminAgentCompatibility.test.tsx
@@ -171,6 +171,35 @@ describe('profile-admin agent compatibility access', () => {
expect(screen.queryByRole('button', { name: 'agent-alpha' })).not.toBeInTheDocument()
})
+ // Same rename propagation on the team Agents tab.
+ it('shows agent display names in the team Agents tab, falling back to the identifier', async () => {
+ vi.mocked(api.getHosts).mockResolvedValue({
+ items: [
+ {
+ metadata: { name: 'agent-alpha' },
+ spec: { contextRef: 'ctx-alpha', host: 'Alpha Bot' },
+ },
+ { metadata: { name: 'agent-beta' }, spec: { contextRef: 'ctx-beta' } },
+ ],
+ })
+ vi.mocked(api.getAdminTeamContexts).mockResolvedValue({
+ teamId: 'team-1',
+ contextIds: ['ctx-alpha', 'ctx-beta'],
+ })
+ vi.mocked(api.getAdminTeamAgents).mockResolvedValue({
+ teamId: 'team-1',
+ agentNames: ['agent-alpha', 'agent-beta'],
+ deletedAgentNames: [],
+ deletedHistoryLimit: 10,
+ })
+
+ renderTeamDetails()
+
+ expect(await screen.findByRole('button', { name: 'Alpha Bot' })).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'agent-beta' })).toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'agent-alpha' })).not.toBeInTheDocument()
+ })
+
it('removes only owned Context grants when a member loses final agent access', async () => {
vi.mocked(api.getAdminUserContexts)
.mockResolvedValueOnce({ userId: 'user-1', contextIds: ['ctx-alpha', 'ctx-unrelated'] })
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index a2b8166f9..e87bc35a0 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.579",
+ "version": "0.1.580",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.579",
+ "version": "0.1.580",
"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 ff879807f..6c016c73b 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.579",
+ "version": "0.1.580",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",