Skip to content

Fix Chutes quota detail rendering - #2402

Merged
steipete merged 2 commits into
steipete:mainfrom
kiranmagic7:kiran/chutes-quota-detail-20260723
Jul 28, 2026
Merged

Fix Chutes quota detail rendering#2402
steipete merged 2 commits into
steipete:mainfrom
kiranmagic7:kiran/chutes-quota-detail-20260723

Conversation

@kiranmagic7

Copy link
Copy Markdown
Contributor

Fixes #2399.

Summary

  • treat Chutes quota counts as detail instead of reset descriptions across menu cards, native menus, and CLI output
  • preserve real reset timestamps when present
  • add regression coverage for detail-with-reset and detail-without-reset paths

Root cause

Chutes stores quota counts such as 40/100 requests in RateWindow.resetDescription. The shared renderers either treated that field as reset text or dropped it when resetsAt existed.

Verification

  • swift test --skip-build --no-parallel --filter 'Chutes(Provider|Presentation)Tests' — 14 tests passed
  • make check — passed (SwiftFormat: 0 files; SwiftLint: 0 violations)
  • git diff --check — passed
  • make test — stopped on two unrelated AdaptiveRefreshTimerTests timeouts; both failures reproduce unchanged on base commit cc8da27c

Compatibility risk: low. This only changes presentation for Chutes quota windows; real reset timestamps remain rendered separately.

Review focus: please sanity-check the detail-backed provider handling across the three renderers.

Copy link
Copy Markdown
Contributor Author

The failed macOS shard is confined to untouched spend-dashboard tests, not the Chutes presentation path:

  • SpendDashboardTokenProvenanceTests recorded three missing-cost assertions across cached token account activation does not prove a forced refresh and forced successful empty publication removes prior spend without warning.
  • The exact four-suite CI group passed 25/25 on current head 2b0103be and 25/25 on untouched base cc8da27c.
  • The Chutes-focused selection remains 14/14, and this diff only changes the three Chutes presentation paths plus their regression tests.

I attempted to rerun the failed jobs, but GitHub requires repository admin rights for this workflow. Could a maintainer rerun the failed CI jobs? Failed shard: https://github.com/steipete/CodexBar/actions/runs/29970896177/job/89092522895

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Blocker update: I reproduced the shared macOS shard today, then applied only the isolated UserDefaults change already proposed in #2418. The exact four-suite selection moved from three issues to 25/25 passing without any Chutes-path change.

That confirms #2418 is the current root dependency; a separate fixture-clock patch was unnecessary and has been closed. Once #2418 lands, I will rebase this focused branch and rerun its targeted checks. No additional change to #2402 is warranted before then.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 1:38 AM ET / 05:38 UTC.

ClawSweeper review

What this changes

This PR renders Chutes quota counts as usage detail rather than reset text in the menu card, native menu, and CLI, while retaining real reset timestamps and adding presentation regressions.

Merge readiness

Blocked until real behavior proof from a real setup is added - 3 items remain

Keep this PR open for normal review. The supplied diff consistently treats Chutes quota strings as detail across the menu card, native menu, and CLI paths, and the added focused tests cover the reported combinations; however, the PR has not yet shown after-fix real behavior proof beyond automated tests.

**Likely related people**

  • steipete — low-confidence routing candidate from recent merged and branch-integration history around this area; the direct feature-history trail could not be completed in the read-only review environment.

Priority: P2
Reviewed head: 099ca0ad6faea448c680bee58f494c1948dd3957

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and regression-tested, but the required real after-fix behavior proof is still absent.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports focused tests, formatting/lint checks, and a full-suite baseline explanation, but it does not include after-fix menu or CLI runtime output; please add redacted proof, and updating the PR body should trigger a fresh review (or ask a maintainer to comment @clawsweeper re-review). After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports focused tests, formatting/lint checks, and a full-suite baseline explanation, but it does not include after-fix menu or CLI runtime output; please add redacted proof, and updating the PR body should trigger a fresh review (or ask a maintainer to comment @clawsweeper re-review). After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Cross-renderer patch scope: The PR changes the menu-card mapping, native menu descriptor mapping, and CLI detail-backed provider classification, matching the three renderer paths identified in the linked report.
Focused regression coverage: The branch adds 145 lines of Chutes presentation coverage for both quota detail with a real reset time and quota detail without one.
Canonical reported behavior: The linked issue describes the same deterministic problem: Chutes stores quota counts in resetDescription, which generic rendering either labels as a reset or suppresses when resetsAt exists.
Findings None None.
Security None None.

How this fits together

CodexBar normalizes provider usage into quota windows, then projects those windows into the macOS menu bar, native menu descriptors, and command-line cards. Chutes puts quota-count text in a shared reset-description field, so each renderer must distinguish that detail from an actual reset schedule.

flowchart LR
    A[Chutes usage response] --> B[Usage window]
    B --> C[Quota or reset classification]
    C --> D[Menu card]
    C --> E[Native menu]
    C --> F[CLI card]
    D --> G[Visible usage detail]
    E --> G
    F --> G
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports focused tests, formatting/lint checks, and a full-suite baseline explanation, but it does not include after-fix menu or CLI runtime output; please add redacted proof, and updating the PR body should trigger a fresh review (or ask a maintainer to comment @clawsweeper re-review). After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Before merge, add redacted after-fix runtime proof—such as a menu screenshot plus CLI transcript—showing a quota detail and a real reset timestamp rendered separately; unit tests and CI are supplemental proof only.
  • Complete next step (P2) - No concrete code defect was identified in the proposed patch; the remaining merge gate is contributor-supplied real behavior proof and normal check completion, not an automated repair.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Presentation surfaces 3 changed renderers The reported behavior is shared by the menu card, native menu, and CLI, so consistent handling across all three is material.
Regression coverage 1 new test file, 145 lines The new tests explicitly cover detail-with-reset and detail-without-reset behavior.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #2399
Summary: This PR is the stated candidate fix for the canonical Chutes quota-detail rendering report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow renderer classification after the contributor adds redacted runtime output proving that a Chutes quota count remains visible beside a real reset time and is not prefixed as a reset when no timestamp exists.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the narrow renderer classification after the contributor adds redacted runtime output proving that a Chutes quota count remains visible beside a real reset time and is not prefixed as a reset when no timestamp exists.

Do we have a high-confidence way to reproduce the issue?

Yes—source reproduction is high confidence: the linked report identifies existing Chutes fixtures that populate quota text in the reset-description field and deterministic renderer branches that previously classified it as reset content.

Is this the best way to solve the issue?

Yes—the branch follows the existing detail-backed-provider pattern rather than changing provider data contracts, and it applies that narrow classification at each affected presentation boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cd0bf3b3d6b0.

Labels

Label justifications:

  • P2: This is a bounded provider-specific rendering bug that can mislabel or omit quota context but does not affect availability, credentials, or stored data.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused tests, formatting/lint checks, and a full-suite baseline explanation, but it does not include after-fix menu or CLI runtime output; please add redacted proof, and updating the PR body should trigger a fresh review (or ask a maintainer to comment @clawsweeper re-review). After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • steipete: Appears in the branch’s merge-from-main commit and is the author of the current-main merge commit supplied in the review context; direct ownership of the Chutes presentation code could not be confirmed without local history access. (role: recent area contributor; confidence: low; commits: 099ca0ad6fae, cd0bf3b3d6b0; files: Sources/CodexBar/MenuCardView.swift, Sources/CodexBar/MenuDescriptor.swift, Sources/CodexBarCLI/CLIRenderer.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted menu screenshot or recording showing quota detail and a reset time together.
  • Add a redacted terminal transcript for the same Chutes card in CLI output.
  • Rebase onto current main now that test(repo-hygiene): restore macOS test baseline #2418 has merged, then let the current checks complete.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Verified the maintainer-refreshed head 099ca0ad6faea448c680bee58f494c1948dd3957: its tree is identical to the locally tested current-main rebase (tree e8f22f6d0774dd6556ea3515af0598128a7c0e66), and the effective PR diff remains the same four Chutes presentation/test files.

Verification on that tree:

  • Chutes-focused selection — 16 tests in 4 suites passed
  • ChutesPresentationTests — 3 tests passed
  • shared spend-dashboard/status regression selection — 25 tests in 4 suites passed
  • make check
  • git diff --check

Hosted lint, Linux, musl, and security checks are green; the two macOS shards are queued.

The ClawSweeper request for a real menu screenshot and CLI transcript remains open. I did not run a live Chutes account probe; repository guidance calls for fixture/stub testing unless that probe is explicitly requested.

@steipete
steipete merged commit 7e5ee43 into steipete:main Jul 28, 2026
9 checks passed
@steipete

Copy link
Copy Markdown
Owner

Merged after full verification. Chutes quota counts now render as detail text in all three renderers (menu cards, native menus, CLI) while genuine reset timestamps are preserved. Exact-head CI: all nine checks green (https://github.com/steipete/CodexBar/actions/runs/30332082695 — the two macOS shards completed green after the earlier queue delay). Review + autoreview clean. Thanks @kiranmagic7!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chutes quota counts are rendered as reset schedules or dropped

2 participants