From c7f3681b9d536cc013b0132d599c8c682131c9b1 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Fri, 6 Feb 2026 19:38:54 +0530 Subject: [PATCH] feat: update agent status display to use role labels instead of status --- frontend/src/app/boards/[boardId]/page.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/boards/[boardId]/page.tsx b/frontend/src/app/boards/[boardId]/page.tsx index c697c649..ea364a03 100644 --- a/frontend/src/app/boards/[boardId]/page.tsx +++ b/frontend/src/app/boards/[boardId]/page.tsx @@ -1158,11 +1158,18 @@ export default function BoardDetailPage() { return emoji ?? agentInitials(agent); }; - const agentStatusLabel = (agent: Agent) => { - if (workingAgentIds.has(agent.id)) return "Working"; - if (agent.status === "online") return "Active"; - if (agent.status === "provisioning") return "Provisioning"; - return "Offline"; + const agentRoleLabel = (agent: Agent) => { + // Prefer the configured identity role from the API. + if (agent.identity_profile && typeof agent.identity_profile === "object") { + const rawRole = (agent.identity_profile as Record).role; + if (typeof rawRole === "string") { + const trimmed = rawRole.trim(); + if (trimmed) return trimmed; + } + } + if (agent.is_board_lead) return "Board lead"; + if (agent.is_gateway_main) return "Gateway main"; + return "Agent"; }; const formatCommentTimestamp = (value: string) => { @@ -1464,7 +1471,7 @@ export default function BoardDetailPage() { {agent.name}

- {agentStatusLabel(agent)} + {agentRoleLabel(agent)}