Port upstream 0.64.0: Usage & Spend provider grouping, consolidated chart selector, clear selected day - #705
Draft
Finesssee wants to merge 1 commit into
Conversation
…date chart selector, clear selected day
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Found by the 0.60.4-0.69.0 port gap audit (gap G9, audit-0.64.0).
Summary
Settings -> Usage & Spend now groups model history by provider, folds the daily and hourly charts behind one compact selector, and adds a control that clears the selected day.
~when some models are unpriced). Each group shows six models, with Show all / Show less, and a "Partial model breakdown" note when local history is incomplete.contract.dailypoints. The Hour view is the existing heatmap. With only one view available the selector is hidden.Upstream reference
212c8d63a(feat(spend): group usage details by provider steipete/CodexBar#3353). Tag-pinned v0.64.0 files read:Sources/CodexBar/SpendDashboardProviderBreakdown.swift(spendDashboardProviderBreakdownsordering,spendProviderModelDisplayLimit = 6, per-provider model rows, partial model warning),SpendDashboardSummary.swift(selected-day chip and clear button),PreferencesSpendDashboardPane.swift(SpendDashboardTrendSectiondaily/hourly picker),SpendDashboardModel.swift(incompleteModelProviders).Ported / Deferred
Ported: provider grouping and ordering rule, six-model collapse, partial-model-history label, single Day/Hour selector, selected-day chip and clear control.
Deferred, because the Windows data model does not carry it and inventing fields is out of bounds:
contract.providerId, Codex, merged with OpenCodex imports), so only that provider gets a group. Other providers stay in the existing provider table. The grouping helper takes the contract, so more groups appear when the backend supplies them.contract.daily). Models, projects and hourly activity stay on the full range because the contract has no per-day breakdown of them. The panel says so when a day is selected.incompleteModelProvidersper-provider set (Windows useshistoryCoverageEstablishedfor the single contract).Unchanged: incomplete-history labels, calendar/reporting day, privacy redaction, share card and JSON export, provider table.
Validation
pnpm --dir apps/desktop-tauri exec vitest run(full): 69 files, 413 tests passed, including 11 new tests (usageSpendBreakdown.test.ts,UsageSpendBreakdownPanels.test.tsx).pnpm --dir apps/desktop-tauri run lint: no findings in the touched files (pre-existing warnings elsewhere).pnpm --dir apps/desktop-tauri run build: passed.cargo +1.98.0 fmt --all: clean.cargo +1.98.0 test -p codexbar locale: 16 passed (new locale keys are in the enum,en-US.ftl, andkeys.ts).cargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passed (workspace, both crates)Affected areas
UI proof
Pending: coordinator will capture CUA proof on a fresh build (
CODEXBAR_PROOF_MODE=settings:usageSpendwith a seeded spend file).