Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(connectors): show agent display names in the panel, not the raw host id (R1-M12)
Diego Zacarias2b4e0c93d35d
diff --git a/desktop-app/ui/src/pages/McpServersPage.tsx b/desktop-app/ui/src/pages/McpServersPage.tsxindex 10b180a5d..b8a508259 100644--- a/desktop-app/ui/src/pages/McpServersPage.tsx+++ b/desktop-app/ui/src/pages/McpServersPage.tsx@@ -4,6 +4,7 @@ import { scopeCaption, statusPresentation } from '@lib/connectorPresentation'import { type ConnectorRow, deriveConnectorRows } from '@lib/connectorRows'import { formatMcpServerDisplayName } from '@lib/format'import { useNavigationContext } from '../contexts/NavigationContext'+import { useAgentsDataController } from '../hooks/domain/useAgentsDataController'import {type ConnectorActionInput,isActionableConnector,@@ -14,6 +15,7 @@ import { clickableRowProps } from '../lib/clickableRowProps'function ConnectorRowView({row,busy,+ agentDisplayByName,onAuthorize,onDisconnect,onOpenContext,@@ -21,6 +23,10 @@ function ConnectorRowView({}: {row: ConnectorRowbusy: boolean+ // Visible agent name (spec.host) from the catalog map, as everywhere else in+ // the app (AppHeader, ContextDetailsPage, TeamsPage). Falls back to the raw+ // identifier for agents absent from the map (e.g. cross-team), not `|| name`.+ agentDisplayByName: Record<string, string>onAuthorize: (input: ConnectorActionInput) => voidonDisconnect: (input: ConnectorActionInput) => voidonOpenContext: (contextRef: string) => void@@ -82,10 +88,10 @@ function ConnectorRowView({// on the <tr>; stop keyboard activation from bubbling so a chip// press opens the agent instead of navigating the row.onKeyDown={event => event.stopPropagation()}- title={agentName}- aria-label={`Open agent ${agentName}`}+ title={agentDisplayByName[agentName] ?? agentName}+ aria-label={`Open agent ${agentDisplayByName[agentName] ?? agentName}`}>- {agentName}+ {agentDisplayByName[agentName] ?? agentName}</ReferenceTag>))}</span>@@ -143,6 +149,7 @@ function ConnectorRowView({export function McpServersPage() {const { loading, error, actionError, agents, pendingKey, authorize, disconnect } =useConnectorsController()+ const { agentDisplayByName } = useAgentsDataController()const { handleOpenContextDetails, handleOpenAgentWorkspace } = useNavigationContext()const rows = useMemo(() => deriveConnectorRows(agents), [agents])@@ -200,6 +207,7 @@ export function McpServersPage() {key={row.key}row={row}busy={pendingKey === row.key}+ agentDisplayByName={agentDisplayByName}onAuthorize={input => {// The hook records any write failure in `actionError` and// never rejects, so the call site no longer swallows it.diff --git a/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx b/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsxindex 59e49bf49..5f1160607 100644--- a/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx+++ b/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx@@ -2,7 +2,7 @@import { afterEach, describe, expect, it, vi } from 'vitest'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'-import type { RpcConnectorsResult } from '../../../../src/types'+import type { AccessCatalog, RpcConnectorsResult } from '../../../../src/types'import { desktopQueryKeys } from '../../hooks/domain/queryKeys'import { McpServersPage } from '../McpServersPage'@@ -234,4 +234,29 @@ describe('McpServersPage — da-table layout + navigation', () => {/Affects all your agents/i)})++ it('(f) shows agent DISPLAY names from the catalog map, not the raw host id (R1-M12)', async () => {+ installClerum(CONNECTORS)+ const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })+ // Seed both the connectors read-model and the access catalog the way the+ // bootstrap would; the catalog carries host→display, exactly as AppHeader /+ // ContextDetailsPage / TeamsPage resolve visible agent names.+ client.setQueryData(desktopQueryKeys.connectors, CONNECTORS)+ client.setQueryData(desktopQueryKeys.accessCatalog, {+ agentDisplayByName: { 'agent-alpha': 'Alpha Bot', 'agent-zeta': 'Zeta Bot' },+ } as unknown as AccessCatalog)+ const { container } = render(+ <QueryClientProvider client={client}>+ <McpServersPage />+ </QueryClientProvider>+ )+ await waitFor(() => expect(screen.getByRole('heading', { name: 'Connectors' })).toBeTruthy())++ // The monday row is listed by agent-alpha AND agent-zeta: both chips show the+ // catalog display name, and the raw host id is no longer surfaced there.+ const mondayRow = rowByName(allRows(container), 'monday')+ expect(within(mondayRow).getByRole('button', { name: 'Open agent Alpha Bot' })).toBeTruthy()+ expect(within(mondayRow).getByRole('button', { name: 'Open agent Zeta Bot' })).toBeTruthy()+ expect(within(mondayRow).queryByRole('button', { name: 'Open agent agent-alpha' })).toBeNull()+ })})