feat(copilot): show raw request counts for premium interactions#316
feat(copilot): show raw request counts for premium interactions#316thatdaveguy1 wants to merge 1 commit intorobinebers:mainfrom
Conversation
Add a 'Requests Used' text line (e.g. '60 / 300') to the Copilot plugin detail view, giving users visibility into exact premium request consumption alongside the existing percentage progress bar. - Compute used = entitlement - remaining from premium_interactions snapshot - Guard against missing/invalid fields and clamp negative values to 0 - Scope to detail view in plugin.json to keep overview uncluttered - Paid tier only; free tier is unaffected - Add 4 tests covering presence, absence, clamping, and free tier exclusion - Update docs/providers/copilot.md with new line entry
There was a problem hiding this comment.
No issues found across 4 files
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
There was a problem hiding this comment.
Pull request overview
Adds a paid-tier-only detail metric to the Copilot provider so users can see exact premium request consumption (used vs. entitlement) rather than only percent remaining.
Changes:
- Add a new
Requests Useddetail line to the Copilot plugin manifest. - Compute and emit the
Requests Usedtext line frompremium_interactions.entitlementandpremium_interactions.remaining. - Add test coverage for presence/absence and clamping behavior, and update provider docs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugins/copilot/plugin.js | Adds logic to derive and emit a Requests Used text line for paid-tier premium interactions. |
| plugins/copilot/plugin.json | Declares the new Requests Used line scoped to detail. |
| plugins/copilot/plugin.test.js | Adds tests for the new line (paid-tier display, missing fields, clamping, free-tier omission). |
| docs/providers/copilot.md | Documents the new displayed line for paid tier. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var used = pi.entitlement - pi.remaining; | ||
| lines.push(ctx.line.text({ | ||
| label: "Requests Used", | ||
| value: String(Math.max(0, used)) + " / " + String(pi.entitlement), | ||
| })); |
There was a problem hiding this comment.
Avoid var here; the rest of this plugin uses const/let. Using const used = ... (or let if you intend to reassign) prevents hoisting-related surprises and keeps style consistent.
davidarny
left a comment
There was a problem hiding this comment.
@thatdaveguy1 hey, thanks for the PR! Could you please provide screeshots?
|
@davidarny Sure. Main menu is unchanged (undecided on this, personally I would like if this showed requests too)
detail view is where it shows
|
|
I'm not fully sold on this from a UI/UX perspective tbh. Feels like we're showing the same information twice. Curious to hear your thoughts on this too @robinebers |


Description
Adds a Requests Used text line (e.g.
60 / 300) to the Copilot plugin detail view. This gives users visibility into their exact premium request consumption alongside the existing percentage-based progress bar.Copilot uses a request-based quota system, but the current plugin only shows "80% remaining" — which is ambiguous without knowing the total. This PR surfaces the raw counts already present in the API response (
entitlementandremainingfrompremium_interactions), requiring no additional API calls.Scope: Paid tier only. Free tier is unaffected. The line is scoped to
detailinplugin.jsonso it doesn't clutter the overview.Related Issue
N/A — enhancement request.
Type of Change
Testing
bun run buildand it succeededbun run testand all tests pass (935/935)bun tauri dev4 new tests added:
Requests Usedtext line present with value60 / 300for default paid-tier fixtureentitlement/remainingfields are missing from snapshotremaining > entitlement(shows0 / N)Screenshots
No UI changes — this is a plugin-only change. The frontend already renders
textlines as label/value pairs.Checklist
mainbranchSummary by cubic
Adds a "Requests Used" text line to the Copilot plugin, showing exact premium request consumption (e.g., 60 / 300) alongside the Premium progress bar. This gives paid users clear usage numbers without extra API calls.
premium_interactionsand clamps at 0.Written for commit b90578d. Summary will update on new commits.