Skip to content

Conversation

@sean-brydon
Copy link
Member

@sean-brydon sean-brydon commented Jan 22, 2026

What does this PR do?

CleanShot 2026-01-22 at 10 21 47

How should this be tested?

Enable stripe - create a team/org - pay invoice - goto stripe dashboard - advance invoice by X months ensure all invoices are loaded

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by cubic

Adds an invoice list to Team and Org Billing pages with date range filtering, cursor pagination, status badges, and links to hosted invoices/PDF downloads. Implements a new TRPC endpoint and Stripe service method to fetch invoices per subscription.

  • New Features

    • InvoicesTable on Billing page for teams and orgs.
    • Date range filter with quick ranges; pagination with prev/next.
    • Hosted invoice links, PDF download, status badges, currency formatting.
    • Loading skeleton and added i18n strings.
  • API

    • Added viewer.teams.listInvoices (teamId, limit, cursor, startDate, endDate) returning invoices, hasMore, nextCursor.
    • Enforces manageBilling permissions (team/org) with ADMIN/OWNER fallbacks.
    • Extended IBillingProviderService with listInvoices; Stripe implementation filters by customer/subscription and date, using starting_after for pagination.

Written for commit 5f319e7. Summary will update on new commits.

@graphite-app graphite-app bot added consumer core area: core, team members only labels Jan 22, 2026
@graphite-app graphite-app bot requested a review from a team January 22, 2026 10:22
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 9 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/modules/settings/billing/components/InvoicesTable.tsx">

<violation number="1" location="apps/web/modules/settings/billing/components/InvoicesTable.tsx:41">
P2: Localize the filter column title instead of hardcoding "Date" to keep UI text translatable.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


const createdAtColumn: Extract<FilterableColumn, { type: Extract<FilterType, "dr"> }> = {
id: "createdAt",
title: "Date",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 22, 2026

Choose a reason for hiding this comment

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

P2: Localize the filter column title instead of hardcoding "Date" to keep UI text translatable.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/settings/billing/components/InvoicesTable.tsx, line 41:

<comment>Localize the filter column title instead of hardcoding "Date" to keep UI text translatable.</comment>

<file context>
@@ -0,0 +1,236 @@
+
+const createdAtColumn: Extract<FilterableColumn, { type: Extract<FilterType, "dr"> }> = {
+  id: "createdAt",
+  title: "Date",
+  type: ColumnFilterType.DATE_RANGE,
+};
</file context>
Fix with Cubic

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

@devin-ai-integration
Copy link
Contributor

Reviewed the Cubic AI feedback for this PR. The reported issue regarding localizing the "Date" filter column title has a confidence score of 8/10, which is below the 9/10 threshold for automated fixes.

Issue skipped: Localize the filter column title instead of hardcoding "Date" (confidence: 8/10)

No changes were made as part of this review since the confidence threshold was not met. If this issue should still be addressed, please let me know and I can implement the fix.

@github-actions
Copy link
Contributor

Devin AI is resolving merge conflicts

This PR has merge conflicts with the main branch. A Devin session has been created to automatically resolve them.

View Devin Session

Devin will:

  1. Merge the latest main into this branch
  2. Resolve any conflicts intelligently
  3. Run lint/type checks to ensure validity
  4. Push the resolved changes

If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself.

Resolved merge conflicts in:
- packages/features/ee/billing/service/billingProvider/IBillingProviderService.ts
- packages/features/ee/billing/service/billingProvider/StripeBillingService.ts

Both conflicts were simple cases where both branches made the same change
(adding 'type' keyword to imports). Kept the consistent import style.

Co-Authored-By: unknown <>
Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Working well! can you clean up common.json ? then i'll approve this.

Comment on lines 4462 to 4467
"last_7_days": "Last 7 days",
"last_30_days": "Last 30 days",
"last_3_months": "Last 3 months",
"last_6_months": "Last 6 months",
"last_12_months": "Last 12 months",
"custom_range": "Custom range",
Copy link
Contributor

Choose a reason for hiding this comment

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

i think they're not used in this PR

) : (
<>
<div className="overflow-x-auto">
<Table>
Copy link
Contributor

@eunjae-lee eunjae-lee Jan 26, 2026

Choose a reason for hiding this comment

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

not blocking but, any reason why use use <Table> (not <DataTable> or <DataTableWrapper>) while you're using it along with DataTableProvider?

(fyi, if you want, Devin could probably do it well with packages/features/data-table/GUIDE.md)

@sean-brydon sean-brydon enabled auto-merge (squash) February 2, 2026 10:04
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

E2E results are ready!

@sean-brydon sean-brydon merged commit 4f0a1d0 into main Feb 2, 2026
49 checks passed
@sean-brydon sean-brydon deleted the feat/stripe-invoices branch February 2, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants