Skip to content

Always show Claude, Codex, Cursor, and Grok usage in the footer - #13

Draft
felipeorlando wants to merge 41 commits into
mainfrom
issue-1-usage-footer
Draft

felipeorlando wants to merge 41 commits into
mainfrom
issue-1-usage-footer

Conversation

@felipeorlando

@felipeorlando felipeorlando commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Refs #1.

New opt-in monocode.alwaysShowUsage setting keeps the usage chips pinned regardless of which provider is active. Default is off, and with it off the footer still follows the active session: Claude/Codex/Cursor/Grok show their usage chip; a provider MonoCode cannot read (OpenCode today) keeps the session label; no session stays empty.

The footer now fetches four providers:

  • Claude Code and Codex — same existing usage sources
  • Cursor — read-only cursorAuth/accessToken from the signed-in Cursor.app state.vscdb, then GET https://cursor.com/api/usage-summary. The chip uses autoPercentUsed / apiPercentUsed (not used/limit cents, which can read 100% on Ultra while bonus remains). Auto and API share one muted billing-cycle countdown.
  • Grok~/.grok/auth.json, then GET https://cli-chat-proxy.grok.com/v1/billing?format=credits. Headline is creditUsagePercent, with GrokBuild / on-demand fallbacks and the weekly period end as reset.

Access tokens never leave the host process and are not logged.

OpenCode — not in the roster

OpenCode Go’s usage endpoint returns 403 EntitlementError without a Go subscription, and Zen has no public quota API. A dead “not connected” chip would be noise, so OpenCode stays on the session-label fallback.

UI

Provider chips sit in one group with a vertical divider from the session label. Reset copy is muted (text-content/40); Auto/API labels stay full contrast. Refresh/backoff is still per provider.

Verification

src/lib/rateLimits.test.ts plus Rust unit tests for cursor_usage / grok_usage. Installed MonoCode.app will not pick up the new Tauri commands until tauri-dev is restarted.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

hardbeat920 and others added 25 commits September 8, 2026 06:22
- Add image storage, validation, and project-specific overrides
- Add appearance controls for visibility and session scope
- Add background dialog, project menu entry, and coverage tests
- Clear multi-select when pointer lands outside session cards
- Reset selection state when closing context menu
- Track context-menu selections to distinguish them from other interactions
- Sync global chat background path changes across session panes
- Add regression tests for arcade visibility
* Add a shortcut to archive the focused conversation

* Check archive eligibility before consuming the shortcut

* Simplify archive routing and remove added test dependencies

* Restore focused archive shortcut tests without new dependencies
- Support image drag-and-drop into notes with secure asset storage and rendering
- Toggle native window translucency based on light/dark appearance
- Vertical bar with dock-style magnification on hover
- Hover preview shows prompt and first two lines of reply
- Keyboard navigation with arrow/tab keys
- Simplified state management and interaction model
Layered backdrop blur carries scrolled content into the title bar
- Preserve dark-mode content tint
- Use a translucent base color in light mode
- Add light-theme composer box shadows and send button states
- Mark send buttons with a shared styling hook
- Add shared IME detection for modern and WebKit keyboard events
- Prevent composer actions from firing during text composition
- Cover IME and ordinary keyboard behavior with tests
- Delete the layered blur overlay and related scroll-state synchronization
- Lower the hide breakpoint from 62rem to 58rem
- Position and scale the background image consistently across split conversation panes
- Compare staged changes against HEAD and unstaged changes against the index
- Preserve selected diff kind and support partially staged files
- Add coverage for diff loading, focus, statuses, and snapshots
- Organize changed files by directory in collapsible tree view
- Add "Open All Changes" button to review all changes at once
- Persist view preference (list/tree) in localStorage
…920#125)

`git_grep` appended each `include` token straight onto the `git grep`
argument list with no `--` separator, so a token starting with `-` was
parsed as an option rather than a pathspec. `git grep` has flags that
spawn a process (`-O` / `--open-files-in-pager`), which made the search
panel's "files to include" field able to run an arbitrary command with
the user's privileges.

Add `--` after the pattern so everything that follows is unambiguously a
pathspec. This closes the whole option-injection category structurally
rather than rejecting specific flag names — the short `-O<cmd>` spelling
executes too, and a name-based filter would miss flags git adds later.

Verified non-regressing: ordinary globs, `:(exclude)` tokens, and an
empty pathspec list all behave the same with `--` in place.


Claude-Session: https://claude.ai/code/session_01NDamTDovK8dArJULC8b5VH

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@felipeorlando felipeorlando changed the title Always show provider usage in the footer Always show Claude, Codex, Cursor, and Grok usage in the footer Sep 8, 2026
felipeorlando and others added 2 commits September 8, 2026 18:16
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Read the local Cursor.app and Grok CLI sessions so the pinned usage bar can show real Auto/API and credit percentages, with a shared muted reset countdown.

Co-authored-by: Cursor <cursoragent@cursor.com>
cursoragent and others added 14 commits September 9, 2026 03:46
Return None when SQLite blob bytes are not ASCII UTF-16LE so even-length
UTF-8 JWTs fall through to the UTF-8 path instead of mojibake. Share the
duplicated invoke status handling across Claude, Cursor, and Grok fetchers.

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>
…at920#132)

* feat: hide the sidebar update control unless an update is available

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Prevent duplicate sidebar update installs from concurrent clicks

The busy flag only flips after installPendingUpdate awaits readAppVersion,
so a second click could start another install. Guard with a ref cleared
in finally, and cover two clicks during that delay.

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
- Memoize file tree and file type icon components
- Cache SVG markup to avoid unnecessary DOM replacement
- Add happy-dom regression tests for updates and filesystem changes
- Expose fast mode for OMP models
- Sync fast mode through RPC and config updates
- Handle unsupported models with fallback status
- Add protocol and lifecycle coverage
- Persist linked issues and pull requests in session history
- Add Inbox navigation and GitHub work-item resolution
- Connect GitLab accounts and discover repository work items
- Support issues, merge requests, comments, labels, assignees, and diffs
- Update inbox filters, details, and provider branding
Keep the sidebar rename input editable independently of the session's busy
state. A working session could enter rename from its menu or F2 but then
render a disabled input in place of the clickable session card.

Cover menu and keyboard entry, focus, commit, cancellation, blur, blank
titles, restored navigation, and a turn starting during an edit.

Co-authored-by: gettyeuro <202671653+yankawai@users.noreply.github.com>
# Conflicts:
#	src-tauri/src/lib.rs
#	src/App.tsx

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>
Replace the even-length check and UTF-16 chunking with is_multiple_of
and as_chunks, and push a char when padding JWT payloads.

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>
Move cache and polling into a module store so opening Settings, Search,
Inbox, or Notes no longer drops snapshots or immediately re-fetches.
Share the cache through localStorage so extra windows skip duplicate
Codex probes while another fetch is in flight.

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>
macOS and Windows clippy treat the cfg blocks as the function tail, so
the explicit return trips needless_return under -D warnings.

Co-authored-by: Felipe Orlando <fobsouza@gmail.com>
Clicking refresh while a background fetch is running now waits for that
fetch and then refetches, instead of returning the stale poll.

Co-authored-by: Felipe Orlando <fobsouza@gmail.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.

7 participants