dashboard: provider badge on task cards + timeline rows (cursor:composer-2 / claude-code:sonnet-4-6) #955

Closed
opened 2026-05-08 12:05:52 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As an operator scanning the board and timeline, I want a small inline badge showing which provider + model executed a task ("via cursor:composer-2", "via claude-code:sonnet-4-6"), so I can correlate behavioural differences and cost variance with the underlying engine without clicking into the row.

Context

Today nothing in the UI distinguishes a cursor-backed run from a claude-code-backed run. Multiple agent types now mix providers (dev=cursor, code-lead=claude, designer=claude, etc.) and the chips help when:

  • Triaging slow tasks ("is this a cursor stall or a claude stall?")
  • Comparing cost / quality across providers on similar issues
  • Validating routing rules ("did this task land on the right agent type and provider?")

Acceptance criteria

Server / SSE

  • TaskRecord already carries model. Add provider: AgentProvider (already a type in @claude-hooks/shared) so the UI doesn't have to infer.
  • task_history row + the live SSE envelope both expose provider. New column task_history.provider TEXT NOT NULL DEFAULT 'claude-code' plus a one-shot backfill from the agent type config.
  • Board card payload, monitor row payload, drawer detail payload all include provider.

Frontend

  • New <ProviderBadge provider model> component. Compact pill shape, uses Tokyo Night palette, lucide icon per provider where one fits (square sparkle for cursor, asterisk for claude-code, generic chip for others).
  • Mount on: planner board card, monitor row, drawer header, agent timeline header, history list.
  • When the provider is unknown (legacy row before the migration ran), render a neutral "?" chip with a tooltip explaining the missing data.
  • Honor prefers-reduced-motion — no spin/pulse animation on the badge.

Tests

  • Snapshot tests covering each provider value.
  • Migration test: a fixture row without provider migrates to claude-code and renders correctly.

Out of scope

  • Filtering the board by provider — separate filter issue if useful.
  • Per-provider cost aggregation widgets — covered by a future analytics issue.

References

  • Parent: #950
  • AgentProvider type already exists in @claude-hooks/shared.
  • apps/web/CLAUDE.md foundation primitives (badge follows pill radius + token color rules).
## User story As an operator scanning the board and timeline, I want a small inline badge showing which provider + model executed a task ("via cursor:composer-2", "via claude-code:sonnet-4-6"), so I can correlate behavioural differences and cost variance with the underlying engine without clicking into the row. ## Context Today nothing in the UI distinguishes a cursor-backed run from a claude-code-backed run. Multiple agent types now mix providers (dev=cursor, code-lead=claude, designer=claude, etc.) and the chips help when: - Triaging slow tasks ("is this a cursor stall or a claude stall?") - Comparing cost / quality across providers on similar issues - Validating routing rules ("did this task land on the right agent type and provider?") ## Acceptance criteria ### Server / SSE - [ ] `TaskRecord` already carries `model`. Add `provider: AgentProvider` (already a type in `@claude-hooks/shared`) so the UI doesn't have to infer. - [ ] `task_history` row + the live SSE envelope both expose `provider`. New column `task_history.provider TEXT NOT NULL DEFAULT 'claude-code'` plus a one-shot backfill from the agent type config. - [ ] Board card payload, monitor row payload, drawer detail payload all include `provider`. ### Frontend - [ ] New `<ProviderBadge provider model>` component. Compact pill shape, uses Tokyo Night palette, lucide icon per provider where one fits (square sparkle for cursor, asterisk for claude-code, generic chip for others). - [ ] Mount on: planner board card, monitor row, drawer header, agent timeline header, history list. - [ ] When the provider is `unknown` (legacy row before the migration ran), render a neutral "?" chip with a tooltip explaining the missing data. - [ ] Honor `prefers-reduced-motion` — no spin/pulse animation on the badge. ### Tests - [ ] Snapshot tests covering each provider value. - [ ] Migration test: a fixture row without `provider` migrates to `claude-code` and renders correctly. ## Out of scope - Filtering the board by provider — separate filter issue if useful. - Per-provider cost aggregation widgets — covered by a future analytics issue. ## References - Parent: #950 - `AgentProvider` type already exists in `@claude-hooks/shared`. - `apps/web/CLAUDE.md` foundation primitives (badge follows pill radius + token color rules).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#955
No description provided.