Skip to content

fix(dashboard): type-safe scoring, usage cache, agent plumbing, summary endpoint#203

Merged
hopeatina merged 3 commits intomainfrom
fix/dashboard-backend-optimizations
Mar 1, 2026
Merged

fix(dashboard): type-safe scoring, usage cache, agent plumbing, summary endpoint#203
hopeatina merged 3 commits intomainfrom
fix/dashboard-backend-optimizations

Conversation

@hopeatina
Copy link
Copy Markdown
Contributor

Summary

  • Scoring fields: Add objectiveScore, roiPerToken, expectedTokens, expectedValueUsd to NextUpQueueItem (server + dashboard types); remove two unsafe as unknown as Record<string, unknown> casts in NextUpPanel.tsx
  • Usage cache: 30s TTL cache on resolveUsageSummary() — dashboard polls every 60s, multiple tabs no longer multiply cloud API calls
  • Agent plumbing: activeAgents/totalAgents from live initiatives API now flow through to dashboard instead of hardcoded 0
  • Summary endpoint: New GET live/initiatives/summary returns pre-aggregated task counts via summarizeTaskStatuses(); HealthScoreCard uses server data with client-side fallback

Test plan

  • npm run build:core — plugin tsc passes (verified)
  • cd dashboard && npx tsc --noEmit — zero type errors (verified)
  • npm run build — dashboard Vite build passes (verified)
  • NextUpPanel tier badges use item.objectiveScore directly (no unsafe cast)
  • HealthScoreCard shows accurate task counts from summary endpoint
  • Usage summary caches (second request within 30s returns cached result)

🤖 Generated with Claude Code

hopeatina and others added 3 commits March 1, 2026 10:05
…st, threading

Comprehensive dashboard UX refresh bringing all surfaces toward 9/10 quality:

Phase 1: Shared UX primitives (EmptyState, ErrorState, SkeletonCard) integrated
  across AgentsChatsPanel, NeedsInputPanel, EntityCommentsPanel, ThreadDrawer,
  NextUpPanel, and ActivityTimeline.

Phase 2: Initiative detail hero with ProgressRing, MetricRow, 28px title,
  status badge, and ETA display.

Phase 3: NextUp card enrichment with scoring tier badges (S/A/B),
  estimate row, and mini progress bars.

Phase 4: SliceRun + Activity detail redesign with SliceDetailHero,
  ArtifactGallery, and ActivityDetailHero components.

Phase 5: Agent session cards and ConversationThread with chat bubbles.

Phase 6: NeedsInput enhancement with blocker impact indicators and
  quick decision option chips; shared BlockerSummary component.

Phase 7: HealthScoreCard, CostRollupCard, and ActionQueueStrip integrated
  into MissionControlView with live budget data from useUsageControlPlane.

14 new components, 11 modified files. No new dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, summary endpoint

- Add objectiveScore/roiPerToken/expectedTokens/expectedValueUsd to
  NextUpQueueItem server+dashboard types; remove unsafe casts in NextUpPanel
- Cache usage control-plane summary with 30s TTL to reduce redundant API calls
- Plumb activeAgents/totalAgents from live initiatives API through to dashboard
- Add GET live/initiatives/summary endpoint with pre-aggregated task counts
  from summarizeTaskStatuses(); wire to HealthScoreCard via useInitiativeSummary
  hook with client-side fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-optimizations

# Conflicts:
#	dashboard/src/components/mission-control/MissionControlView.tsx
#	dashboard/src/components/mission-control/NextUpPanel.tsx
@hopeatina hopeatina merged commit f67c355 into main Mar 1, 2026
0 of 3 checks passed
This was referenced Mar 1, 2026
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.

1 participant