Commit Graph
66 Commits
Author SHA1 Message Date
Neil c90ba953af fix(cloud): WORKER-XREQ-PROMISE sweep: JWKS, the policy chain, the keyring, and a guard
Follow-up to #801: the rest of the Workers' shared in-flight promises.

- Auth (sandbox-control desktop, staging and dev keys; billing) and the egress proxy's OIDC keys used
  jose's createRemoteJWKSet, which shares one in-flight JWKS fetch across every caller: a request
  cancelled mid-fetch hung every token check behind it, and jose refetches after ten minutes. That
  fits the 'Start sandbox' creates stuck before any log 10–15 min after a deploy and cleared by a
  redeploy. settledRemoteJWKSet keeps the key set as a value; a request that needs a fresh one
  fetches it for itself (refetch every 10 min, an unknown kid at most every 30 s).
- applySandboxPolicy no longer chains writes per sandbox in the isolate (a chained promise from a
  cancelled request would hang every later write for that sandbox); the D1 generation orders them.
- The KMS keyring cache keeps the loaded keyring and the last failure as values; no in-flight load
  is stored at all.
- Guard (both Workers): a unit test fails on createRemoteJWKSet, or a module-level Map, variable
  or object holding a Promise, unless the line says why it is safe ('xreq-ok:', e.g. a WebCrypto
  import).
2026-11-15 14:24:44 -08:00
Neil f2888317b4 feat(cloud): plans dialog before the web console; billing serves each plan's card copy
"Plan & billing", "Upgrade to Orca Cloud", "Choose plan" and every "Compare plans" now open an
in-app plans dialog first: the team's plan and status (trial hours left, active with hours and
seats, payment failed, or no plan with the trial billing offers), then billing's plan cards (Team
with a monthly/annual toggle, Enterprise with contact sales). "Continue in browser" opens the
console's billing page through the existing sign-in ticket. Members see the same plan info with
"Ask a team admin to upgrade" (Plan & billing is back in their account menu, read-only). Read-only:
no checkout, usage history or admin settings return to the desktop.

Everything shown is billing's: names, Stripe prices, seat pricing, feature bullets and trial terms
from GET /v1/plans, now also each plan's tagline, feature-list lead and button label (new optional
catalog `marketing`, unversioned copy, plus `omitFeatures` so Enterprise stops advertising egress
controls). Main's lenient parse keeps a newer or older service safe; without the catalog the
entitlement's offers stand in, and with neither the dialog says plans didn't load and still offers
the console. While billing loads the title is neutral, so a paying team never sees an upsell flash.

Settings > Account's billing row opens the dialog ("View plans"); "Update payment method" still
goes straight to the console.
2026-11-14 16:37:59 -08:00
Neil 8104f84b94 billing: record one plan start per Checkout
One Checkout sends checkout.session.completed, customer.subscription.created and invoice.paid,
often concurrently; each that re-read the row before another wrote it saw the plan start and
pushed billing.plan_started with its own 'at', so the event ids differed and the team's audit
log showed it twice. A plan starting or ending now carries a once key (subscription id and
period start), so every racer pushes the same event id and the control plane's INSERT OR IGNORE
keeps one.
2026-11-14 03:45:08 -08:00
Neil b9a2ff9896 feat(billing): Checkout and the Customer Portal started from the web console return to its billing page
POST /v1/billing/checkout and /portal accept returnTo: 'console'. The return URL is built from
this Worker's CONSOLE_URL (else the setup pages' auth origin, which forwards /console) and the
caller's own team, never from the request. Desktop-started flows keep the /return handoff page.
2026-11-14 02:18:51 -08:00
Neil f1573ece1c test(billing): use the real help@stably.ai inbox in supportUrl fixtures (orca.dev has no MX) (#740) 2026-11-14 02:01:12 -08:00
Neil 950a8165c8 Merge pull request #691 from nwparker/cloud/ep10-cancel-on-delete
feat(billing): EP-10 team delete can cancel a plan that's already set to end (cancel-now)
2026-11-13 07:11:50 -08:00
Neil 77db6ffc48 fix(billing): EP-10 cancel-now decides on Stripe's live state: a plan resumed after auth's delete check is refused (409 not_cancelling) (sso-scim) 2026-11-13 06:39:43 -08:00
Neil 3e228f227d feat(billing): EP-10 team delete can cancel a plan that is already set to end
GET /v1/internal/accounts/:accountId/subscription adds cancelling / endsAt / periodEnd (additive);
new POST .../subscription/cancel-now (membership-sync token) cancels the team's subscription
immediately (invoice_now: reported overage is billed; prorate false: no refund) but only one
already set to end (cancel_at_period_end or a portal cancel_at); a renewing plan gets 409
not_cancelling. Idempotent; a Stripe failure is a 502 and changes nothing, so auth must not
delete the team. Mirror re-read from Stripe, grants revoked.
2026-11-13 06:39:43 -08:00
Neil 15b94d9567 Merge remote-tracking branch 'private/cloud/integration' into cloud/ep9-billing-mint-org 2026-11-13 06:39:11 -08:00
Neil 389292a819 fix(billing): EP-9b reconcile counts a cancel_at change as a fix (sso-scim nit) 2026-11-13 05:35:01 -08:00
Neil de4286aa73 fix(cloud): EP-9 billing tokens are minted for the team this device shows, never auth's shared active team
The desktop minted billing tokens with an empty body, so auth picked the team from the cloud
profile's active team, which every device of the same user shares: one device switching teams made
the other read (and act on) that team's plan, hours and usage. mintBillingToken now sends {orgId}
for this device's team (auth #761), refuses a token whose org claim is any other team (fail
closed: billing_org_mismatch), and falls back to {} on an older auth (400) with the claim still
checked. Mirrors the sandbox mint (#634).
Billing test: two teams of one owner on one Stripe customer each read only their own plan/hours.
2026-11-13 05:30:51 -08:00
Neil edaa5ecd46 fix(billing): EP-9 a portal cancel (Stripe cancel_at) shows as the team's plan ending on that date
Stripe's portal on API 2025-09-30.clover cancels by setting cancel_at, not cancel_at_period_end,
so billing never saw the cancellation: no 'Plan ends', no grant end. The mirror now stores
cancel_at (migration 0009); cancel_at_period_end is the 'cancelling' flag for either form; grants
end at cancel_at; entitlements carry cancelAt; the desktop's 'Plan ends' uses it.
Test: two teams of one owner (separate customers), one cancels via cancel_at: its own plan shows
ending on that date, the other is untouched; un-cancelling clears it.
2026-11-13 05:24:47 -08:00
Neil 5870930dad feat(cloud): issuer lists, platform egress suffixes and a prod-required setup pages URL (DOMAIN-1 D2) (#668)
- SANDBOX_/BILLING_(STAGING_)AUTH_ISSUER accept a comma-separated issuer list; a single value behaves as before.
- ORCA_PLATFORM_HOST_SUFFIXES supplies the platform egress hosts (default *.onorca.dev, unchanged allowlist).
- Billing: CLOUD_SETUP_PAGES_URL unset with BILLING_ENV=prod answers 503 billing_misconfigured; dev/staging keep the fallback.

No wrangler config or current value changes.
2026-11-13 03:32:59 -08:00
Neil 6eaa958196 Merge remote-tracking branch 'private/cloud/integration' into cloud/billing-subscribed-flag 2026-11-13 00:42:57 -08:00
Neil bb8861807c fix(cloud): AUDIT-AUTH-EVENTS design review: billing rows say the plan, seats, date and cap 2026-11-12 23:04:38 -08:00
Neil d5e74c7822 feat(cloud): AUDIT-AUTH-EVENTS billing changes reach the team audit log; per-sender event families; wording for auth and billing events 2026-11-12 23:01:00 -08:00
Neil 226487dd59 Merge remote-tracking branch 'private/cloud/integration' into fix/overage-reenable 2026-11-12 22:38:15 -08:00
NeilandClaude 747c389b68 feat(billing): features answer says whether the account pays for a plan (PAID-TEAM-CHOOSE-PLAN)
POST /v1/internal/entitlements/features now also returns subscribed: the
account has a subscription that is active, trialing, past_due or unpaid.
Auth counts it as Orca Cloud access, so a paying team that is not on the
per-account rollout is no longer told to choose a plan (and then refused
at checkout as already subscribed).

Read from the subscription row Stripe's webhooks keep, in every
ENTITLEMENTS_MODE. Canceled, incomplete, expired and paused
subscriptions, the no-card trial and no subscription are false.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-12 21:51:16 -08:00
Neil eca563dfef Merge branches 'cloud/integration' and 'cloud/sec-4-secret-activity' of https://github.com/nwparker/orca-private into cloud/enterprise-audit-log 2026-11-12 20:45:23 -08:00
Neil e954d833bb Merge pull request #556 from nwparker/cloud/entitlements-on
chore(cloud): ENTITLEMENTS-ON dev billing switches to ENTITLEMENTS_MODE=on
2026-11-12 20:15:15 -08:00
Neil dd9b9713a6 feat(cloud): ENTERPRISE-AUDIT unified team audit log API (GET /v1/audit-log), Enterprise feature entitlements, audit ingest route 2026-11-12 20:09:12 -08:00
NeilandClaude 571074d55d fix(billing): let overage be turned on again after turning it off
Turning overage off left the card's save flag set, so the off view showed a stuck
check-mark "Saving…" in place of the Turn on button. Replace the flag with a save
state (saving -> saved | error) that always ends with the request, and keep Turn on
rendered in the off view at all times.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-12 19:58:00 -08:00
Neil a0ef341878 feat(cloud): audit_log entitlement on Enterprise (catalog v2), feature flags route, contact-sales grant 2026-11-12 19:51:55 -08:00
Neil bac96ce153 Merge pull request #534 from nwparker/cloud/entitlements-g
fix(cloud): ENTITLEMENTS-G grants start when the subscription is live (test-clock shadow diff); includes #529
2026-11-12 11:32:36 -08:00
Neil 51e8f5a2be chore(cloud): ENTITLEMENTS-ON dev billing serves the catalog + grants (ENTITLEMENTS_MODE=on) 2026-11-12 11:25:16 -08:00
Neil 5a6cceca7d fix(billing): V3-06 Top workspaces names up to 5 live workspaces, then one deleted line, then others; billing sends the top 20 so deleted ones don't crowd out live ones 2026-11-12 11:01:01 -08:00
Neil cbb8c09008 fix(billing): serve the team subscription route from the main dispatcher (it sat inside handleCloudSetup, reached only for /cloud-setup paths) 2026-11-12 06:42:04 -08:00
Neil 49d26b647c cloud: internal routes for deleting a team (TEAM-DELETE)
billing: GET /v1/internal/accounts/:accountId/subscription -> {status, open}
(MEMBERSHIP_SYNC_TOKEN), so auth refuses to delete a team with an open subscription.

sandbox-control (auth's MEMBER_REMOVED_TOKEN, never the operator routes):
- GET /v1/internal/accounts/:accountId/delete-check -> {workspaces}: the team's
  workspaces in any state but destroyed.
- POST /v1/internal/accounts/:accountId/secrets/purge -> {purged}: deletes the
  team's org- and repo-scoped cloud secrets; 409 workspaces_exist while any remain.
2026-11-12 06:42:04 -08:00
Neil c5683dcbd1 fix(cloud): ENTITLEMENTS-G a live subscription's grants start when Stripe says it is live, not at a period start ahead of our clock
Found by the dev shadow run: Stripe test clocks put current_period_start a month ahead, so the
grant read as not started and the resolver denied (subscription_inactive) where legacy allowed.
starts_at is now min(period start, first sync) and stays stable across syncs.
2026-11-12 04:32:11 -08:00
Neil 965febdb34 fix(cloud): ENTITLEMENTS-E Enterprise contact and Team supportUrl are https://orca.dev/enterprise (the onorca.dev contact page 404s) 2026-11-12 02:35:22 -08:00
Neil 7c82189bd8 feat(cloud): ENTITLEMENTS-E Team v2 lists the sandbox size and ready-in-seconds; plans carry an optional supportUrl
- catalog: Team v2 (same entitlements and policy as v1, so v1 subscribers see no change) adds the
  sandbox_spec and ready_in_seconds features the desktop already localizes; currentVersion 2
- catalog plans take an optional supportUrl (https: or mailto: only) and GET /v1/plans returns it
  per plan; clients fall back to the Enterprise contact
2026-11-12 02:33:14 -08:00
Neil c856b945f1 feat(cloud): ENTITLEMENTS-B2 metadata.orca_plan on Stripe prices is the catalog join key
Neil's Q1 answer: a plan id on the Stripe Price/Product maps to the repo catalog's entitlements.
seatPriceMatch reads price.metadata.orca_plan (after env ids and price history, before lookup key
and product); the catalog sync logs a lookup-key/tag mismatch; stripe-test-setup tags every price.
2026-11-12 01:44:10 -08:00
Neil 3dbb36aa21 feat(cloud): ENTITLEMENTS-B Stripe lifecycle for grants, reconciliation, GET /v1/plans and GET /v1/entitlements
- planForPrice fix: seat prices map through the configured ids, the price history (plan_prices),
  the plan's lookup key, or the plan's Stripe product; a known subscriber on an unmappable price
  still gets status/period/cancel applied, so a price change can never leave a canceled
  subscriber with access (test: lifecycle.test.ts, all modes)
- catalog prices synced from Stripe by lookup key (cron + price.*/product.* webhooks); every seat
  price a subscription is on is kept as history; Checkout sells the lookup-key holder when on and
  refuses (409 plan_unavailable) rather than guess a price
- webhook: one processStripeEvent for webhooks and replay; customer.deleted revokes; the mirror
  upsert ignores older Stripe reads
- reconcile.ts (cron): Stripe event replay from a cursor, rolling re-sync of stale subscriptions
  (404 = canceled), catalog price refresh; grant backfill after it
- GET /v1/plans (public, ETag/304, prices only from Stripe, entitlements, features, policy) and
  GET /v1/entitlements (effective values, access, grants); legacy offers built from the catalog
  when on (identical for the launch catalog, plus warnAtPercent)
- seats and overage read the price history and plan policy (seat bounds, true-down window)
2026-11-12 00:30:39 -08:00
Neil 2d0a817de8 fix(cloud): ENTITLEMENTS-A billing vitest projects inherit the collected include (test-file-runners check) 2026-11-12 00:30:35 -08:00
Neil 4ec3b71798 fix(cloud): ENTITLEMENTS-A seat bounds stay plan policy (drop the duplicate max_seats entitlement) 2026-11-11 22:14:49 -08:00
Neil ec8cfe5dac feat(cloud): ENTITLEMENTS-A plans catalog, entitlement grants and resolver in billing D1 (shadow on dev)
- migration 0008: plans, immutable plan_versions, plan_prices (Stripe mirror), entitlement_grants,
  entitlement_audit, entitlement_shadow_diffs, stripe_sync_state; subscriptions.seat_price_id
- catalog/catalog.json (catalog-as-code: Team, Enterprise, Trial; no prices) + scripts/catalog-apply.ts
- typed entitlement registry (entitlement-keys.ts) with sum/max/union/or aggregation
- grants.ts: idempotent projection of each subscription (Stripe mirror) and trial into grants,
  hold/release/revoke, out-of-order guard, terminal revocation, audit; manual/promo grants
- entitlements.ts: one builder fed by legacy terms or grant terms; ENTITLEMENTS_MODE off|shadow|on;
  shadow records every disagreement; lazy re-projection; cron backfill
- trial hours come from the catalog's trial plan when on (granted trials keep their hours)
- the whole suite runs in legacy, shadow (zero diffs enforced) and on modes
2026-11-11 22:11:18 -08:00
Neil 612269c105 fix(billing): remove the overage item on opt-out once nothing is left to invoice
Opting out left the metered overage item on the Stripe subscription, so every later
invoice carried a '0 std hour x Orca sandbox overage' $0 line (confirmed on a
throwaway test-mode subscription). The item now comes off at once when nothing was
metered this Stripe period, or at the first sync after the period rolls over when
there is usage still to invoice. Re-opting in within 24h got the removed item's id
replayed by Stripe idempotency (also confirmed live); the add now retries under a
key naming the removed item. Nothing meters while opted out or with a $0 cap.
2026-11-10 20:51:23 -08:00
Neil 077d4c8104 feat(billing): usage history, top workspaces and members, one spend cap field (JA-18)
Plan & billing now reads '<Team> · Team plan', shows the last 30 days of sandbox
hours as a bar chart, and (owners/admins) the top workspaces and members. Members
see the team chart and their own hours. The overage toggle becomes one 'Monthly
spend cap' field ($0 = off, 'Turn on with a $25 cap'); the rate is a one-line
hint; alert levels are read-only values. The manual refresh icon is gone.

Billing Worker: additive GET /v1/billing/usage (read-only over usage_events,
no migration).
2026-11-10 20:02:29 -08:00
Neil 70f0ed4217 test(billing): every billing wrangler config that names a control plane binds it as SANDBOX_CONTROL
#305 moved billing's GitHub install-url call onto a service binding because same-account Workers
can't fetch each other (Cloudflare error 1042). No prod billing config exists yet (launch runbook
step 1.2); this test fails if the new wrangler.prod.jsonc names SANDBOX_CONTROL_URL without the
binding, or binds another environment's control plane.
2026-11-10 15:19:35 -08:00
Neil ff64af20b0 fix(cloud-setup): the composer follows its setup session; billing reaches the control plane for GitHub
- The composer read the setup session with a bare readCloudSetupSession() call in render. The React
  Compiler memoizes that on the session id, so the panel kept its first (empty) read: rows never
  moved past 'In browser', the finished session never auto-started the workspace, and the GitHub
  row stayed 'Needed' after the browser said 'You're all set'. Read it through
  useCloudSetupSession (useSyncExternalStore with a per-poll cached snapshot) instead.
- Billing asked the control plane for the GitHub install URL with a plain fetch to its workers.dev
  origin. Same-account Workers can't do that (Cloudflare error 1042), so every setup GitHub step
  showed 'Orca Cloud setup is unavailable'. Bind the control plane as a service (SANDBOX_CONTROL)
  in the dev config and send the request through it when bound.

Found by the NP-4 end-to-end run (np4-e2e) on m4air against staging.
2026-11-10 14:32:37 -08:00
Neil 062c05d2fe fix(billing): grant the trial to the desktop's active team when setup starts on it
Live m4air run: a signed-in owner whose active team never had a trial was sent
to T3/Checkout. Only teams bound in the browser got the trial. Session creation
now runs the same grant (N11 limits) for the active team, so the chain skips
the plan page.
2026-11-10 08:49:41 -08:00
Neil 264ac40bcb fix(billing): e2e keeps each org's Stripe email (customer lookup), trial check uses it 2026-11-10 06:30:39 -08:00
Neil 5a877a01d7 feat(billing): setup sessions use the one-time trial (N11) through the TrialPort
A team that setup creates or picks gets the trial when it binds, with the email,
GitHub user and ip abuse keys. Teams that can't get one go through T3 and
Checkout.
2026-11-10 06:27:45 -08:00
Neil 51ace4d05f feat(billing): one-time Orca Cloud trial (N11) and its desktop surfaces (T1)
Billing Worker:
- trials + trial_claims (migration 0005): 2 sandbox hours per new team, no card, no Stripe.
- POST /v1/billing/trial grants it (idempotent, any member); grantTrial/trialOffer exported for
  the setup session. offers.trial on GET entitlements only when this caller could still claim it.
- Abuse limits: once per team, Orca user, normalized verified email, GitHub user (token claim)
  and GitHub owner (POST /v1/internal/trial/github from the binding; a reused identity revokes),
  disposable-domain blocklist, 3 grants per IP per day. Keys stored as SHA-256 hashes.
- Entitlement trial {includedSeconds, usedSeconds, remainingSeconds, exhausted}; metered from
  usage_events, concurrency 1, never overage; trial_used_up (suspendRunning) / trial_unavailable.
- Any subscription ends the trial; unused trial hours lapse.
- e2e: trial path (grant, no Stripe customer, concurrency, metering to used up, once per user,
  plan ends it) with cleanup of the run's abuse keys.

Desktop: trial_used_up / trial_unavailable classify as 'plan'; copy in billing, phone and CLI;
"Trial" badge, TrialPlanSummary in Plan & billing and the plans page strip, account menu row
"Trial · {{count}} sandbox hours left" (Choose plan for owners/admins); billingClaimTrial IPC
and claimOrcaCloudTrial() for the composer.
2026-11-10 06:20:22 -08:00
Neil 33950fa436 feat(cloud-setup): desktop side of the one-tab setup session (N1), team-first plans (O1)
- Signed out, Set up and start opens one tab. The authorize page shows the
  setup account step (A2). Once the code is exchanged, the loopback holds the tab,
  creates the billing setup session and 302s the same tab into the setup pages.
- Signed in, the session is created and its start URL is opened.
- IPC: orcaProfiles.cloudSetupStart / cloudSetupGet / cloudSetupLink (Copy setup
  link mints a fresh one-time link).
- Renderer: cloud-setup-session.ts polls the session (2 s for 3 min, then 10 s),
  keeps a snapshot for the composer and tracker, and switches the profile to the
  team setup chose.
- Plans dialog: Checkout joins the open setup session. A personal account
  (409 team_required) goes through setup instead, which makes or picks a team
  first.
- Billing: POST /v1/cloud-setup/sessions/:id/link.
2026-11-10 06:07:35 -08:00
Neil c14d5856f2 feat(billing): cloud setup sessions (N1) and team-first Checkout (N4/O1)
Setup session API on the billing Worker: the desktop creates a session after
sign-in and polls its steps (account, team, plan/trial, github); the setup pages
on Orca Cloud auth redeem a one-time browser ticket, bind the team (granting the
trial through a port np4-trial's module plugs into), open Checkout that returns
to the setup pages, and ask the control plane for the GitHub install URL. The
control plane flips the GitHub step via POST /v1/internal/cloud-setup/github.

Checkout now refuses personal accounts with 409 team_required: a user: plan
could never move to a team later.
2026-11-10 06:07:27 -08:00
Neil 21ac87b972 feat(cloud-start): setup return link, setup telemetry, X1 error model, B2 team-plans lookup (NP-4)
- N9: orca://cloud/setup/return?session=cs_… is routed (open-url + second
  instance), validated, focuses Orca and fans out to renderer listeners
  (onCloudSetupReturn) so the setup session re-reads at once.
- N10: cloud_setup_step_{started,done,failed}, cloud_setup_first_sandbox and
  cloud_setup_plan_chosen, enum-only, derived from the setup rows.
- X1: setup error kinds (timed_out, checkout_canceled, bank_step,
  trial_unavailable, team_create_failed, wrong_account) and their actions.
- B2: billing POST /v1/billing/team-plans returns other teams' plan state with
  the caller's own token; auth confirms membership from that token (no new
  credential). Desktop IPC billingTeamPlans + useSwitchToPlannedTeam. The team
  switch logic moves out of SidebarTeamSubmenu so the composer can reuse it.
2026-11-10 05:50:29 -08:00
Neil dd34314dc0 feat(billing): bill overage by the minute, put sandboxes to sleep at the cap (U22, U24)
- Overage stays $1.00 per sandbox hour (ORCA_CLOUD_OVERAGE_CENTS_PER_HOUR) and is now billed by
  the minute: a per-minute metered TEST price (unit_amount_decimal = rate / 60 to 12 decimals,
  transform_quantity divide_by 60, round up), created the same way by stripe-test-setup.ts.
  capSeconds rounds the cap down to whole minutes and spentCents mirrors the invoice, so the
  cap math matches Stripe. The meter still counts seconds.
- Opting in re-prices an overage item still on an older price (e.g. $0.75 / h) instead of adding
  a second item on the same meter, and removes any extra stale one.
- Alerts at 75%, 90% and 100% of included hours (warnAtPercent).
- New top-level entitlement.suspendRunning: payment grace expired, or at the limit (out of hours
  with overage off, or at the spend cap). The start check and usage answers carry it, so the
  control plane puts running sandboxes to sleep (snapshot kept, never deleted). Payment fields and
  /v1/internal/suspensions stay payment-only, so no data-retention clock starts at a cap.
- Copy (desktop billing panel, plan card, build sheet, phone, CLI): "billed by the minute" after
  the rate; at the limit "Running sandboxes go to sleep and new ones can't start. Nothing is
  deleted, and your files are safe."
2026-11-10 04:33:07 -08:00
Neil 01d2482a3a fix(billing): one billing store, skeleton, plurals, plans focus and billing nits (DS-34, DS-44)
DS-34:
- One billing store (billing-summary-store) replaces the summary, the hook's local state and the
  Run-on picker cache; it keeps the last good result through a failed read and still drops answers
  from before a team or account switch (DS-17).
- Skeleton while Plan & billing loads.
- '{{count}} sandbox hours left' and '{{count}} sandbox hours over the included amount this month'
  as i18n plurals; no bare 'hours'; the unreachable 100% branch is gone.
- Usage warning driven by usageWarningPercent ('Your team has used {{percent}}% of this month's
  sandbox hours.'), in Settings, the plans page and the account menu.
- capTooHigh states the maximum ('The spend cap can be at most {{max}}.'), from offers.maxSpendCapCents.
- Plans dialog focuses its heading on open, so Tab reaches the interval toggle before the cards.
- Payment notice uses InlineError; the build card's overage buttons land on the overage section.
- Account menu names the team once and adds the hours-left line.

DS-44: warning tone at 90%+, '$' as an input prefix, neutral paid check, 24px dialog close hit
area, no <p> inside the CheckoutPanel <dl>.
2026-11-10 03:39:21 -08:00
Neil 519f6f6c9b fix(billing): spell out price formats per DS-18
Line items: '{{seats}} x {{price}} per seat, billed yearly' / 'per seat per month'
(plural keys); totals '{{total}} per year' / 'per month'; Worker plan labels
'$50 per seat per month' and '$480 per seat, billed yearly'. Drops /mo, /yr,
/year and /seat/month strings.
2026-11-10 02:27:14 -08:00