Add "Used / Left" display framing toggle + Claude Desktop cookie scrape#36
Conversation
Script was installed in the LaunchAgent plist but never merged to main, so it went missing after switching branches. Cherry-picked from f7f4a88. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… team ID Xcode cleanup: drop UIRequiresFullScreen (allows slide-over/split view), remove the processing background mode no longer needed, strip hardcoded DEVELOPMENT_TEAM so signing is driven by local credentials. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b11add796
ℹ️ 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".
| from Crypto.Cipher import AES | ||
| from Crypto.Protocol.KDF import PBKDF2 |
There was a problem hiding this comment.
Declare Crypto dependency for desktop scrape script
This new script imports Crypto at module load, but the project install path (pip install -r requirements.txt, used by install.sh) does not add a package that provides that module. On a normal fresh setup, invoking this script exits immediately with ModuleNotFoundError: No module named 'Crypto', so the new Claude Desktop scrape path cannot run at all.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a45543d — added pycryptodome>=3.0 to requirements.txt.
| f"claude-desktop scrape failed; falling back to {fallback.name}", | ||
| file=sys.stderr, | ||
| ) | ||
| proc = subprocess.run([sys.executable, str(fallback)], check=False) |
There was a problem hiding this comment.
Forward command to Firefox fallback
The fallback call always runs the Firefox script with no arguments, which defaults to scrape. If a user runs claude-plan-usage-desktop.py print and the desktop path fails (for example missing keychain access), the fallback unexpectedly performs a write instead of remaining print-only, violating this command's documented no-write behavior and potentially overwriting cached usage data during diagnostics.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a45543d — try_fallback() now accepts and forwards the command arg, so print stays read-only through the fallback path.
…llback - requirements.txt: add pycryptodome>=3.0 so fresh installs can import Crypto - try_fallback(): accept and forward the command arg so `print` mode stays read-only even when falling through to the Firefox script Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
% usedconsistent with the main app and claude.aiscripts/claude-plan-usage-desktop.py— reads Claude Desktop's Keychain-encrypted Chromium cookies so the scrape basically never goes stale (no manual re-login needed like Firefox). Script was added inf7f4a88onfix/claude-permanent-firefoxbut was never merged; the LaunchAgent plist already pointed to it, causing silent scrape failures when on other branchesUIRequiresFullScreen(enables slide-over/split view), dropsprocessingbackground mode, strips hardcodedDEVELOPMENT_TEAMin favor of local credentialsTest plan
curl http://localhost:9596/healthshowsok: trueandplan_usage.fresh: trueafter a scrape cycleUIRequiresFullScreen)🤖 Generated with Claude Code