Skip to content

feat(workbenches): devbox usage metrics dashboard - #4794

Draft
wailingwombat wants to merge 11 commits into
masterfrom
anna/prod-5483-devbox-usage-metrics
Draft

wailingwombat wants to merge 11 commits into
masterfrom
anna/prod-5483-devbox-usage-metrics

Conversation

@wailingwombat

Copy link
Copy Markdown
Collaborator

Summary

Implements the Devbox usage dashboard design for PROD-5483.

  • View switcher on Workbenches › Usage: Workbench usage (existing, real data) and Devbox usage (?view=devbox).
  • Shared filter row: 1D / 1W / 1M range (moved out of the page toolbar), Team and Agent filters (devbox only), a "Showing …" scope label and Export CSV.
  • Devbox view: KPI strip (PRs created, merge rate, hours saved, tokens, cost per merged PR, each with a change vs. the previous period), PR velocity and cumulative hours saved charts, a by-agent table (the agent filter highlights its row), top users (Top 5/10) and tool calls by integration.

Draft: mock data

There is no devbox usage metrics API yet. usage/devboxUsageMock.ts makes a seeded, deterministic dataset in the shape the view needs. Replace getDevboxUsageModel with a GraphQL query once the backend lands.

Not done yet

  • Pixel-level check against the design in a running console.
  • The design's "How we estimate" link (it has no target yet).
  • The Workbench usage cards are unchanged.

Test plan

  • tsc --build, biome, oxlint
  • Open /workbenches/usage?view=devbox locally and compare with the design

🤖 Generated with Claude Code

Adds a view switcher to the Workbenches > Usage tab (Workbench usage /
Devbox usage) with a shared filter row (range, team, agent, CSV export).
The devbox view shows KPIs, PR velocity, hours saved, a per-agent table,
top users and tool calls by integration. Devbox data is mocked in
devboxUsageMock.ts until the metrics API exists.

Refs PROD-5483

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

linear Bot commented Dec 3, 2026

Copy link
Copy Markdown

PROD-5483

wailingwombat and others added 10 commits December 3, 2026 13:14
…er rejects

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

Range uses the small ButtonGroup again; the view switcher and filters use
small SelectButtons. Devbox agents use DevboxAgentType with their logos and
labels from DevboxAgentLabel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g line

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

The range ButtonGroup's selected state is fill-zero-selected, which matches
the page background in the content area; in the toolbar it highlights as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At fill level 0 the ButtonGroup's selected fill (fill-zero-selected) equals
the page background, so the selection was invisible in the page body.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cky header bg

The pinned usage header now uses the console shell's background (fill-zero
in dark mode). WorkbenchStatCard's helper accepts a ReactNode for the
coloured period-over-period delta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tables scroll inside their cards instead of forcing a min width, the chart
legend and filter groups wrap, and the pinned header unpins below
desktopSmall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The css-prop transform didn't carry theme into the computed media-query
key, so the page threw "theme is not defined" at render.

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

This branch has not been deployed

No deployments
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