From 92d6317c3d2b7f82ed031d244e239cc7810d18bf Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 13 Aug 2026 01:09:29 -0700 Subject: [PATCH] fix(agent-map): localize seen completion label --- .../agent-map-node-presentation.test.ts | 17 +++++++++++++++++ .../agent-map-node-presentation.ts | 4 +++- src/renderer/src/i18n/locales/en.json | 5 ++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 src/renderer/src/components/dashboard-popout/agent-map-node-presentation.test.ts diff --git a/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.test.ts b/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.test.ts new file mode 100644 index 00000000000..f02837497cb --- /dev/null +++ b/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it, vi } from 'vitest' +import { agentMapStatusLabel } from './agent-map-node-presentation' + +vi.mock('@/i18n/i18n', () => ({ + translate: (key: string, fallback: string) => `${key}:${fallback}` +})) + +describe('agentMapStatusLabel', () => { + it('localizes the map-only acknowledged completion state', () => { + expect(agentMapStatusLabel('done-seen')).toBe('dashboardPopout.map.status.doneSeen:Done, seen') + }) + + it('keeps shared agent states on their existing labels', () => { + expect(agentMapStatusLabel('working')).toBe('Working') + expect(agentMapStatusLabel('done')).toBe('Done') + }) +}) diff --git a/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.ts b/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.ts index 982edc494b4..78910f64865 100644 --- a/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.ts +++ b/src/renderer/src/components/dashboard-popout/agent-map-node-presentation.ts @@ -11,7 +11,9 @@ import type { AgentMapNodeStatus } from './agent-map-node-metadata' * renderer, so the map's extra state gets its label here rather than widening * `AgentDotState`. */ export function agentMapStatusLabel(status: AgentMapNodeStatus): string { - return status === 'done-seen' ? 'Done, seen' : agentStateLabel(status) + return status === 'done-seen' + ? translate('dashboardPopout.map.status.doneSeen', 'Done, seen') + : agentStateLabel(status) } export function formatDuration(minutes: number): string { diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index edf9789cae0..b7835d93535 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -15370,7 +15370,10 @@ "agentCount": "{{count}} agents", "agentCount_one": "{{count}} agent", "agentCount_other": "{{count}} agents", - "noWorkspaceAgents": "No agents in this workspace." + "noWorkspaceAgents": "No agents in this workspace.", + "status": { + "doneSeen": "Done, seen" + } }, "placeholder": { "title": "Agent dashboard",