- #600
- #590
- #589
- #588 👈 (View in Graphite)
main
This stack of pull requests is managed by Graphite. Learn more about stacking.
Adds the dashboard-side data layer for the new billing experience. All 5 procedures are thin proxies over the hermes billing endpoints shipped in hermes PR #9975 + #9992 — no mock layer is shipped: this PR adds the procedures with real Apollo calls from day one.
Procedures (all org-scoped, no writes):
getSubscription → GET /api/v3.1/billing/subscriptiongetPaymentMethod → GET /api/v3.1/billing/payment_method (unwraps { payment_method })getRecentInvoices → GET /api/v3.1/billing/invoices?limit=NgetUsageSummary → POST /api/v3.1/billing/usage/summary (defaults to last 30d server-side)getCurrentSpend → composes subscription + usage inputs and computes spend locally via _pricing.estimateSpend (no extra Apollo round-trip; reuses already-cached queries on the client)Supporting modules:
_schemas.ts — Zod schemas for procedure inputs + the locally-shaped EstimatedSpend response_pricing.ts — plan rate cards + overage math (PLAN_RATES, estimateSpend, centsToDollarString)History note: the PR was originally built with an in-memory _mock.ts
fixture and a follow-up #600 swapped it to real Hermes. Per review
feedback we collapsed #600 into this PR so reviewers see the procedures
in their final shape directly — no mocks-then-delete dance. The earlier
commits in this branch still build with the mocks, then the final
commit deletes them and wires Hermes.
Reviewable independently — no UI changes in this PR. Subsequent PRs in the stack add the legacy plan-picker restructure (#589) and the new dashboard UI (#590).
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
mainThis stack of pull requests is managed by Graphite. Learn more about stacking.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| dashboard | Preview, Comment | May 19, 2026 4:35am |