ChatGPT Usage Monitor 1.1.0 — family backport, G emblem, Claude in the credits #6

Merged
claude merged 12 commits from oss-oo/chatgpt-family-backport-b0b966 into main 2026-10-27 20:25:58 +00:00
Member

The family backport for ChatGPT Usage Monitor 1.1.0: what the descendants
cinnamon-z-usage and
cinnamon-claude-usage
learned since they forked returns to the original. Details: CHANGELOG.md (1.1.0).

  • Emblem: the ring gauge surrounds a bold G (applet icon, panel icon, headings, social preview), sibling of the Z and the C.
  • Credits: "Made with love by Claudiu, Codex & Claude." (About dialog, contributors, README).
  • Popup: Spark and other model limits always open (no folding, no arrows); unused models keep muted rings and add no empty history; credits and limit resets above the charts; one-line 1h · 4h · 12h · Today rows; "Used:"; percentages without empty decimals; <1% and ~ retired.
  • Resilience: last-snapshot replay (≤ 2 h, same backend, 0600, only into an empty applet, no history sample, no reset action, deleted on sign-out); open-popup rebuilds only when something rendered changed (signature includes error, auth, reset and backend state); destroy-aware credits fit; ring repaint healing; closing click without rebuild; overdue refresh on interval shrink.
  • Hardening: plausible timestamps (ms → s, nothing past year 3000) and GLib null guards; redacted one-line backend errors; non-UTF-8/cut-off history starts over; one sample per moment; robust metadata read; catch-all helper error line.
  • Found on the way: the backend description ran chatgpt --version, and the Linux package's launcher only execs the Electron app, so the ChatGPT desktop app was started for up to two seconds about every five minutes. The version now comes from resources/linux-package-metadata.json; the app is never executed.
  • Performance: history written with the C JSON encoder, consumption periods bisected (real 10,000-sample history: write 86 → 18 ms, build 51 → 30 ms, identical bytes and results).
  • Not ported, on purpose: request spacing / answer cache and the 2-minute floor (no rate limit at 1/min: 10,000 refreshes over 7 days, 3 misses), z's popup geometry machinery, Z-specific credit tokens and plan pills, Claude's sign-in flow.

Validation

  • make verify green locally at 08f5530: 71 Python tests, 16 CJS suites, GTK path settings, translations, UI inventory (22 captures from private Cinnamon sessions at baa2052), rights inventory (37 assets), icons, ShellCheck, social preview.
  • Clock shift (LD_PRELOAD CLOCK_REALTIME shim): all offline suites green at 0, +1 h, +4 d, +30 d and +1 y; the first run caught a clock-bound test.
  • Baselined mutants: 71 of 71 caught, three unmutated baselines pass.
  • Independent read-only reviews, four rounds, every finding fixed:
    1. 2 major, 2 minor, 7 nits → 2add6cb
    2. 3 minor, 3 nits → c6ac9d6
    3. 1 major, 1 minor, test validity, 4 nits → 58a6d02
    4. 4 nits → baa2052
  • Lab CI: this PR's run on the final head.

🤖 Generated with Claude Code

The family backport for **ChatGPT Usage Monitor 1.1.0**: what the descendants [cinnamon-z-usage](https://oss-oo.io/OSS-Singularity/cinnamon-z-usage) and [cinnamon-claude-usage](https://oss-oo.io/OSS-Singularity/cinnamon-claude-usage) learned since they forked returns to the original. Details: `CHANGELOG.md` (1.1.0). - **Emblem:** the ring gauge surrounds a bold **G** (applet icon, panel icon, headings, social preview), sibling of the Z and the C. - **Credits:** "Made with love by Claudiu, Codex & Claude." (About dialog, contributors, README). - **Popup:** Spark and other model limits always open (no folding, no arrows); unused models keep muted rings and add no empty history; credits and limit resets above the charts; one-line `1h · 4h · 12h · Today` rows; "Used:"; percentages without empty decimals; `<1%` and `~` retired. - **Resilience:** last-snapshot replay (≤ 2 h, same backend, 0600, only into an empty applet, no history sample, no reset action, deleted on sign-out); open-popup rebuilds only when something rendered changed (signature includes error, auth, reset and backend state); destroy-aware credits fit; ring repaint healing; closing click without rebuild; overdue refresh on interval shrink. - **Hardening:** plausible timestamps (ms → s, nothing past year 3000) and GLib null guards; redacted one-line backend errors; non-UTF-8/cut-off history starts over; one sample per moment; robust metadata read; catch-all helper error line. - **Found on the way:** the backend description ran `chatgpt --version`, and the Linux package's launcher only execs the Electron app, so the ChatGPT desktop app was started for up to two seconds about every five minutes. The version now comes from `resources/linux-package-metadata.json`; the app is never executed. - **Performance:** history written with the C JSON encoder, consumption periods bisected (real 10,000-sample history: write 86 → 18 ms, build 51 → 30 ms, identical bytes and results). - **Not ported, on purpose:** request spacing / answer cache and the 2-minute floor (no rate limit at 1/min: 10,000 refreshes over 7 days, 3 misses), z's popup geometry machinery, Z-specific credit tokens and plan pills, Claude's sign-in flow. **Validation** - `make verify` green locally at 08f5530: 71 Python tests, 16 CJS suites, GTK path settings, translations, UI inventory (22 captures from private Cinnamon sessions at baa2052), rights inventory (37 assets), icons, ShellCheck, social preview. - Clock shift (LD_PRELOAD `CLOCK_REALTIME` shim): all offline suites green at 0, +1 h, +4 d, +30 d and +1 y; the first run caught a clock-bound test. - Baselined mutants: 71 of 71 caught, three unmutated baselines pass. - Independent read-only reviews, four rounds, every finding fixed: 1. 2 major, 2 minor, 7 nits → `2add6cb` 2. 3 minor, 3 nits → `c6ac9d6` 3. 1 major, 1 minor, test validity, 4 nits → `58a6d02` 4. 4 nits → `baa2052` - Lab CI: this PR's run on the final head. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude agent added 4 commits 2026-10-27 18:39:05 +00:00
Ports what cinnamon-z-usage and cinnamon-claude-usage learned since the
fork: always-open model sections, a menu signature that skips identical
rebuilds and follows error/auth/reset state, a last-snapshot replay for
reloads while the backend fails, timestamp plausibility and GLib null
guards, redacted backend errors, robust state files, a catch-all helper
error line, faster history writes and range sums, the percentage contract
without empty decimals, a bold G emblem and Claude next to Codex in the
credits. Screenshots and the rights inventory follow in a later commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Linux package's chatgpt launcher only execs the Electron app, so the
--version probe behind the ChatGPT App tooltip started the desktop app
itself for up to two seconds, about every five minutes while the applet
refreshed. The version now comes from resources/linux-package-metadata.json;
a regression test proves the launcher is never executed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unused model limit (no consumption in any period, no activity) adds no
empty history section now that model sections are always open; the Codex
history always shows. The capture fixture's unused Spark carries no period
consumption either. The social preview shows the G emblem. The history
equivalence test aligned its reference buckets to one hour for the 2-hour
run, which only failed at odd hours; the clock-shift run found it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Close the test gaps the mutation run found
Some checks failed
Checks / Functional checks (pull_request) Failing after 38s
dd054bcb96
A popup-guards suite covers the destroy-aware credits fit and the hover
focus that must not scroll; the replay test checks that the history file
is not even rewritten; the signature test moves the clock past the reset
row's warning threshold; rows without a reset time are rendered for real.
41 of 41 mutants now fail the suites while three baselines pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the first independent review's findings
Some checks failed
Checks / Functional checks (pull_request) Failing after 1m9s
2add6cb05c
- The menu signature signs only rendered history: the tracking start,
  which moves on every refresh once the history is full, no longer
  forces a rebuild of the open popup.
- A held replay gives way to a newer replay and ends when a refresh
  fails without one, so it never outlives the helper's two-hour limit
  or shows windows past their reset.
- The activity caption shows the uncapped window total.
- A replay whose next reset credit expired shows no stale count.
- History headings name the limit whenever the usage limits show more
  than Codex or only a model limit has history.
- --no-history also skips the replay snapshot; --history-file takes it
  along; the catch-all error line is redacted.
- No rebuild while the popup fades out (as in both siblings).
- The overview capture fixture's Spark history is idle in every period;
  the superseded decimal-display draft is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recapture the README screenshots; agent instructions
All checks were successful
Checks / Functional checks (pull_request) Successful in 38s
bf2a72d1a5
All 22 README captures come from private Cinnamon sessions at 2add6cb
and show the G emblem, the always-open model sections, the credits row
above the charts and the one-line consumption rows; inventory.json and
the rights inventory carry their hashes (27 refreshed assets, including
the icons and the social preview). AGENTS.md and CLAUDE.md give coding
agents the repository's invariants, commands and workflows, as in
cinnamon-claude-usage. The changelog, SECURITY.md and docs describe the
held-replay rules and the uncapped caption total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the second independent review's findings
Some checks failed
Checks / Functional checks (pull_request) Failing after 38s
c6ac9d6398
- While replays stand in, the first one stays the baseline of the weekly
  reset detection and the notifications, so a reset whose window a newer
  replay already dropped is still observed when fresh data lands.
- A held replay is refreshed as soon as its age limit, a window reset or
  the next reset credit's expiry passes on the wall clock (checked by the
  one-second countdown tick, also right after a suspend), instead of
  living on until the next interval.
- A rebuild that lands while the popup fades out waits for the fade
  instead of being dropped (the menu manager can open the popup without
  a click-triggered rebuild).
- The menu signature tolerates garbage history windows.
- --history-file pointing at last-snapshot.json or at a nameless path no
  longer clashes with or aborts on the replay snapshot.
- Docs say what the hidden-history rule is: no consumption in 24 hours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recapture the README screenshots at c6ac9d6
All checks were successful
Checks / Functional checks (pull_request) Successful in 4m22s
92e3b372ad
The second review's fixes touch recorded producing sources, so all 22
captures come again from private Cinnamon sessions at c6ac9d6. Against
the inspected 2add6cb set the geometry is identical, the panel images
are pixel-identical and the popups differ only in their clock-dependent
reset times; inventory.json and the rights inventory carry the hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the third independent review's findings
Some checks failed
Checks / Functional checks (pull_request) Failing after 1m8s
58a6d02315
- A replay episode lasts until fresh data lands, also after a failure
  ended the held replay: the first replay stays the baseline, so the
  weekly reset across a long outage is still observed and notified.
- One _endHeldReplay ends a held replay whenever a refresh brings no new
  replay, including when python3 is missing or the helper cannot be
  spawned.
- The helper states when a replay stops being valid (source.expiresAt);
  the applet no longer copies the helper's limits.
- Every open shows current content: an open through the menu manager
  rebuilds when the signature changed since the last build.
- Broken history windows are skipped instead of breaking the rebuild.
- The replay tests run each scenario on its own applet and cover the
  outage episode, the sign-in error and the no-spawn paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recapture the README screenshots at 58a6d02
All checks were successful
Checks / Functional checks (pull_request) Successful in 38s
0509097f48
The third review's fixes touch recorded producing sources again; all 22
captures come from private Cinnamon sessions at 58a6d02 with geometry
identical to the inspected set and differences only in clock-dependent
times and temporary paths. Inventories carry the new hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the fourth review's nits
Some checks failed
Checks / Functional checks (pull_request) Failing after 38s
baa205253e
- Only plausible epoch seconds arm a replay expiry, so a past or garbage
  value cannot refresh on every tick.
- A fresh open starts with current countdowns and Updated age; the popup
  test now checks that open() rebuilds before the popup opens and never
  rebuilds an already open popup.
- Two comments are back on the code they describe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recapture the README screenshots at baa2052
All checks were successful
Checks / Functional checks (pull_request) Successful in 44s
08f5530528
The fourth review's nits touch applet.js, so all 22 captures come again
from private Cinnamon sessions at baa2052: geometry identical to the
inspected set, differences only in clock-dependent times and temporary
paths. Inventories carry the new hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent merged commit 41425be59b into main 2026-10-27 20:25:58 +00:00
claude agent deleted branch oss-oo/chatgpt-family-backport-b0b966 2026-10-27 20:25:58 +00:00
ClaudiuSchuster referenced this pull request from a commit 2026-10-27 23:30:10 +00:00
claude agent referenced this pull request from a commit 2026-10-27 23:31:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/cinnamon-chatgpt-usage!6
No description provided.