Files
fusion/packages/dashboard/app/components/command-center/agentActivityPresentation.tsx
gsxdsm aac090d0c3 FN-8866: add Command Center agent activity timeline
Add a Command Center live agent activity log with historical navigation.

- Stream and paginate organization-wide agent activity with timeline filters.
- Link activity rows to agent details and task views while reusing feed presentation.
- Add localized copy, documentation, a minor changeset, and coverage for live and scroll-back behavior.

Files changed:
 .changeset/fn-8866-agent-activity-surfaces.md      |   7 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/App.tsx                     |  12 ++
 packages/dashboard/app/components/ActivityFeed.tsx |  77 ++++----
 packages/dashboard/app/components/AgentsView.tsx   |  13 +-
 .../__tests__/AgentsView.focus-agent.test.tsx      |  59 ++++++
 .../command-center/AgentActivityPanel.css          |  98 +++++++++
 .../command-center/AgentActivityPanel.tsx          |  99 ++++++++++
 .../components/command-center/CommandCenter.tsx    |   9 +
 .../__tests__/AgentActivityPanel.mobile.test.ts    |  15 ++
 .../AgentActivityPanel.sse-integration.test.tsx    |  96 +++++++++
 .../__tests__/AgentActivityPanel.test.tsx          | 121 ++++++++++++
 .../__tests__/CommandCenter.test.tsx               |  27 ++-
 .../__tests__/agentActivityCursor.test.ts          |  47 +++++
 .../__tests__/useAgentActivity.test.tsx            |  14 ++
 .../command-center/agentActivityCursor.ts          |  75 +++++++
 .../command-center/agentActivityPresentation.tsx   |   8 +
 .../components/command-center/useAgentActivity.ts  | 218 +++++++++++++++++++++
 .../app/components/dashboard/MainContent.tsx       |  19 ++
 .../MainContent.agent-activity-navigation.test.tsx | 127 ++++++++++++
 .../dashboard/app/components/dashboard/types.ts    |   3 +
 packages/i18n/locales/en/app.json                  |  30 ++-
 packages/i18n/locales/es/app.json                  |  30 ++-
 packages/i18n/locales/fr/app.json                  |  30 ++-
 packages/i18n/locales/ko/app.json                  |  30 ++-
 packages/i18n/locales/pt-BR/app.json               |  30 ++-
 packages/i18n/locales/zh-CN/app.json               |  30 ++-
 packages/i18n/locales/zh-TW/app.json               |  30 ++-
 28 files changed, 1312 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-8866

Fusion-Task-Lineage: 817ae76e-52c6-4221-8642-df757e773627

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 20:19:52 -07:00

9 lines
1.3 KiB
TypeScript

import { AlertTriangle, ArrowRightLeft, CheckCircle, CircleDot, Clock, Play, type LucideIcon } from "lucide-react";
import type { AgentActivityEventType } from "../../api";
/* FNXC:CommandCenterAgentActivity 2026-08-10-01:13: Agent activity uses the same compact icon/semantic-color vocabulary as ActivityFeed rather than introducing a competing feed style. */
export const AGENT_ACTIVITY_TYPE_CONFIG: Record<AgentActivityEventType, { label: string; icon: LucideIcon; color: string }> = {
"task:started": { label: "Task started", icon: Play, color: "var(--in-progress)" }, "task:handed-off": { label: "Task handed off", icon: ArrowRightLeft, color: "var(--in-progress)" }, "task:completed": { label: "Task completed", icon: CheckCircle, color: "var(--color-success)" }, "agent:state-changed": { label: "Agent state changed", icon: CircleDot, color: "var(--text-muted)" }, "workflow:gate-passed": { label: "Workflow gate passed", icon: CheckCircle, color: "var(--color-success)" }, "workflow:gate-failed": { label: "Workflow gate failed", icon: AlertTriangle, color: "var(--color-error)" }, "approval:requested": { label: "Approval requested", icon: Clock, color: "var(--color-warning)" },
};
export const DEFAULT_AGENT_ACTIVITY_CONFIG = { label: "Activity", icon: CircleDot, color: "var(--text-muted)" };