Skip to content

feat(dashboard): Jev-pickable display components and ask_jev MCP tool - #348

Draft
alsoalter85 wants to merge 1 commit into
trunkfrom
feat/jev-display-components
Draft

alsoalter85 wants to merge 1 commit into
trunkfrom
feat/jev-display-components

Conversation

@alsoalter85

Copy link
Copy Markdown
Contributor

Summary

Lets a natural-language question about feedback ("how many comments have I not resolved yet?") be routed through Jev (TypeSafe System One). Jev picks the dashboard component that answers it, and the pick is rendered.

Display components (apps/dashboard/components/), built only on existing dashboard tokens:

  • MetricCard: one headline number, optionally clickable through to the records.
  • StatusBreakdown: direct-labeled bars per workflow status, in fixed workflow order, using the --status-* tokens.
  • LineChart: one daily series in SVG with hover crosshair, arrow-key inspection, a screen-reader table, and summary="total" | "latest" (for snapshot series such as a backlog).
  • lib/metrics.ts: unresolvedCount and dailyCounts (UTC day buckets).

Component meta: each component has a .meta.ts following branding/AGENTIC-DESIGN-SYSTEM.md. The schema type it references didn't exist yet and is added as apps/dashboard/lib/meta.ts. display.meta.test.ts checks name, props, and token parity plus the minimum-content rules. The whenToUse/whenNotToUse fields are what Jev chooses from.

scripts/jev/ (dev tooling, not shipped):

  • Jev request: asks for the component, the set of comments (unresolved, open, …), and the daily measure (backlog vs. new per day), and validates that every answer is one of the offered options.
  • Mock data: seeded comments with full status history, so counts, lists, and backlog trends agree.
  • Entry points: bun run jev "<question>", bun run jev:preview (http://127.0.0.1:4340/), and the ask_jev stdio MCP tool registered in .mcp.json. It's a hand-written JSON-RPC server, with no new dependencies.
  • Setup: needs TYPESAFE_API_KEY in .env.local. See scripts/jev/README.md.

Sample Jev results (jev-1.13.0)

Question Component Comments Over time
how many comments have I not resolved yet? MetricCard 99% unresolved 100% n/a
where is our feedback stuck? StatusBreakdown 100% unresolved 86% n/a
history of open comments volume LineChart 100% open 85% backlog 100%
show me the comments ready for the agent CommentList 100% ready 100% n/a
history by state, each state a different line StatusBreakdown 60% / LineChart 40% all backlog

The last row shows a gap: no component yet shows a per-status trend. A StatusTrend component would close it.

Notes

  • Unrelated test failures: App.auth-routing.test.tsx has 5 failures on trunk as well (Cannot read properties of undefined (reading 'clear')). bun run test:coverage exits non-zero because of them, so coverage for the diff gate was generated with that file excluded.
  • Coverage: diff line and branch coverage against trunk is 100%. scripts/ is outside the coverage scope and was typechecked separately.
  • Resolved count: rejected counts as resolved in unresolvedCount.

Test plan

  • bun run typecheck
  • New component, meta, and metrics tests pass
  • bun run test:diff-coverage -- trunk: 100% line and branch
  • Live ask_jev calls through the MCP server for all four components
  • Visual check of components in dark and light themes via the preview

🤖 Generated with Claude Code

Add MetricCard, StatusBreakdown, and LineChart display components built on
the dashboard tokens, each with a .meta.ts following the agentic design
system schema (new lib/meta.ts type). The meta's whenToUse/whenNotToUse feed
Jev's choice criteria.

Add scripts/jev: asks Jev (TypeSafe System One) which component answers a
natural-language question, builds props from seeded mock data with full
status history, and renders the pick in a Vite preview. Exposed as a CLI
(bun run jev) and as the ask_jev stdio MCP tool registered in .mcp.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Vercel preview

View deployment

Commit: 437203b105c08ddc6ff07b2dee7ca34532e8fc68

This branch was successfully deployed

1 active deployment
Preview (PR #348) — 437203b1 Deployed Oct 21, 2026 by github-actions[bot]
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