Add Limit Tracker — core 8 (Claude/Codex/Copilot/Cursor/DeepSeek/Gemini/OpenCode Go/z.ai) - #367
Add Limit Tracker — core 8 (Claude/Codex/Copilot/Cursor/DeepSeek/Gemini/OpenCode Go/z.ai)#367pfTheTrial wants to merge 3 commits into
Conversation
…k/Gemini/OpenCode Go/z.ai)
|
Thanks for contributing an extension to Vicinae! 👋 Before publication, this pull request receives two reviews:
✅ Ready for human review. The automated reviewer approved the latest commit and a maintainer has been notified. No blocking findings remain on the latest commit. The automated reviewer examines only the current commit. New commits invalidate its previous decision and start another review. |
clankus-aurelius
left a comment
There was a problem hiding this comment.
The PR has one publication blocker and five functional or documentation issues. The most serious problems are bypassing the preferences API and presenting fabricated or inaccessible usage information.
Automated review found 1 publication-blocking issue.
This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.
| /> | ||
| </ActionPanel> | ||
| } | ||
| > | ||
| {baseRows.map((row) => { | ||
| if (row.kind === "agent") { |
There was a problem hiding this comment.
🔴 Blocking — Extension settings bypass the preferences API
Rule: API-001
The action opens the hard-coded vicinae://extension-preferences URL. The authoritative API declares openExtensionPreferences() specifically for this operation.
Suggested resolution: Replace the browser/deeplink action with an action whose handler calls openExtensionPreferences().
| rollingResetsAt = null; | ||
| } else { | ||
| // Primary is rolling (5-Hour) if present, else first quota | ||
| const rQuota = rolling.quota ? { ...rolling.quota, resetsAt: rolling.resetsAt } : null; | ||
| primary = rQuota ?? quotas[0]; | ||
| // Attach correct reset to primary | ||
| if (primary && !primary.resetsAt) { | ||
| if (primary.label === "5-Hour") primary = { ...primary, resetsAt: rollingResetsAt }; | ||
| else if (primary.label === "Weekly") primary = { ...primary, resetsAt: weeklyResetsAt }; | ||
| else if (primary.label === "Monthly") primary = { ...primary, resetsAt: monthlyResetsAt }; |
There was a problem hiding this comment.
🟠 Warning — Missing quota data is reported as 100% remaining
Rule: CORRECTNESS-001
When no recognizable quota is returned, the fetcher invents empty 5-hour, weekly, and monthly quotas. These are rendered as healthy 100% remaining instead of an unavailable or parse-error state.
Suggested resolution: Return a parse error when the successful response contains no usable quota data.
| rollingResetsAt = null; | |
| } else { | |
| // Primary is rolling (5-Hour) if present, else first quota | |
| const rQuota = rolling.quota ? { ...rolling.quota, resetsAt: rolling.resetsAt } : null; | |
| primary = rQuota ?? quotas[0]; | |
| // Attach correct reset to primary | |
| if (primary && !primary.resetsAt) { | |
| if (primary.label === "5-Hour") primary = { ...primary, resetsAt: rollingResetsAt }; | |
| else if (primary.label === "Weekly") primary = { ...primary, resetsAt: weeklyResetsAt }; | |
| else if (primary.label === "Monthly") primary = { ...primary, resetsAt: monthlyResetsAt }; | |
| let primary: OpencodegoQuota | null = null; | |
| if (quotas.length === 0) { | |
| return { | |
| usage: null, | |
| error: { type: "parse_error", message: "OpenCode Go response did not contain usable quota data." }, | |
| }; | |
| } else { |
| <MenuBarExtra.Item | ||
| key={agent.id} | ||
| icon={agent.icon} | ||
| title={getMenuItemTitle(agent.name, agent.accessory.text, agent.isLoading, agent.isOpenCodeActive)} | ||
| tooltip={getMenuItemTooltip(agent.accessory.tooltip)} | ||
| onAction={() => openCommandPreferences()} |
There was a problem hiding this comment.
🟠 Warning — Usage items open preferences instead of details
Rule: CORRECTNESS-001
Provider items advertise “Click to open details,” but their action calls openCommandPreferences(). The separate “Open Agent Usage” item uses the same incorrect handler, so neither action opens usage details.
Suggested resolution: Wire these actions to open the main Agent Usage command or its detail view; reserve openCommandPreferences() for the Configure item.
| const view = row.view; | ||
| const accessory = view.getAccessory(); | ||
| return ( |
There was a problem hiding this comment.
🟠 Warning — Multi-account errors omit their actionable message
Rule: UX-001
Accounted Codex and z.ai rows always render metadata. Their error metadata contains only generic status/type fields, hiding messages such as how to add an account or repair credentials.
Suggested resolution: When view.error exists, render formatErrorMarkdown(view.error.message) as done for single-provider rows; render provider metadata only on success.
| await showToast({ | ||
| title: "Please wait", | ||
| message: `Refresh available in ${waitSec}s`, | ||
| style: Toast.Style.Animated, | ||
| }); | ||
| return; | ||
| } |
There was a problem hiding this comment.
🟠 Warning — Refresh repeats multi-account provider requests
Rule: CORRECTNESS-001
Refresh iterates rendered account rows, although every row for a provider shares the same revalidate function that refreshes all its accounts. With multiple Codex or z.ai accounts, one refresh therefore refetches the complete provider repeatedly, increasing latency and rate-limit risk.
Suggested resolution: Deduplicate refresh operations by provider or revalidate callback before invoking them.
| - **Copilot** — GitHub device flow + internal usage API. | ||
| - **Cursor** — Browser session cookies for plan + usage + billing resets. | ||
| - **DeepSeek** — API key for credit balance tracking. | ||
| - **Gemini** — OAuth-backed quota API using Gemini CLI credentials. |
There was a problem hiding this comment.
🟠 Warning — Copilot setup falsely claims a device flow
Rule: MANIFEST-001
The provider documentation promises a GitHub device flow, but the implementation only discovers an existing environment token or accepts a preference token; it does not implement device authorization.
Suggested resolution: Describe the implemented token-based setup, or add the advertised device flow.
| - **Gemini** — OAuth-backed quota API using Gemini CLI credentials. | |
| - **Copilot** — Reads an existing GitHub token from your environment or extension preferences and queries the internal usage API. |
clankus-aurelius
left a comment
There was a problem hiding this comment.
One functional issue remains in the menu-bar navigation fix.
Automated extension review passed. A maintainer review is still required.
This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.
| onAction={() => open("vicinae://extensions/limit-tracker/agent-usage")} | ||
| /> | ||
| ))} | ||
| </MenuBarExtra.Section> | ||
| <MenuBarExtra.Section> | ||
| <MenuBarExtra.Item | ||
| title={refreshTitle} | ||
| icon={Icon.ArrowClockwise} | ||
| shortcut={Keyboard.Shortcut.Common.Copy} | ||
| onAction={handleRefresh} | ||
| /> | ||
| <MenuBarExtra.Item | ||
| title="Open Agent Usage" | ||
| icon={Icon.List} | ||
| shortcut={{ modifiers: ["cmd"], key: "o" }} | ||
| onAction={() => open("vicinae://extensions/limit-tracker/agent-usage")} |
There was a problem hiding this comment.
🟠 Warning — Menu-bar actions use an invalid command deeplink
Rule: CORRECTNESS-001
Both actions open vicinae://extensions/limit-tracker/agent-usage, but the authoritative product reference defines command deeplinks as vicinae://launch/<provider>/<entrypoint>. These actions therefore do not open Agent Usage.
Suggested resolution: Change both URLs to vicinae://launch/limit-tracker/agent-usage.
|
@aurelleb automated review passed for |
clankus-aurelius
left a comment
There was a problem hiding this comment.
The previous menu-bar deeplink issue is resolved. No new actionable issues were introduced by the incremental changes.
Automated extension review passed. A maintainer review is still required.
This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.
Track AI coding agent limits across 8 providers — Claude, Codex, Copilot, Cursor, DeepSeek, Gemini, OpenCode Go, z.ai — natively via @vicinae/api.
Features:
Checklist: