code<spar>

Dashboard Overview Page

The main dashboard view — stat cards, agent cards with live status, activity feed, and setup guidance for new deployments.

Dashboard Overview Page

The Overview page is the default landing page when you open the dashboard at /dashboard. It gives you an at-a-glance picture of your entire CodeSpar deployment — how many agents are running, what they're doing, and what needs your attention.

Header Bar

The top of the page displays a summary row with three counters and a system health indicator:

ElementDescriptionExample
Agent countTotal number of agents across all types"6 Agents"
Project countNumber of linked repositories"3 Projects"
Channel countNumber of active messaging channels"4 Channels"
System indicatorOverall health status"All systems operational" (green dot)

The system indicator turns amber if any agent is in an error state, and red if the backend API is unreachable.

Stat Cards

Below the header, four stat cards provide key metrics at a glance:

Agents Card

  • Primary value: Total agent count (e.g., "6")
  • Breakdown: Active and error counts shown as secondary text (e.g., "4 active, 1 error")
  • Visual: Miniature status breakdown with colored segments

Tasks Today Card

  • Primary value: Number of tasks executed today (e.g., "23")
  • Delta indicator: Comparison to the previous day, shown as a positive or negative change (e.g., "+5 from yesterday")
  • Visual: Small trend arrow (up = green, down = neutral gray)

Approvals Card

  • Primary value: Number of pending approvals (e.g., "3")
  • Urgency: If approvals are pending, the card border highlights in amber
  • Action: Clicking navigates to the audit trail filtered to pending approvals

Build Success Card

  • Primary value: Build success rate over the last 24 hours (e.g., "94%")
  • Visual: Percentage shown prominently with a subtle progress ring
  • Color: Green above 90%, amber between 70-90%, red below 70%

Agent Cards

The main section of the Overview page displays a grid of agent cards — one for each agent in the selected project. These cards are the primary way to monitor agent activity.

Card Layout

Each agent card contains:

┌────────────────────────────────────────────┐
│ Project Agent                ACTIVE  slack  │
│ codespar/codespar                          │
│                                            │
│ Tasks: 12 (+3)              ████▃▃▂▁      │
│                                            │
│ Autonomy: ●●●○○○  L3                      │
│ Last active: 2 minutes ago                 │
└────────────────────────────────────────────┘

Card Elements

ElementDescriptionDetails
Agent nameName of the agente.g., "Project Agent", "Review Agent"
Status badgeCurrent stateActive (green), Idle (gray), Paused (amber), Error (red)
Channel badgeConnected channelSlack (purple), WhatsApp (green), Discord (blue), Telegram (cyan)
Project nameLinked repositorye.g., "codespar/codespar"
Task countTasks executedCount with delta from previous period (e.g., "12 (+3)")
SparklineActivity trendTiny bar chart showing recent task volume
Autonomy dotsCurrent autonomy level6 dots representing L0-L5, filled dots indicate current level
Last activeTime since last activityRelative timestamp (e.g., "2 minutes ago", "1 hour ago")

Status Badges

StatusColorMeaning
ActiveAgent Green (#10B981)Agent is currently processing a task
IdleIdle Gray (#9CA3AF)Agent is running but waiting for input
PausedAlert Amber (#F59E0B)Agent has been manually suspended
ErrorCritical Red (#EF4444)Agent encountered an unrecoverable error

Channel Badges

ChannelColorIcon
SlackChannel Purple (#8B5CF6)Slack logo
WhatsAppAgent Green (#10B981)WhatsApp logo
DiscordSignal Blue (#3B82F6)Discord logo
TelegramCyan (#06B6D4)Telegram logo

Autonomy Dots

The autonomy level is displayed as six dots, where filled dots represent the current level:

  • ●○○○○○ — L0 (Passive)
  • ●●○○○○ — L1 (Notify)
  • ●●●○○○ — L2 (Suggest)
  • ●●●●○○ — L3 (Auto-Low)
  • ●●●●●○ — L4 (Auto-Med)
  • ●●●●●● — L5 (Full Auto)

Interaction

Clicking an agent card navigates to the Agent Detail page for that agent, where you can view detailed stats, activity history, configuration, and perform actions like suspend or restart.

Live Feed

Below the agent cards, the Live Feed section shows recent audit trail entries in real time. This is a condensed view of the full Audit Trail.

Feed Entry Format

Each entry in the live feed shows:

● 2m ago  task-agent-01  task.complete  "Added health check endpoint"  LOW  SUCCESS
ElementDescription
Risk dotColored dot indicating risk level: green (low), amber (medium), red (high), pulsing red (critical)
TimeRelative timestamp
ActorWho performed the action. The formatActor function resolves Slack UIDs (e.g., U0123ABC) to display names (e.g., "Sarah Chen")
Action badgeThe action type in monospace font (e.g., task.complete, deploy.request, review.approve)
DetailTruncated description of the event
Result badgeOutcome: SUCCESS (green), FAILURE (red), PENDING (amber)

Pending Approvals

When an entry has a PENDING result (e.g., a deploy awaiting approval), an Approve button appears next to it. Clicking the button opens a confirmation dialog where you can approve the action directly from the dashboard.

Actor Name Resolution

The formatActor function handles different actor formats:

function formatActor(actor: string): string {
  // Slack UID: resolve to display name
  if (actor.startsWith("U") && actor.length === 11) {
    return slackUserMap.get(actor) ?? actor;
  }
 
  // Agent ID: show friendly name
  if (actor.startsWith("agent-")) {
    return agentNameMap.get(actor) ?? actor;
  }
 
  // System actor
  if (actor === "system") {
    return "System";
  }
 
  return actor;
}

Actor names are color-coded in the feed:

  • Blue — agent actors
  • White — human user actors
  • Gray — system actors

Setup Banner

If no project has been linked yet, the Overview page displays a Setup Banner at the top of the page instead of the agent cards and stats:

┌──────────────────────────────────────────────────────┐
│                                                       │
│   Welcome to CodeSpar Dashboard                      │
│                                                       │
│   No project is linked yet. Connect a repository     │
│   and configure your channels to get started.         │
│                                                       │
│   [Go to Setup →]                                    │
│                                                       │
└──────────────────────────────────────────────────────┘

Clicking "Go to Setup" navigates to /dashboard/setup where you can configure channels and link a repository. See the Setup page documentation for details.

Data Flow

The Overview page fetches data from three API endpoints, all polled via the usePolling hook:

EndpointDataPoll Interval
GET /api/agentsAgent list with status, channel, tasks, autonomy5 seconds
GET /api/audit?limit=20Recent audit entries for the live feed5 seconds
GET /api/projectProject info, linked repo, build stats30 seconds

All requests include the x-org-id header for multi-tenant isolation.

Next Steps

  • Agent Detail — click an agent card to see detailed stats and configuration
  • Audit Trail — view the full searchable event log
  • Setup — configure channels and link a project

On this page