Show all invoices in the history table, paginated#2006
Closed
GregorShear wants to merge 1 commit into
Closed
Conversation
The Recent History table was hard-capped at the 4 most recent invoices within the rolling six-month window (a slice(0, 4) placeholder). Show all of a tenant's invoices instead, paginated four per page (PRD #2). - useBillingInvoices now exposes allInvoices (the full newest-first list) alongside invoices (the windowed+manual subset the usage graphs chart). selectedInvoice resolves against the full list, so any row is clickable. - BillingHistoryTable paginates allInvoices with MUI TablePagination + the shared TablePaginationActions, resetting to the first page when the tenant changes. Rows no longer slices. The usage graphs and graph-state wrapper still read the windowed invoices, so they remain a six-month view. Fetch is capped at 100 invoices; true cursor pagination beyond that is a later step.
685358e to
57abd8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Show all of a tenant's invoices in the Recent History table, paginated, instead of just the 4 most recent (PRD #2).
Why
The table was hard-capped at
slice(0, 4)over the rolling six-month window — a placeholder. Users couldn't reach older invoices (or out-of-window finals) at all.Changes
useBillingInvoicesnow exposesallInvoices(the full newest-first list) alongsideinvoices(the windowed + manual subset the usage graphs chart).selectedInvoiceresolves against the full list, so any row — including out-of-window invoices — is selectable.BillingHistoryTablepaginatesallInvoicesfour per page using MUITablePagination+ the sharedTablePaginationActions, and resets to the first (newest) page when the tenant changes.Rowsno longer slices.GraphStateWrapperstill read the windowedinvoices, so they stay a six-month view — the table showing all history doesn't change the charts.Verification
Locally against a tenant with 5 invoices (final / preview / manual, including two out-of-window): the table paginates 4-per-page (
1–4 of 5→5–5 of 5), surfacing the Oct 2025 final and Sep 2025 manual that the old windowed view hid; first/prev/next/last work; the pager fits the fixed-height card; and the Usage by Month graph is unchanged (Apr/May/Jun only). No console errors.Note: the fetch is capped at 100 invoices; true cursor pagination beyond that is a later step.
Stacked on
greg/billing-invoices-gql(#2004) — independent of the receipts PR (#2005).