Skip to content

Add Claude Design and Routines usage bars#740

Merged
ratulsarna merged 7 commits intosteipete:mainfrom
AISupplyGuy:feature/claude-design-routines-usage-bars
Apr 22, 2026
Merged

Add Claude Design and Routines usage bars#740
ratulsarna merged 7 commits intosteipete:mainfrom
AISupplyGuy:feature/claude-design-routines-usage-bars

Conversation

@AISupplyGuy
Copy link
Copy Markdown
Contributor

Summary

  • add support for Claude Design and Claude Routines extra usage windows in Claude snapshots
  • parse additional live Claude API keys (seven_day_omelette, seven_day_cowork) and keep bars visible when those keys are present but null
  • restore Sonnet bar parsing in web mode via seven_day_sonnet
  • render extra Claude usage windows in the menu card
  • add tests for OAuth/Web parsing and menu metric rendering

Notes

  • this PR intentionally contains only the Claude usage bar feature files
  • unrelated local script/build workaround changes are not included

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ae7409106

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthUsageFetcher.swift Outdated
Comment thread Sources/CodexBarCore/Providers/Claude/ClaudeWeb/ClaudeWebAPIFetcher.swift Outdated
@AISupplyGuy
Copy link
Copy Markdown
Contributor Author

Update pushed to this PR:\n- renamed Claude extra bars to Designs and Daily Routines\n- improved OpenAI cookie import error handling for Safari privacy-denied cases\n- added manual-cookie fallback when auto browser import is blocked\n\nNo unrelated build-script/workaround files were included in this update.

@AISupplyGuy
Copy link
Copy Markdown
Contributor Author

Status update

Branch state

  • feature/claude-design-routines-usage-bars @ d6fa1fe4 — up to date with fork origin.
  • PR scope: 10 files, 2 commits (4ae74091 Claude Design/Routines bars; d6fa1fe4 label polish + OpenAI cookie error).
  • No unintended files staged. Local-only build tweaks (packaging script + @Entry macro workaround) kept out of the PR.

Local verification

  • swift build --target CodexBarclean build, no warnings in the modified files.
  • swift test — can't run locally (env uses macOS Command Line Tools; Swift Testing framework requires full Xcode). CI has not yet been triggered on this fork PR; awaiting maintainer approval for workflow run.
  • Only check reporting so far: GitGuardian — pass.

Coverage review
Added three OAuth test cases (seven_day_design/routines, omelette/cowork aliases, null cowork = 0%), three Web API test cases (same three scenarios) plus Sonnet usage path restoration, and one MenuCard integration test confirming both "Designs" and "Daily Routines" bars render. The null-payload path is exercised in both fetchers.

Behavior confirmed in the installed app (~/Applications/CodexBar.app)

  • Claude card renders Designs + Daily Routines bars against live seven_day_omelette / seven_day_cowork keys.
  • Routines bar stays visible at 0% when key is present with null payload.
  • Sonnet weekly usage parsing restored in Web mode via seven_day_sonnet.
  • OpenAI cookie import falls back cleanly from auto→manual on Safari privacy denial with a concise user-facing message.

Remaining

  • None on our end. Ready for CI run + review.

@ratulsarna
Copy link
Copy Markdown
Collaborator

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6fa1fe473

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthUsageFetcher.swift Outdated
Per Codex review on PR #1: decodeWindowWithSource returned on the first
matching key in the payload even when its value was null, so a response
with seven_day_design: null followed by seven_day_omelette: {...} picked
the null alias and rendered a 0% bar. Scan all aliases, prefer a populated
one, and fall back to the first null-valued key only to keep the bar
visible when the API returns a known key with null payload.
@AISupplyGuy AISupplyGuy force-pushed the feature/claude-design-routines-usage-bars branch from f9dc21b to bb10d4f Compare April 20, 2026 03:37
@ratulsarna
Copy link
Copy Markdown
Collaborator

ratulsarna commented Apr 22, 2026

Dropped the unrelated OpenAI cookie import/access-denied changes from this branch. Sources/CodexBar/UsageStore+OpenAIWeb.swift now matches main, so the PR diff is back to the Claude usage-bar work plus the lint cleanup.

Please raise a separate PR for that fix. Thanks @AISupplyGuy !

@AISupplyGuy
Copy link
Copy Markdown
Contributor Author

On it. Thanks @ratulsarna

@ratulsarna ratulsarna merged commit 06e732e into steipete:main Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants