Extra usage in Claude's terracotta; extra usage in the panel (switch) #20
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/extra-usage-panel-orange"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Claudiu's follow-up on 1.1.0 (relayed by the parent session, his words verbatim):
1. Claude's terracotta instead of the blue
EXTRA_USAGE_COLORis#d97757(Claude's terracotta, the deep end of the title's coral) for the balance, its spend and the graph segments; dark popups get the coral highlight on top, light themeslegibleAccent. Measured against the rendered dark popup colors (CIEDE2000):Every orange separates more from the green than the blue for normal vision; the terracotta, darker than the green, keeps the most separation for red-green colour vision and the most distance from the warning yellow.
2. Extra usage in the panel
show-extra-usage-in-panel(switch, off by default, below the model-limits switch) adds one compact panel item like chatgpt-usage's AIC credits (UsageFormat.buildPanelExtraUsage): the icon and the currency above what the credits in hand can still pay, min(credits left, monthly limit left). That is the purchased credits normally and with auto-reload (as claude.ai lists them), the limit's rest where it binds,0.00once it is reached or the credits ran out. Amounts round like the popup's, whole units from 100 on, k/M from 10,000;--without a readable balance; nothing while extra usage is off or not reported. With window labels off a horizontal panel joins currency and amount ("$8.92"); vertical panels keep the currency row. The tooltip and the accessible name add the row and a binding monthly limit. z-usage's retiredshow-credits-in-panelkey stays retired.3. "Extra usage: off" stays one row
Already the behavior (
buildExtraUsageDisplayreturns no limit row when inactive);tests/test-extra-usage.jsnow pins it, also with a monthly limit still reported.Netguard hardening (from the review of its sibling ports)
tests/netguard/sitecustomize.pybypasses proxies (NO_PROXY=*; a loopback proxy carried requests past it), guardsgethostbyname*,gethostbyaddr,getnameinfoandsendtotoo;tests/test_netguard.pyprobes connect/sendto on closed sockets, proves each lookup guarded before calling it, fails when the guard is only half set up, and its child checks the guard before any lookup. Identical in cinnamon-z-usage #30 and cinnamon-chatgpt-usage #13.Validation
make verify: 143 Python tests, 18 cjs suites; CI green on every push.Version 1.2.0.
🤖 Generated with Claude Code
1.2.0 review round 2 (no blocker): - should-fix: the panel item's accessible name names the binding limit too, so a 0.00 is explained; a limit used up without the reached flag shows its row ($0.00 left) also without a readable balance. - From 999,500 on the panel shows M (never "1000k"); tests pin the limit clamp (spent over the limit), 9999.5 → 10k and 999,700 → 1M. - Vertical panels keep the currency row with window labels off ("CA$8.92" would not fit); the money comment names the panel's compact form. Netguard (review of the sibling ports, same files here): - Proxies are bypassed (NO_PROXY=*): a loopback proxy carried a request to any host past the checks. gethostbyname*, gethostbyaddr, getnameinfo and sendto are guarded too. - test_netguard: connect/connect_ex/sendto probed on closed sockets (the connect half was never exercised), the child proves the guard before its lookup of example.invalid, and a half set-up guard fails instead of skipping. Docs say what the guard covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>