Hide Daily Routines bar when the routines payload is null - #2450
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 11:54 PM ET / July 28, 2026, 03:54 UTC. ClawSweeper reviewWhat this changesThe PR changes Claude OAuth and web usage parsing so a present-but-null Daily Routines payload produces no quota row, and updates focused regression tests for both sources. Merge readiness✅ Ready for maintainer review Keep this PR open for normal maintainer review. The focused parser change removes a synthetic 0% Claude quota only when the upstream routines payload is null, retains real routines windows, adds regression coverage for both OAuth and web inputs, and is supported by live after-fix screenshots. Priority: P2 Review scores
Verification
How this fits togetherCodexBar converts Claude OAuth and web usage payloads into normalized rate-limit windows, then presents those windows as metrics in the menu-bar usage card. This PR changes the null-payload decision before the card model is rendered. flowchart LR
A[Claude OAuth payload] --> C[Usage window parsing]
B[Claude web payload] --> C
C --> D{Usable routines window?}
D -->|Yes| E[Extra rate window]
D -->|Null or absent| F[No routines row]
E --> G[Usage card metrics]
F --> G
G --> H[Menu bar card]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Merge the narrow null-as-absent behavior after maintainer review, keeping Daily Routines visible only when Claude supplies an actual routines window with utilization data. Do we have a high-confidence way to reproduce the issue? Yes. A Claude OAuth or web usage payload with a routines alias present as null reaches the changed fallback path; the supplied live account screenshots also show the after-fix card with that row omitted. Is this the best way to solve the issue? Yes. Treating a null payload as absent is the narrowest maintainable fix because the prior 0% row represented no real quota, while valid routines windows still pass through unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0b2b011ef791. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review Body now includes a runtime capture: the Claude card on an account whose payload returns |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The two prior runs ( |
6a3c7ef to
944ebdd
Compare
The Claude OAuth and web usage parsers synthesized a placeholder 0% "Daily Routines" window whenever a routines key (seven_day_cowork, seven_day_routines, ...) was present with a null payload. claude.ai renders from the limits array and shows no routines bar in that case. Treat present-but-null keys as absent so the row only appears with real utilization data.
944ebdd to
c895835
Compare
|
@clawsweeper re-review + status? |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Maintainer verification complete on exact head I reread the full diff and the adjacent OAuth/web parser paths, including the null-payload regressions and the existing populated-alias coverage. AutoReview found no blocking defect. Full hosted CI passed across lint, Linux x64/arm64, Linux musl, both macOS test shards, and the aggregate gate: CI run 30327078930. Merged as |
|
Let's go 🥳 |
Summary
nullas absent instead of synthesizing a 0% placeholder windowWhy
Accounts without routines data receive
nullfor these aliases, so the placeholder rendered a permanent phantom "Daily Routines 0% used" row matching no quota. claude.ai renders fromlimits, which carries no routines lane, and shows no bar. Nothing is lost: the removed row was hardcoded to 0%. Accounts with a real routines window are unchanged.Refs #2353, though this adds no toggle.
Validation
make check— 0 violations across 1,581 filesswift test --filter 'ClaudeOAuthTests|ClaudeWebUsageExtraWindowTests|ClaudeExtraWindowQuotaWarningTests|MenuCardModelTests'— 127 tests passedmake test— 60 of 61 groups passed;SpendDashboardTokenProvenanceTestsfailures are pre-existingseven_day_cowork: null: the card fetches successfully and renders Session, Weekly and Fable only, with no Daily Routines rowThe inverse case (a real routines payload still rendering) is covered by the regression tests rather than a capture: this account returns
null, so there is no local way to produce one.