fix(agent-map): localize seen completion label

This commit is contained in:
Brennan Benson
2026-08-13 01:09:29 -07:00
parent 1cd13a3822
commit 92d6317c3d
3 changed files with 24 additions and 2 deletions
@@ -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')
})
})
@@ -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 {
+4 -1
View File
@@ -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",