Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7b2079e
feat(site): show total agent hours consumption on the licenses page
jaaydenh Aug 9, 2026
20803d7
feat(site): render unlimited agent runtime hours allocation
jaaydenh Aug 11, 2026
eafd911
fix(site): report exact threshold percentages on total agent hours card
jaaydenh Aug 13, 2026
783eac9
feat(site): render unlimited agent hours allocation as striped bar
jaaydenh Aug 13, 2026
e350d5a
feat(site): fade out unlimited agent hours stripes in green
jaaydenh Aug 13, 2026
98c5a6c
feat(site): mark agent hours hard cap on the usage bar
jaaydenh Aug 13, 2026
2530d21
feat(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage): sho…
jaaydenh Aug 13, 2026
007c640
feat(site): segment the agent hours bar by threshold
jaaydenh Aug 13, 2026
fa4bea9
fix(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage): keep…
jaaydenh Aug 13, 2026
e64f435
fix(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage): corr…
jaaydenh Aug 13, 2026
513022e
refactor(site/src): share the agent runtime hours story fixture
jaaydenh Aug 13, 2026
d219b14
refactor(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage):…
jaaydenh Aug 13, 2026
7db6218
fix(site/src): stack the agent hours limit label on narrow cards
jaaydenh Aug 13, 2026
d9e9d48
fix(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage): fill…
jaaydenh Aug 13, 2026
ff1028e
feat(site/src): show the license usage period on the agent hours card
jaaydenh Aug 14, 2026
53ec635
chore: design updates
jaaydenh Aug 19, 2026
19c01e7
fix: fix test
jaaydenh Aug 19, 2026
ec78225
fix(site/src/pages/DeploymentSettingsPage/LicensesSettingsPage): wrap…
jaaydenh Aug 19, 2026
7234162
chore: Avoid floating-point underflow in displayed percentages
jaaydenh Aug 19, 2026
1e010df
chore: cleanup
jaaydenh Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import type { Meta, StoryObj } from "@storybook/react-vite";
import { expect, fn, within } from "storybook/test";
import type { Feature } from "#/api/typesGenerated";
import { MockLicenseResponse } from "#/testHelpers/entities";
import {
MockAgentRuntimeHoursFeature,
MockLicenseResponse,
} from "#/testHelpers/entities";
import LicensesSettingsPageView from "./LicensesSettingsPageView";

const meta: Meta<typeof LicensesSettingsPageView> = {
Expand All @@ -27,6 +30,10 @@ const meta: Meta<typeof LicensesSettingsPageView> = {
enabled: false,
entitlement: "not_entitled",
} satisfies Feature,
agentRuntimeHoursFeature: {
enabled: false,
entitlement: "not_entitled",
} satisfies Feature,
},
};

Expand Down Expand Up @@ -71,3 +78,32 @@ export const ActiveAIGovernanceAddOnUsage: Story = {
await expect(canvas.getByText("1,000")).toBeInTheDocument();
},
};

export const TotalAgentHoursUsage: Story = {
args: {
agentRuntimeHoursFeature: {
...MockAgentRuntimeHoursFeature,
limit: 2000,
soft_limit: 1700,
Comment thread
jaaydenh marked this conversation as resolved.
actual: 435,
// 435 hours and 48 minutes: renders as 435.8.
actual_ms: 435 * 3_600_000 + 48 * 60_000,
},
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const agentHoursHeading = canvas.getByRole("heading", {
name: "Total agent hours",
});
const agentHoursCard = within(agentHoursHeading.closest("section")!);
await expect(agentHoursCard.getByText("435.8")).toBeInTheDocument();
await expect(agentHoursCard.getByText("2,000")).toBeInTheDocument();
const managedAgentsSection = canvas.getByText(
"Agent Workspace Builds Disabled",
);
await expect(
agentHoursHeading.compareDocumentPosition(managedAgentsSection) &
Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { LicenseCard } from "./LicenseCard";
import { LicenseSeatConsumptionChart } from "./LicenseSeatConsumptionChart";
import { ManagedAgentsConsumption } from "./ManagedAgentsConsumption";
import { SeatUsageBarCard } from "./SeatUsageBarCard";
import { TotalAgentHoursCard } from "./TotalAgentHoursCard";

type Props = {
showConfetti: boolean;
Expand Down Expand Up @@ -192,6 +193,8 @@ const LicensesSettingsPageView: FC<Props> = ({
/>
</div>

<TotalAgentHoursCard feature={agentRuntimeHoursFeature} />

<ManagedAgentsConsumption
managedAgentFeature={managedAgentFeature}
/>
Expand Down
Loading
Loading