Repository navigation
Conversation
|
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 |
Thermo-nuclear reviewScope: PR #664 head de4c824 against the Findings
Noted, left as is
|
Thermo-nuclear review: fixes landedReviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude. Head: bb53fec. Fixed:
Left, and why:
Commands run: |
CUA proofBuild commit: Proof-only patch (throwaway, not committed): root Setup: isolated profile with
Limits: Screenshots (local, not committed), in
|
UI proof (browser-use)Combined build of
Every surface also passed the privacy check (no email-like text, account e-mail nodes or profile paths in the DOM) and theme Validation at |
…vity and Claude workspace spend Resolved onto the release display-detail and LiteLLM flows: - One section mechanism: nesszer#664's parallel ProviderDisplayDetail `section` (field, builder, getter, bridge key, TS field, displaySectionHeading, .provider-usage-subheading) duplicated release's `section_title` / `sectionTitle` grouping. Model activity and workspace spend now use with_section_title(); MenuCardDetails/UsageSection keep the release grouped render; the nesszer#664 heading tests check groupProviderDisplayDetails and the release role=heading markup; the CLI prints and emits `sectionTitle` once per group (Aixy groups included). - LiteLLM: kept the release typed key -> user/team budget flow plus the nesszer#630 spend-report fallback. The opt-in threads into fetch_key_usage; model activity is requested only for a user-bound key after the budgets succeed (upstream 0.67.0), never on the team path or the spend-report fallback, and its failure never fails the budgets. nesszer#664's Value-based key/info helpers and their tests are superseded by info.rs/tests.rs. - FetchContext literals added since the fork (serve dashboard, CLI fetch_context tests) carry optional_details_enabled: false. - Kept both sides of the locale/keys lists, the shell fetch-context OpenCode Go rule, and the gateway section next to OptionalDetailsSection.
Summary
Ports upstream CodexBar 0.67.0 items 12 and 13 as one opt-in feature, off by default:
A single per-provider setting (
ProviderConfig.optional_details_enabled, LiteLLM and Claude only) is exposed as one checkbox in Settings > Providers and carried to fetchers throughFetchContext.optional_details_enabled. Rows use the existingProviderDisplayDetaillist, which gained an optional boundedsectionso the UI can print a heading per group (Settings usage pane and tray card).Upstream reference
steipete/CodexBar release 0.67.0 (read from cached release-tag sources only):
litellm.tsplugin,LiteLLMModelUsageTests,ClaudeAdminAPIUsageFetcher,ClaudeAdminAPIUsageSnapshot,ClaudeAdminAPIUsageTests.Ported / Deferred
Ported:
GET {base}/user/daily/activity(up to 3 pages, 2 s per request, Bearer auth, exact 200), strict validation (safe integers, date window, row and model bounds, 2^53-1 sums, repeated-page detection), any failure yields no rows (debug log reason only, never a body). Only attached when the key/info root reports auser_id.group_by[]=workspace_idappended to the existing cost request (no extra request), blank workspace ids grouped as "Default", cents summed per workspace, top 20 by spend then name.Deferred / deviations:
LITELLM_MODEL_USAGE_ENABLED,ANTHROPIC_ADMIN_WORKSPACE_SPEND) are not ported; the setting is the only switch.usageandservedo not load per-provider settings, so the opt-in stays off there.diagnose, hooks and the desktop shell honour it.localeCompare.MenuCardDetails.tsxrenders the displayDetails block twice, so tray card headings and rows show twice. Not changed here; flagged for a follow-up.commands::tests::bootstrap_payload_exposes_every_provider_variant(catalog 79 vs 78).Validation
Rust (E-cores,
+1.98.0,--test-threads=4):cargo fmt --all: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test -p codexbar: 2190 passed, 0 failed, 1 ignored (38 in the focused litellm / admin_api / optional_details / display_detail / sectioned filters)cargo test -p codexbar-desktop-tauri: 463 passed, 1 failed (the pre-existing failure above)Frontend (
apps/desktop-tauri, pnpm):pnpm exec vitest run: 69 files, 408 tests passedpnpm run lint: no errors (existing warnings only)pnpm run build:check-localeOK (884 keys match Rust and TS),tsc --noEmitandvite buildsucceedAffected areas
rust/src/providers/litellm/(model_activity.rsnew),rust/src/providers/claude/admin_api.rsrust/src/core/display_detail.rs,provider.rs(FetchContext),rust/src/settings/(optional_details.rsnew)set_provider_optional_details, provider detail DTO, bridgesection)OptionalDetailsSection),UsageSection,MenuCardDetails, en-US locale keysUI proof
Pending: coordinator will capture CUA proof on a fresh build.