Skip to content

feat(site): show total agent hours consumption on the licenses page - #27953

Draft
jaaydenh wants to merge 1 commit into
entitlements-80f1from
agent-hours-card-vky8
Draft

feat(site): show total agent hours consumption on the licenses page#27953
jaaydenh wants to merge 1 commit into
entitlements-80f1from
agent-hours-card-vky8

Conversation

@jaaydenh

@jaaydenh jaaydenh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Adds a "Total agent hours" consumption panel to the Licenses page, surfacing the agent_runtime_hours entitlement introduced in #27796.

The new TotalAgentHoursCard renders full width directly above the Agent Workspace Builds panel. It shows a usage bar with Used/Limit labels and an info tooltip next to the title. The bar color and tooltip copy track the same thresholds the backend uses for license warnings: green below the soft limit, orange once usage reaches the soft limit, and red once usage reaches the purchased allocation (values at or beyond the threshold count as reached, matching appendAgentRuntimeHoursWarning). When a soft limit exists, the tooltip states the actual soft-limit percentage computed from soft_limit / limit. The panel is hidden entirely when the feature is disabled, which is how the backend reports a zero-hour allocation.

Storybook stories cover the green/orange/red states, the capped over-allocation bar, missing usage data, the hidden state, the invalid-limit error state, and each tooltip message via play interactions. The page view story verifies the panel renders above Agent Workspace Builds.

Stacked on #27796.

closes CODAGT-855.

@linear-code

linear-code Bot commented Aug 9, 2026

Copy link
Copy Markdown

CODAGT-855

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