Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(desktop-app): show connector scope and authentication
Josuéa226f74984d6
diff --git a/desktop-app/ui/src/lib/__tests__/connectorPresentation.test.ts b/desktop-app/ui/src/lib/__tests__/connectorPresentation.test.tsindex 293c5e766..7a0501718 100644--- a/desktop-app/ui/src/lib/__tests__/connectorPresentation.test.ts+++ b/desktop-app/ui/src/lib/__tests__/connectorPresentation.test.ts@@ -15,7 +15,7 @@ describe('statusPresentation', () => {label: 'Requires setup',tone: 'warning',})- expect(statusPresentation('no_oauth')).toEqual({ label: 'No OAuth', tone: 'neutral' })+ expect(statusPresentation('no_oauth')).toEqual({ label: '—', tone: 'neutral' })})})diff --git a/desktop-app/ui/src/lib/connectorPresentation.ts b/desktop-app/ui/src/lib/connectorPresentation.tsindex 6856a722c..92bcc326c 100644--- a/desktop-app/ui/src/lib/connectorPresentation.ts+++ b/desktop-app/ui/src/lib/connectorPresentation.ts@@ -20,15 +20,28 @@ export function statusPresentation(status: RpcConnector['status']): StatusPresencase 'requires_setup':return { label: 'Requires setup', tone: 'warning' }default:- return { label: 'No OAuth', tone: 'neutral' }+ return { label: '—', tone: 'neutral' }}}+export function authenticationLabel(connector: Pick<RpcConnector, 'authKind'>): string {+ if (connector.authKind === 'oauth-user' || connector.authKind === 'oauth-context') {+ return 'OAuth'+ }+ return connector.authKind === 'static' ? 'Static credentials' : 'No authentication'+}++export function connectorScopeLabel(connector: RpcConnector): string {+ if (isSharedConnector(connector)) return 'Shared'+ if (connector.grantScope === 'user' || connector.authKind === 'oauth-user') return 'Personal'+ return '—'+}+/*** The per-connector scope caption (spec §1.3 / D-1). A `oauth-user` grant is* global to `(server, userId)`, so acting under one agent flips the SAME server* across every agent that lists it; a `oauth-context` grant is shared by the- * whole Context. Surfaced as a tooltip (title) on the status pill so the user+ * whole Context. Surfaced as a tooltip (title) on the scope pill so the user* understands the blast radius before the derived state changes several rows at* once.*/diff --git a/desktop-app/ui/src/pages/McpServersPage.tsx b/desktop-app/ui/src/pages/McpServersPage.tsxindex 0a0917015..7d2a4b42e 100644--- a/desktop-app/ui/src/pages/McpServersPage.tsx+++ b/desktop-app/ui/src/pages/McpServersPage.tsx@@ -1,6 +1,11 @@import { useMemo } from 'react'import { Button, DataTable, EmptyState, Pill, ReferenceTag, StatusBanner } from '@components/Common'-import { scopeCaption, statusPresentation } from '@lib/connectorPresentation'+import {+ authenticationLabel,+ connectorScopeLabel,+ scopeCaption,+ statusPresentation,+} from '@lib/connectorPresentation'import { type ConnectorRow, deriveConnectorRows } from '@lib/connectorRows'import { formatMcpServerDisplayName } from '@lib/format'import { useNavigationContext } from '../contexts/NavigationContext'@@ -32,6 +37,8 @@ function ConnectorRowView({}) {const { connector, contextRef, agentName } = rowconst presentation = statusPresentation(connector.status)+ const authentication = authenticationLabel(connector)+ const scope = connectorScopeLabel(connector)const caption = scopeCaption(connector)// The action IPC needs a hostRef to mint the token; the row is per// (connector, agent), so we act under the row's own agent.@@ -76,7 +83,19 @@ function ConnectorRowView({</td><td className="da-table__cell">- <Pill tone={presentation.tone} size="sm" title={caption ?? undefined}>+ <Pill tone="neutral" size="sm" title={caption ?? undefined}>+ {scope}+ </Pill>+ </td>++ <td className="da-table__cell">+ <Pill tone="neutral" size="sm">+ {authentication}+ </Pill>+ </td>++ <td className="da-table__cell">+ <Pill tone={presentation.tone} size="sm">{presentation.label}</Pill></td>@@ -163,6 +182,12 @@ export function McpServersPage() {<th className="da-table__col-header" scope="col">Agent</th>+ <th className="da-table__col-header" scope="col">+ Scope+ </th>+ <th className="da-table__col-header" scope="col">+ Authentication+ </th><th className="da-table__col-header" scope="col">Status</th>diff --git a/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx b/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsxindex d22a1d6e6..0cf5c2bf9 100644--- a/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx+++ b/desktop-app/ui/src/pages/__tests__/McpServersPage.test.tsx@@ -117,7 +117,8 @@ const rowName = (row: HTMLElement) =>row.querySelector('.context-id-cell')?.textContent?.trim() ?? ''const agentTag = (row: HTMLElement) =>row.querySelector('.reference-tag--agent .reference-tag__label')?.textContent?.trim() ?? null-const chipText = (row: HTMLElement) => row.querySelector('.ui-pill')?.textContent?.trim() ?? null+const chipText = (row: HTMLElement) =>+ row.querySelector('td:nth-child(5) .ui-pill')?.textContent?.trim() ?? null// One row per (connector, agent): identify by BOTH so the two `monday` sibling// rows are addressable independently.const rowBy = (rows: HTMLElement[], name: string, agent: string) => {@@ -233,10 +234,10 @@ describe('McpServersPage — da-table layout + navigation', () => {expect(buttonLabels(clickup)).toEqual(['Authorize'])const filesystem = rowBy(rows, 'filesystem', 'agent-zeta')- expect(chipText(filesystem)).toBe('No OAuth')+ expect(chipText(filesystem)).toBe('—')expect(buttonLabels(filesystem)).toEqual([])- // oauth-user status pill surfaces the blast-radius caption as a tooltip.+ // oauth-user scope pill surfaces the blast-radius caption as a tooltip.expect(monday.querySelector('.ui-pill')?.getAttribute('title')).toMatch(/Affects all your agents/i)diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 12c0f1069..8260bbcf6 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -12175,7 +12175,7 @@ pre {}.mcp-servers-data-table {- min-width: 680px;+ min-width: 940px;}.context-agents-data-table,