Skip to content

Port applicable OpenUsage 0.7.14 provider fixes to Windows/Tauri - #3

Draft
poweruserz wants to merge 2 commits into
mainfrom
port/openusage-0.7.14
Draft

poweruserz wants to merge 2 commits into
mainfrom
port/openusage-0.7.14

Conversation

@poweruserz

Copy link
Copy Markdown
Owner

Summary

Compare the v0.7.3 fork with upstream OpenUsage v0.7.13 → v0.7.14 and adapt applicable provider fixes to the existing plugin architecture.

  • Codex: bind local spend/history to the selected auth file's home, including ~/.config/codex; cover independent Windows account token rotation while preserving the default login.
  • Codex: retain one history worker per home across probes with a 150 ms caller wait. Scope retained results by account identity and query dates so slow history does not block live quota.
  • Codex: map prolite, pro, and promax to Pro 100, Pro 200, and Pro 500.
  • Cursor: use valid structured team model pools and the reported total percentage, omit absent totals, and retain legacy fallbacks for incomplete/invalid pools or zero placeholders beside positive spend.
  • OpenCode: preserve active session reset countdowns below 1% usage; suppress only untouched rolling-window placeholders using capture time/HTTP Date, while keeping weekly/monthly resets.
  • Add provider and native-host regression coverage, update provider/API documentation and changelog, and enable pre-PR CI on port/** plus Windows Rust tests.

Scope and exclusions

The fork already supports file-backed token refresh and its own issue-reporting link; existing behavior is documented and covered rather than replacing it with upstream Swift implementations. Excludes macOS panel anchoring/navigation, Swift header layout, and PostHog changes. Plugin identities, metric labels, translations, logos, and UI layout are unchanged. WSL history remains disabled.

Full comparison and adaptation decisions: upstream 0.7.14 port notes.

Validation

Push CI passed for exact head de8bb0d24feb10f02cb2447f1f925f12312ee85a before this PR was opened:

  • Ubuntu: frozen dependency install, bun run build (TypeScript check + Vite build), and full Vitest suite.
  • Windows: frozen dependency install, plugin bundling, frontend build, and cargo test --locked --manifest-path src-tauri/Cargo.toml --lib.
  • Regression coverage includes account/home isolation, token rotation, Codex plan identifiers, pending/retained history and scope invalidation, Cursor pool fallbacks, OpenCode resets, and nested credential redaction.

The existing frontend job is named “Lint, Type-check, Build, Test”, but its workflow has no separate lint command. CI validates builds and automated tests; it does not establish a manual live-provider or packaged Windows UI smoke test.

At creation, the branch is 2 commits ahead of main and 0 behind. This PR is left in draft for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant