Repository navigation
Reopen closed pane, Usage provider filter, custom model prices (#1531) - #1538
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b96e0c2133
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function unmetered(cell) { | ||
| if (!cell || typeof cell !== "object" || Number(cell.costUsd) > 0) return false; |
There was a problem hiding this comment.
Track metered and unmetered usage separately
When the same provider/model/day contains both a turn with reported cost and a turn without it, recordUsage has already aggregated both turns into one cell, so the positive aggregate costUsd makes unmetered reject the entire cell. The custom price is therefore never applied to the unmetered turn's tokens, undercounting usage for providers that report cost inconsistently or across a CLI upgrade. Preserve the unmetered token portion during aggregation rather than using the aggregate cost as the reported-cost signal.
Useful? React with 👍 / 👎.
Keeps an in-memory stack of the last 10 closed panes, scoped per thread, fed from the one place every close goes through (applyLayout). Mod+Shift+T and a command palette action reopen the newest one not already open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
"All providers" plus every provider in the loaded report. Narrowing the report before summarizing filters totals, chart, provider rows and every breakdown. Thread rows match on the thread's recorded provider. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Solenta has no built-in price table: every cost is what the provider CLI reported. Settings > Spending gets a per-model USD-per-million editor (input, output, optional cache read/write; non-negative; × clears a row). usage:byDay prices only cells that carry tokens and no reported cost, at read time, so the ledger stays raw and a price edit re-prices history. A provider's own cost (Claude's total_cost_usd) is never replaced, and budget caps still count reported spend only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
b96e0c2 to
08c15e0
Compare
Part of #1531 (the Misc item).
total_cost_usd, are never overridden. Prices apply when the report is read, so editing a price re-prices past usage too.There is one commit per part. Tests are in
test/paneLayout.test.ts,test/usageView.test.tsx,test/settingsModal.test.tsxandelectron/test/model-prices.test.js.Note: this PR and the merge-niceties PR both add a setting on the same lines of
electron/test/budget-spend.test.js, so whichever lands second needs a small rebase.🤖 Generated with Claude Code