Skip to content

Improve account switching, usage forecasting, and pool burn accuracy - #4

Open
smashlight wants to merge 123 commits into
lordydord:mainfrom
smashlight:main
Open

Improve account switching, usage forecasting, and pool burn accuracy#4
smashlight wants to merge 123 commits into
lordydord:mainfrom
smashlight:main

Conversation

@smashlight

Copy link
Copy Markdown

Summary

  • bring the accumulated v1.8.4 and v1.8.5 account-switching, reset-credit, and usage-panel improvements from the fork
  • add pool-wide usage history, pace forecasting, daily visualization, and reset-chance reporting
  • fix the enough/not-enough verdict so added accounts and reset increases cannot hide observed consumption
  • add regression coverage for changing pool composition

Verification

  • Infrastructure tests passed: 338 assertions
  • Reset logic self-test passed
  • Full macOS app build completed successfully
  • Installed bundle signature, lifecycle monitor, and running binary verified

- CodexTokenRefresher: pure OAuth refresh via auth.openai.com with error-code mapping and unit tests
- Proactive refresh when tokens are older than 3 days; reactive one-shot retry on 400/401 usage responses
- Atomic write-back of refreshed tokens to account auth files, mirrored into the active ~/.codex/auth.json with concurrent-switch protection
- Per-account login-expired notification with 6-hour cooldown when refresh finally fails
- Credit-expiry Automation toggle: 3-day expiry alert, SHA-256 fingerprint dedup (max 64)
Add a pool-wide usage pace forecast: sample the remaining five-hour
pool every 30 minutes into a local 56-day JSONL history, draw a
CodexBar-style utilization chart in the account panel, and show a
forecast line plus an enough/not-enough verdict against the weekly
reset date.
- DailyPoolAggregator groups samples by calendar day (14-day window,
  day minimum as the bar value, days without samples skipped)
- Pool pace chart falls back to raw samples while history covers < 2 days
- Hover tooltip shows day low / end values and today marker
- Drop the usage header panel (branding, active account, connected badge)
  and the now-unused PanelMarkView; panel height shrinks accordingly
Show pool pace by calendar days, remove usage header
Resolve usage-panel height conflict: base height 424 (header removed)
plus the reset chance section (top gap + 44pt card).
…ogin

- Remove the Route B prototype entirely (button, screen, models,
  handlers, launch env var) - non-executing stub was dead weight
- Remove Auto resume setting and its logic (notifications, clipboard
  prompt injection); auto switch keeps its behavior via 'automatic' flag
- Remove menu-bar density setting (always the detailed style) and the
  ToolbarDisplayStyle enum
- Remove Device login button, menu item and addAccountDeviceCode
- Settings header shows only 'Settings' + Back; drop CONTROL ROOM
- Health section drops the constant 'Mode: ChatGPT' badge
- Panel shrinks to 592pt; add '+' account icon next to the gear in the
  usage bottom bar
Merge glass-ui: liquid glass redesign
Repair bundled plugins after account switch
feat: make pool verdict timeline proportional
…chart

feat: add dynamic daily pool spend chart
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.

1 participant