Skip to content

test(dashboard): add test coverage for dashboard command (0%) #576

@agents-squads

Description

@agents-squads

Problem

dashboard.ts command has 0% test coverage — entire command is untested.

Dashboard is user-facing feature that shows squad status, metrics, and activity. Untested paths cause rendering bugs, missing data, and poor UX.

Location

  • Source: src/commands/dashboard.ts (1310 lines)
  • Test: MISSING

Coverage Analysis

  • Current coverage: 0%
  • Functions: render(), fetchMetrics(), formatOutput()
  • The entire dashboard rendering pipeline is untested

Regression Risk

MEDIUM-HIGH: Dashboard is user-facing. Broken rendering:

  1. Metrics display incorrectly
  2. Layout breaks on different terminal sizes
  3. Color formatting fails in piped output
  4. Real-time updates stall
  5. Database queries timeout

Suggested Test Cases

  • Render dashboard with multiple squads
  • Handle missing metrics gracefully
  • Format output for different terminal widths
  • Handle database connection failures
  • Parse execution history correctly
  • Display agent status accurately
  • Show cost metrics properly
  • Handle concurrent updates

Priority Rationale

P2: User-facing feature but not critical path. Start with basic rendering tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions