Skip to content

Hide Daily Routines bar when the routines payload is null - #2450

Merged
steipete merged 1 commit into
steipete:mainfrom
urda-forks:urda/claude-null-routines
Jul 28, 2026
Merged

Hide Daily Routines bar when the routines payload is null#2450
steipete merged 1 commit into
steipete:mainfrom
urda-forks:urda/claude-null-routines

Conversation

@urda

@urda urda commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • treat a routines key that is present but null as absent instead of synthesizing a 0% placeholder window
  • update the two regression tests to assert the window is omitted

Why

Accounts without routines data receive null for these aliases, so the placeholder rendered a permanent phantom "Daily Routines 0% used" row matching no quota. claude.ai renders from limits, 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 files
  • swift test --filter 'ClaudeOAuthTests|ClaudeWebUsageExtraWindowTests|ClaudeExtraWindowQuotaWarningTests|MenuCardModelTests' — 127 tests passed
  • make test — 60 of 61 groups passed; SpendDashboardTokenProvenanceTests failures are pre-existing
  • local debug build on a live account whose payload returns seven_day_cowork: null: the card fetches successfully and renders Session, Weekly and Fable only, with no Daily Routines row
Claude usage card with no Daily Routines row Claude usage card with no Daily Routines row (menu)

The 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 11:54 PM ET / July 28, 2026, 03:54 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: c8958358cabd024beefa1df46efa2061f3b0a887

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, coherent fix with matching source-level regression tests and direct live UI proof is ready for ordinary maintainer review.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The PR body contains after-fix screenshots from a live null-routines account that directly show the missing phantom row; the sensitive provider data is not exposed in the supplied evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body contains after-fix screenshots from a live null-routines account that directly show the missing phantom row; the sensitive provider data is not exposed in the supplied evidence.
Evidence reviewed 4 items Focused parser behavior: The PR removes both OAuth and web-parser fallbacks that manufactured a 0% Daily Routines window from a known key with a null payload; both paths now emit a routines row only when a real window has usable utilization data.
Regression coverage: The branch updates the OAuth and web parsing tests to assert that a null cowork/routines payload omits the claude-routines window, preserving the intended behavior at both input boundaries.
Real behavior proof: The PR body supplies two after-fix screenshots from a live account whose routines payload is null; the card shows Session, Weekly, and Fable with no Daily Routines row. The supplied timeline also records the proof as sufficient.
Findings None None.
Security None None.

How this fits together

CodexBar 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]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 5 files affected; 19 additions, 57 deletions The patch is limited to two Claude parsing paths and their focused regression tests, with no configuration or persistence changes.
Input coverage 2 parser sources covered OAuth and Claude web payloads receive matching null-window assertions, reducing source-specific rendering drift.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This fixes a bounded but user-visible Claude usage-card defect: accounts with null routines data see a phantom quota row.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body contains after-fix screenshots from a live null-routines account that directly show the missing phantom row; the sensitive provider data is not exposed in the supplied evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains after-fix screenshots from a live null-routines account that directly show the missing phantom row; the sensitive provider data is not exposed in the supplied evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body contains after-fix screenshots from a live null-routines account that directly show the missing phantom row; the sensitive provider data is not exposed in the supplied evidence.

Evidence

What I checked:

  • Focused parser behavior: The PR removes both OAuth and web-parser fallbacks that manufactured a 0% Daily Routines window from a known key with a null payload; both paths now emit a routines row only when a real window has usable utilization data. (Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift:1127, c8958358cabd)
  • Regression coverage: The branch updates the OAuth and web parsing tests to assert that a null cowork/routines payload omits the claude-routines window, preserving the intended behavior at both input boundaries. (Tests/CodexBarTests/ClaudeOAuthTests.swift:214, c8958358cabd)
  • Real behavior proof: The PR body supplies two after-fix screenshots from a live account whose routines payload is null; the card shows Session, Weekly, and Fable with no Daily Routines row. The supplied timeline also records the proof as sufficient. (c8958358cabd)
  • Repository policy application: The repository policy favors focused parser tests over live-provider probes when source behavior can be covered without Keychain or account prompts; this PR includes focused parser tests and separately provides redacted live UI proof. (AGENTS.md:1, 0b2b011ef791)

Likely related people:

  • steipete: Repository ownership is the only concrete routing signal available in the supplied review context; the restricted read-only shell prevented a local blame and log provenance pass for the Claude parser files. (role: likely follow-up owner; confidence: low; files: Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthUsageFetcher.swift, Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift, Sources/CodexBarCore/Providers/Claude/ClaudeWeb/ClaudeWebExtraRateWindowParser.swift)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-07-25T09:48:49.459Z sha 6a3c7ef :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-25T23:43:36.876Z sha 6a3c7ef :: needs maintainer review before merge. :: none

@urda

urda commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Body now includes a runtime capture: the Claude card on an account whose payload returns seven_day_cowork: null, fetching successfully with no Daily Routines row.

@clawsweeper

clawsweeper Bot commented Jul 25, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@urda

urda commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The two prior runs (30176252501, 30177607322) both completed without publishing a verdict, so the durable comment still shows the 09:48 UTC review. The PR body has carried the requested runtime capture since 22:41 UTC.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 25, 2026
@urda
urda force-pushed the urda/claude-null-routines branch from 6a3c7ef to 944ebdd Compare July 28, 2026 03:48
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.
@urda
urda force-pushed the urda/claude-null-routines branch from 944ebdd to c895835 Compare July 28, 2026 03:51
@urda

urda commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review + status?

@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

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

Copy link
Copy Markdown
Owner

Maintainer verification complete on exact head c8958358cabd024beefa1df46efa2061f3b0a887.

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 cae98731410431479f093a9570ab0aeb155e3162. Thanks for the focused fix, @urda!

@urda

urda commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Let's go 🥳

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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants