Phase 2: Task Ingestion Pipeline (#459) #460

Merged
jason.woltje merged 5 commits from feat/phase-2-ingestion into main 2026-02-23 00:54:56 +00:00
Owner

Summary

  • Dashboard Summary API: New endpoint aggregating metrics, recent activity, active jobs, and token budgets in a single call with 10 parallel Prisma queries
  • Widget Data Binding: All 5 dashboard widgets (DashboardMetrics, ActivityFeed, OrchestratorSessions, TokenBudget, QuickActions) wired to real API data with typed props and empty-state fallbacks
  • Review Remediation: Fixed race condition (null workspaceId guard), TypeScript strict typing (controller decorator return type), error state UI, and error-path test coverage

Changes

API ()

  • module: controller, service, DTOs, unit tests
  • : registered DashboardModule

Web ()

  • : API client with typed interfaces
  • : data fetching with workspace guard, error state, loading skeleton
  • Widget components accept typed optional props
  • : 6 tests including error-path coverage

Quality Gates

Gate Result
Lint 8/8 pass
Typecheck 7/7 pass
Tests 8/8 pass (web: 1128, api: 3243)
Code Review approve (0 blockers after remediation)

Test Plan

  • API returns aggregated data for authenticated workspace
  • Dashboard renders widgets with real data when API is available
  • Dashboard shows error banner when API fails
  • Dashboard shows loading skeleton while waiting for workspace context
  • All quality gates pass with no cache

Generated with Claude Code

## Summary - **Dashboard Summary API**: New endpoint aggregating metrics, recent activity, active jobs, and token budgets in a single call with 10 parallel Prisma queries - **Widget Data Binding**: All 5 dashboard widgets (DashboardMetrics, ActivityFeed, OrchestratorSessions, TokenBudget, QuickActions) wired to real API data with typed props and empty-state fallbacks - **Review Remediation**: Fixed race condition (null workspaceId guard), TypeScript strict typing (controller decorator return type), error state UI, and error-path test coverage ## Changes ### API () - module: controller, service, DTOs, unit tests - : registered DashboardModule ### Web () - : API client with typed interfaces - : data fetching with workspace guard, error state, loading skeleton - Widget components accept typed optional props - : 6 tests including error-path coverage ## Quality Gates | Gate | Result | |------|--------| | Lint | 8/8 pass | | Typecheck | 7/7 pass | | Tests | 8/8 pass (web: 1128, api: 3243) | | Code Review | approve (0 blockers after remediation) | ## Test Plan - [ ] API returns aggregated data for authenticated workspace - [ ] Dashboard renders widgets with real data when API is available - [ ] Dashboard shows error banner when API fails - [ ] Dashboard shows loading skeleton while waiting for workspace context - [ ] All quality gates pass with no cache Generated with [Claude Code](https://claude.com/claude-code)
jason.woltje added 5 commits 2026-02-23 00:54:38 +00:00
Phase-1 complete: PR #458 merged, issue #457 closed.
Phase-2 planned: 3 tasks (MS-P2-001 through MS-P2-003), issue #459.
Focus: wire existing API endpoints to dashboard widgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(api): add dashboard summary endpoint (#459)
All checks were successful
ci/woodpecker/push/api Pipeline was successful
e38aaa950b
Create GET /api/dashboard/summary aggregating 10 parallel Prisma
queries: task metrics, active agents, project counts, error rate,
recent activity, active runner jobs with steps, token budget entries.

Guarded by AuthGuard + WorkspaceGuard + PermissionGuard.
Includes DTO classes and unit tests.

Task: MS-P2-001

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(web): wire dashboard widgets to real API data (#459)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
7c762e64c2
- Create dashboard API client with TypeScript interfaces
- Update page.tsx to fetch from GET /api/dashboard/summary on mount
- DashboardMetrics: accept metrics prop, map to 6 cells with real data
- ActivityFeed: accept items prop, map actions to icons/timestamps
- OrchestratorSessions: accept jobs prop, render steps as agent nodes
- TokenBudget: accept budgets prop, compute percentages
- All widgets have empty/zero fallback states
- Update page tests to mock API fetch

Task: MS-P2-002

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: remediate dashboard API integration review blockers (#459)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
3dab677524
- Fix race condition: guard useEffect when workspaceId is null, prevent
  infinite loading state by setting isLoading=false on null workspace
- Fix TypeScript strict typing: @Workspace() returns string|undefined,
  controller now matches with BadRequestException guard
- Narrow details DTO type from unknown to Record<string, unknown>|null
- Add error state UI for API fetch failures
- Add error-path test with static mock import pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 7581d26567 into main 2026-02-23 00:54:56 +00:00
jason.woltje deleted branch feat/phase-2-ingestion 2026-02-23 00:54:57 +00:00
Sign in to join this conversation.