Port upstream CodexBar 0.52.0 - #345
Conversation
|
Thermo-nuclear review: BLOCKING. PR #345 introduces UsageSpendModelRow, extend_model_rows(), model sorting logic, ModelsPanel, and ProjectsPanel (~200 lines of backend + frontend model aggregation). PR #346 then deletes every line of that and replaces it with SpendContract + ContractModelsPanel + SpendContractOverview + ActivityHeatmap + MetricCard. This is stacked churn. If you merge #345 first, you ship a structure you immediately throw away in #346. The two PRs should be collapsed: either squash #345 into #346 (the SpendContract is the real design), or #345 should introduce SpendContract from the start instead of the throwaway UsageSpendModelRow intermediate. Action: Collapse #345 and #346 into a single PR that introduces SpendContract directly. |
|
Closing per thermo-nuclear review: the 0.52 intermediate UsageSpendModelRow/ModelsPanel structure is intentionally removed by the canonical SpendContract design in the next stack layer. PR #346 will be retargeted to port/upstream-0.51-review so 0.52+0.53 land as one coherent spend architecture without stacked throwaway churn. |
Port of upstream steipete/CodexBar v0.52.0 (stacked on #344; read-only consumption of tagged sources, zero upstream contact per docs/PORTING.md).
Ported
usage_spend.rs:UsageSpendModelRowstruct +extend_model_rows()joins 7d/30d model-level cost breakdowns into the spend summary.UsageSpendTab.tsx:ModelsPanelrenders per-model rows with show-all/show-less toggle.ProjectsPanelrenders ranked Codex projects with expandable session lists.UsageSpendTab.tsx:ProjectsPanelwithexpandedProjectsSet state, per-project expand/collapse showing sessions filtered byprojectId. Show-all/show-less for >8 projects.UsageSpendModels,UsageSpendProjects,UsageSpendShowAll,UsageSpendShowLess,UsageSpendConversations,UsageSpendPartialHistory,UsageSpendNoModels,UsageSpendNoProjectsadded tokeys.ts,locale.rs, anden-US.ftl.grok/mod.rs:fetch_cli_subscription_tier()callscli-chat-proxy.grok.com/v1/settingswith 2s timeout,grok_plan_display_name()normalizessubscription_tier_displayto "SuperGrok Heavy"/"SuperGrok". Browser path falls back to local credentials for identity enrichment only.Skipped (no Windows counterpart — macOS-only)
Deferred (evidence)
Verification
cargo fmt --all— cleancargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings— cleancargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings— cleancargo test --manifest-path rust/Cargo.toml --lib— passedcargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml— passedpnpm --dir apps/desktop-tauri test— passedpnpm --dir apps/desktop-tauri run build— passedscripts/local-check.ps1— not run: known StrictMode bug in the script causes terminating errors on undefined variables. Documented as gate limitation.Thermo-nuclear review
A thermo-nuclear code-quality review was performed. Blocking: this PR introduces
UsageSpendModelRow/extend_model_rows/ModelsPanelwhich PR #346 immediately deletes and replaces withSpendContract. These PRs should be collapsed. See review comment: #345 (comment)