diff --git a/src/renderer/src/components/billing/PlanBillingUsageHistory.tsx b/src/renderer/src/components/billing/PlanBillingUsageHistory.tsx index 8320be5651f..a787dd88775 100644 --- a/src/renderer/src/components/billing/PlanBillingUsageHistory.tsx +++ b/src/renderer/src/components/billing/PlanBillingUsageHistory.tsx @@ -1,6 +1,5 @@ import { InlineError } from '@/components/ui/inline-error' import { Skeleton } from '@/components/ui/skeleton' -import { SettingsGroupHeader } from '@/components/settings/section-layout/SettingsGroup' import { useTranslate } from '@/i18n/use-translate' import { formatHoursUsed } from './plan-billing-format' import { @@ -18,6 +17,22 @@ const LOADING_BAR_HEIGHTS = Array.from({ length: 30 }, (_, index) => Math.round(30 + 25 * Math.sin(index / 3) + 20 * Math.cos(index / 5) + 25) ) +/** A part of Plan & billing, so a step below its section header (the size of "Overage"). */ +function UsageHistoryHeading({ + title, + total = null +}: { + title: string + total?: string | null +}): React.JSX.Element { + return ( +
diff --git a/src/renderer/src/components/settings/orca-cloud/OrcaAccountBillingPane.fixture.tsx b/src/renderer/src/components/settings/orca-cloud/OrcaAccountBillingPane.fixture.tsx index 379cbfcb3c2..f04d9c82c88 100644 --- a/src/renderer/src/components/settings/orca-cloud/OrcaAccountBillingPane.fixture.tsx +++ b/src/renderer/src/components/settings/orca-cloud/OrcaAccountBillingPane.fixture.tsx @@ -52,8 +52,16 @@ function page(status: OrcaProfileAuthStatus, billing: React.ReactNode) { width: 760, store: { orcaProfileAuthStatus: status }, // The account part re-reads auth status on mount; answer with the same state. + // Orca Cloud builds (the only ones with this page) have a control plane. setup: () => { Object.assign(window.api.orcaProfiles, { authStatus: () => Promise.resolve(status) }) + Object.assign(window.api, { + cloudApi: { + ...window.api.cloudApi, + availability: () => + Promise.resolve({ status: 'ready' as const, controlPlaneUrl: 'https://cloud.example' }) + } + }) }, render: () => (