Skip to content

Fix manual Codex quota refresh persistence - #237

Merged
seakee merged 1 commit into
mainfrom
fix/codex-quota-cache
Jun 25, 2026
Merged

seakee merged 1 commit into
mainfrom
fix/codex-quota-cache

Conversation

@seakee

@seakee seakee commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Persist manual Codex quota refresh results so they survive a full page reload.
Resolve Codex quota display state by freshness, preventing older usage-header snapshots from overriding newer manual refresh data.

Scope

  • Frontend panel
  • Manager Server
  • CPA panel mode
  • Full Docker mode
  • Native packages / release
  • Docs / Wiki
  • CI / build / tooling

Changes

  • Persist successful manual Codex quota refresh states while excluding usage-header snapshots and errors.
  • Share quota display resolution between quota management and auth files, with 401 errors preserved for reauth controls.
  • Clear persisted quota cache on auth identity changes, logout, and login storage cleanup.
  • Add unit coverage for display freshness resolution and persisted quota filtering/cleanup.

User Impact

Codex quota cards continue to show the latest manual refresh result after a full page reload instead of falling back to stale header-derived quota data.

Compatibility / Runtime Notes

  • CPA panel mode: Frontend-only cache behavior applies in the browser.
  • Manager Server mode: No backend API or storage schema changes.
  • Full Docker / native packages: Management panel behavior is updated after rebuild/package.

Data / Security Notes

Persists only successful manual Codex quota response state in existing obfuscated local storage and clears it on auth identity changes/logout.

Risk / Rollback

Risk level: Low

Rollback notes:

  • Revert the commit to restore prior in-memory quota-only behavior.

Verification

  • Type check
  • Lint
  • Tests
  • Build
  • Manual UI check
  • Docs/link check
  • Not applicable, docs-only

Commands / evidence:

npm --workspace apps/web run test -- src/components/quota/quotaConfigs.test.ts src/stores/useQuotaStore.test.ts
npm run type-check
npm run lint
npm run test

Screenshots / Recordings

N/A. No visual layout change.

Docs

  • README updated
  • Wiki updated
  • Release notes needed
  • Not needed

Related

N/A

Persist successful manual Codex quota refresh results and reuse them after full page reloads.

Share quota display resolution between quota management and auth files so stale header snapshots no longer override newer manual data.

Clear cached quota state on auth identity changes, logout, and login storage cleanup to avoid cross-account leakage.
@seakee
seakee merged commit 23da875 into main Jun 25, 2026
4 checks passed
@seakee
seakee deleted the fix/codex-quota-cache branch June 25, 2026 09:09
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