Skip to content

Improved billing and usage page - #4812

Open
grutt wants to merge 1 commit into
mainfrom
feat/improved-billing-usage-page
Open

Improved billing and usage page#4812
grutt wants to merge 1 commit into
mainfrom
feat/improved-billing-usage-page

Conversation

@grutt

@grutt grutt commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an Invoices section to the organization Billing & Usage page, above Plan history.
  • Upcoming rows open an in-app usage dialog. Previous rows open Autumn's hosted invoice URL in a new tab.
  • Invoice loading is isolated so a failure there does not break plan management.

Depends on the control-plane invoices API: https://github.com/hatchet-dev/hatchet-control-plane/pull/131

Test plan

  • Invoice formatter unit tests
  • Local Billing & Usage page shows previous invoices for the seeded sdks org
  • Upcoming invoice dialog on an org with a live paid Stripe subscription
  • Previous row opens the hosted invoice in a new tab
  • Invoice query error leaves subscription UI usable

Add upcoming and previous invoice history above plan history, using Autumn-hosted invoice links for past charges.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview Aug 27, 2026 2:29pm

Request Review

@github-actions github-actions Bot added the dashboard Related to the Hatchet dashboard label Aug 27, 2026
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown

Greptile Summary

Adds invoice retrieval and presentation to the organization Billing & Usage page.

  • Displays upcoming invoice estimates in an in-app detail dialog.
  • Links previous invoices to hosted invoice pages.
  • Isolates invoice-query errors from existing subscription management.

Confidence Score: 4/5

The disabled-query loading behavior should be fixed before merging because some reachable billing-page states leave the invoice section loading forever.

The new invoice section treats TanStack Query's pending status as an active request even when its capability conditions permanently disable fetching; the row actions also remain inaccessible from the keyboard.

Files Needing Attention: frontend/app/src/pages/organizations/$organization/billing.tsx; frontend/app/src/components/v1/cloud/billing/invoices.tsx

Reviews (1): Last reviewed commit: "feat: show invoices on the billing and u..." | Re-trigger Greptile

<Invoices
invoicePreviews={invoices.data?.invoicePreviews}
invoices={invoices.data?.invoices}
isLoading={invoices.isPending}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Disabled query loads forever

When control-plane billing is disabled or the user lacks canBill, the invoice query never runs but isPending remains true, causing the Invoices section to display a loading skeleton indefinitely.

Suggested change
isLoading={invoices.isPending}
isLoading={invoices.isLoading}

Comment on lines +163 to +164
onClick={() => setSelectedPreview(preview)}
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Rows lack keyboard access

The invoice actions are attached only to onClick handlers on plain table rows, so keyboard users cannot focus or activate upcoming invoice details or hosted previous invoices.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Related to the Hatchet dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant