Skip to content

feat(audit): show monthly quota (X/Y audits left) on the hub - #263

Merged
gkhngyk merged 1 commit into
mainfrom
feat/audit-quota-display
Jun 16, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feat/audit-quota-display

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Surface the org's Site Audit allowance on the hub so users can see how many runs remain this month — same pattern as the "X/Y analyses left" badge on Prompts.

  • Server: GET /api/audits/quota returns { used, limit, remaining } via getSiteAuditQuotaStatus (registered before /:id so "quota" isn't matched as an audit id).
  • Web: getAuditQuota() action + an AuditQuota type.
  • UI: a X/Y audits left this month badge on the run bar. It turns red and disables the Run button when the quota is exhausted. Hidden entirely on unlimited plans (Enterprise / self-hosted, limit === -1).

The server already enforced the quota (429 on exhaustion); this just makes the remaining count visible up front instead of only surfacing it as an error after the fact.

Notes

  • Builds on the merged Site Audit feature; quota limits are Starter 100 / Growth 500 / Enterprise & self-hosted unlimited.
  • Server + web; needs a server redeploy for the new /quota route.

Surface the org's Site Audit allowance so users know how many runs remain.
Adds GET /api/audits/quota (used/limit/remaining via getSiteAuditQuotaStatus),
a getAuditQuota web action, and a 'X/Y audits left this month' badge on the
hub run bar — turns red and disables the Run button when exhausted. Hidden on
unlimited (Enterprise / self-hosted) plans.
@gkhngyk
gkhngyk merged commit 426a084 into main Jun 16, 2026
4 checks passed
@gkhngyk
gkhngyk deleted the feat/audit-quota-display branch June 16, 2026 14:57
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