Skip to content

Add usage status bar and Codex account switching#483

Merged
Jinwoo-H merged 8 commits into
mainfrom
Jinwoo-H/usage-tracking
Apr 11, 2026
Merged

Add usage status bar and Codex account switching#483
Jinwoo-H merged 8 commits into
mainfrom
Jinwoo-H/usage-tracking

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Summary

  • add a bottom status bar for Claude and Codex usage with click-persistent provider panels and clearer degraded/error states
  • add Codex account management in Settings plus quick account switching from the status bar
  • scope live Codex session follow-up to pane-level restarts so users can switch accounts without losing unrelated terminal panes
  • improve refresh behavior, inactivity polling behavior, and settings deep-linking for Manage Accounts

What Changed

  • added main-process rate limit services and fetchers for Claude and Codex
  • added renderer status bar UI, provider panels, and visibility controls
  • added Codex managed-account storage, login, selection, reauth, and removal flows
  • wired selected Codex account into Orca-owned Codex launches and stale-session restart prompts
  • cleaned up user-facing error copy for account login failures

Verification

  • pnpm exec oxlint src/main/codex-accounts/service.ts src/renderer/src/components/settings/GeneralPane.tsx src/renderer/src/components/settings/Settings.tsx src/renderer/src/components/status-bar/StatusBar.tsx src/renderer/src/lib/codex-session-restart.test.ts src/renderer/src/store/slices/terminals.ts src/renderer/src/store/slices/ui.ts
  • pnpm exec tsc --noEmit -p config/tsconfig.node.json --composite false
  • pnpm exec tsc --noEmit -p config/tsconfig.web.json --composite false
  • targeted vitest coverage for rate-limit service, PTY env wiring, and Codex session restart flows

Notes

  • this PR includes the design docs used to drive the implementation for the status bar and Codex account switching
  • Claude account switching is not included; only Codex managed account switching is implemented

- Claude fetcher: OAuth API for subscription users, PTY fallback,
  unavailable status for API key users
- Codex fetcher: JSON-RPC via app-server with proper init handshake,
  PTY fallback for CLI scraping
- Polling service with 2min interval, stale data retention on errors
- Status bar UI: shows percent remaining, grey progress bars,
  rich tooltip with session/weekly breakdown and reset countdown
- Unavailable providers hidden from status bar entirely
Replace text labels (Claude/Codex) with OpenAI and Claude brand SVG
icons in both the status bar and tooltip header. Add green/yellow/red
color coding to tooltip progress bars based on remaining capacity.
Extract tooltip components to a separate file to stay under max-lines.
Right-clicking the status bar shows a context menu (like VS Code) with
checkboxes to toggle Claude/Codex usage visibility and an option to
hide the entire bar. Preferences persist across restarts via the UI
state store. View > Toggle Status Bar in the app menu re-shows it.
@Jinwoo-H
Jinwoo-H force-pushed the Jinwoo-H/usage-tracking branch from 6c646dc to 47d649c Compare April 11, 2026 17:36
@Jinwoo-H
Jinwoo-H marked this pull request as ready for review April 11, 2026 18:11
@Jinwoo-H
Jinwoo-H merged commit 331e7de into main Apr 11, 2026
2 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/usage-tracking branch April 11, 2026 18:23
AmethystLiang added a commit that referenced this pull request Apr 11, 2026
* Revert "Revert "test: verify auto-update notification flow" (#478)"

This reverts commit 988fa02.

* test: fix missing ipc events mock in useIpcEvents.test.ts

* Add usage status bar and Codex account switching (#483)

* 1.1.14

* feat: add active agent count in top bar (#484)

* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Add "No login required" to README features (#486)

* Add "No login required" to top of README features

Highlight that Orca needs no account or login — users bring their own
Claude Code or Codex subscription directly.

* Simplify no-login line and add Codex account switching section

- Trim "No login required" to just the essentials
- Add [New] Hot Swap Codex Accounts section with gif demo

* Fix README badge layout — remove blank lines inside HTML blocks (#488)

Blank lines inside <p> tags cause GitHub to render each badge as a
separate paragraph instead of inline on one row.

* Add Codex account switcher gif (#489)

The gif was referenced in README but never committed.

* Refresh worktree quick jump UI (#487)

* fix: Warp-parity keyboard shortcuts — image paste and line-kill bindings (#491)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Nicer agent list (#492)

* test: mock more missing IPC handlers and store actions in useIpcEvents tests

---------

Co-authored-by: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Yax Patel <74978532+ypatel2022@users.noreply.github.com>
Co-authored-by: Colin Chambachan <colin.chambachan@gmail.com>
Co-authored-by: Ramzi <79337754+heyramzi@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
thomaszdxsn pushed a commit to thomaszdxsn/orca that referenced this pull request Jun 15, 2026
thomaszdxsn pushed a commit to thomaszdxsn/orca that referenced this pull request Jun 15, 2026
…i#479)

* Revert "Revert "test: verify auto-update notification flow" (stablyai#478)"

This reverts commit 988fa02.

* test: fix missing ipc events mock in useIpcEvents.test.ts

* Add usage status bar and Codex account switching (stablyai#483)

* 1.1.14

* feat: add active agent count in top bar (stablyai#484)

* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Add "No login required" to README features (stablyai#486)

* Add "No login required" to top of README features

Highlight that Orca needs no account or login — users bring their own
Claude Code or Codex subscription directly.

* Simplify no-login line and add Codex account switching section

- Trim "No login required" to just the essentials
- Add [New] Hot Swap Codex Accounts section with gif demo

* Fix README badge layout — remove blank lines inside HTML blocks (stablyai#488)

Blank lines inside <p> tags cause GitHub to render each badge as a
separate paragraph instead of inline on one row.

* Add Codex account switcher gif (stablyai#489)

The gif was referenced in README but never committed.

* Refresh worktree quick jump UI (stablyai#487)

* fix: Warp-parity keyboard shortcuts — image paste and line-kill bindings (stablyai#491)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Nicer agent list (stablyai#492)

* test: mock more missing IPC handlers and store actions in useIpcEvents tests

---------

Co-authored-by: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Yax Patel <74978532+ypatel2022@users.noreply.github.com>
Co-authored-by: Colin Chambachan <colin.chambachan@gmail.com>
Co-authored-by: Ramzi <79337754+heyramzi@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
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