Repository navigation
DEV-423: Cloud usage chart and session history from the new endpoints - #4
Merged
xkickflip merged 4 commits intoNov 8, 2026
Conversation
The ledger endpoint is gone; history now reads cloud sessions, a page at a time, instead of loading the whole range. - Columns: started, status, credits (held while open), upstream USD for superusers; a row opens to every field the API sent - "Show 50 more" fetches the next page; the footer comes from the first page's summary - Sessions that charged nothing are hidden, with a toggle when there are any - Export downloads the server's CSV for the range and filter - Days are the browser's time zone's days
The usage chart read /chat/ledger, which is gone, and the credits rows read quota fields the API no longer sends (requests and token counts), so the billing credits section would throw. - Usage chart: GET /chat/usage fetched once for 90 days in the browser's time zone; 7/30/90 and Credits/Sessions (plus upstream USD for superusers) re-slice it without another request - ActivityChart also takes server-binned days and a value format, and labels its axis for any number of days; the access-log chart is unchanged apart from label spacing - Credits rows (usage page and billing settings): no requests or token counts; show credits or percent left and open sessions instead - Usage page renders its rows together once status, usage and models are in, instead of filling in row by row - In-page links to Session History and billing use next/link, so they no longer reload the whole app - Drop the model list's lock icons: every row showed the same state - Remove fetchLedger and LedgerEntry
run-local still pointed at the Python API on localhost:8888, which doesn't have the new endpoints. - run-local uses http://127.0.0.1:55321/functions/v1/api, what slp-api's make supabase-dev serves - README: how to start the local API and its seeded accounts
- Show empty sessions with a "Show empty" switch instead of a checkbox - Only show the spinner and dim the table when a load takes over 300ms - Keep Export CSV enabled while a new range loads - Fix the column widths so they don't shift between ranges
xkickflip
deleted the
chris-dev-423-review-temp-tokens-ledger-tracking-cloud-usage-reporting
branch
November 8, 2026 19:52
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.
GET /chat/sessions, with a "Show empty" switch and server CSV exportGET /chat/usage(7/30/90 days, credits/sessions)make run-localpoints at the local Supabase APIDeploy after smartloop-ai/slp-api#167.