Skip to content

[Bugfix #529] Redesign dashboard analytics — merge sections, replace data source#530

Merged
waleedkadous merged 1 commit intomainfrom
builder/bugfix-529-dashboard-analytics-redesign-a
Feb 23, 2026
Merged

[Bugfix #529] Redesign dashboard analytics — merge sections, replace data source#530
waleedkadous merged 1 commit intomainfrom
builder/bugfix-529-dashboard-analytics-redesign-a

Conversation

@waleedkadous
Copy link
Contributor

Summary

Redesigns the dashboard Analytics tab per issue #529: merges separate GitHub + Builders sections into a unified Activity section, replaces GitHub API data source with local project artifact scanning (codev/projects/*/status.yaml), replaces pie charts with segmented bar charts, and removes cost-per-project metric.

Fixes #529

Root Cause

The analytics tab had structural and accuracy issues:

  • "Avg time to merge" was unclear (measured PR creation → merge from GitHub API)
  • "Open issues backlog" was the wrong metric for tracking progress
  • GitHub and Builders sections were unnecessarily separate
  • Data sourced from GitHub API when better data exists locally in project artifacts
  • Pie charts were less readable than bar charts for the data shown
  • Cost per project metric was not useful

Fix

Backend (analytics.ts):

  • Replaced GitHub API calls (fetchMergedPRs, fetchClosedIssues, fetchIssueList) with local codev/projects/*/status.yaml scanning using js-yaml
  • Restructured response: github + builders → single activity section
  • Added projectsByProtocol breakdown (SPIR, ASPIR, AIR, etc.) and bugsFixed count
  • "Avg time to merge" now measures builder spawn → project completion from status.yaml artifacts
  • Removed costByProject from consultation section
  • Normalizes legacy spider protocol name to spir

Frontend (AnalyticsView.tsx):

  • Merged GitHubSection + BuildersSection into single ActivitySection
  • Replaced MiniPieChart components with MiniBarChart for review type and protocol breakdowns
  • Removed Cost per Project sub-section
  • Added Projects by Protocol bar chart and Bugs Fixed metric
  • Removed MiniPieChart component (no longer used)

API types (api.ts): Updated AnalyticsResponse interface to match new shape.

Tower routes: Updated fallback empty response for new structure.

Test Plan

  • Regression tests updated (backend: 15 tests, frontend: 17 tests, tower-routes: 59 tests)
  • Build passes (tsc --noEmit)
  • All tests pass
  • Tests verify: no github/builders top-level keys, no costByProject, Activity section renders, protocol breakdown works, spider→spir normalization

CMAP Review

Pending

@waleedkadous
Copy link
Contributor Author

Architect Integration Review

Verdict: APPROVE

Clean migration from GitHub API to local project artifact scanning. Types updated consistently across backend, frontend, and tower-routes fallback. No new dependencies (js-yaml already present). Net code reduction (+358/-625).

All requirements addressed:

  • Unified Activity section replaces GitHub + Builders
  • Projects split by protocol (SPIR, ASPIR, AIR, etc.)
  • Bugs fixed count
  • Pie charts replaced with segmented bar charts
  • Cost per project removed
  • Data sourced from status.yaml, not GitHub API

Non-blocking follow-ups:

  • Rename "Avg Time to Merge" → "Avg Time to Complete" (now measures project lifecycle, not git merge)
  • Stale JSDoc referencing gh CLI in analytics.ts

Architect integration review

@waleedkadous waleedkadous merged commit 3671b6e into main Feb 23, 2026
6 checks passed
@waleedkadous waleedkadous deleted the builder/bugfix-529-dashboard-analytics-redesign-a branch February 23, 2026 18:15
waleedkadous added a commit that referenced this pull request Feb 23, 2026
…hboard-analytics-redesign-a"

This reverts commit 3671b6e, reversing
changes made to a3e7c0d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard analytics: redesign activity stats and charts

1 participant