Skip to content

Add headroom subscription quota and snapshot polling#13

Merged
akhilsinghcodes merged 1 commit into
mainfrom
feature/headroom_upgrade
Jun 23, 2026
Merged

Add headroom subscription quota and snapshot polling#13
akhilsinghcodes merged 1 commit into
mainfrom
feature/headroom_upgrade

Conversation

@akhilsinghcodes

Copy link
Copy Markdown
Owner

Summary

  • Add periodic polling of headroom proxy subscription window and quota to track rate limits and usage trends over time
  • Persist snapshots to database so metrics survive headroom proxy restarts and history resets
  • Expose quota/snapshots via new dashboard API endpoints for UI consumption

Changes

  • Backend: New headroom-snapshot-poller.ts that polls /subscription-window, /quota, and /stats every 5 minutes
  • Database: New headroom_snapshots table storing subscription window, quota, and stats as JSON blobs with timestamp
  • API: Two new endpoints:
    • GET /api/dashboard/headroom/quota — live quota/subscription window from proxy
    • GET /api/dashboard/headroom/snapshots — durable poll history (up to 5000 rows)
  • Frontend: New types and API client methods (getHeadroomQuota, getHeadroomSnapshots)
  • Startup: Poller initializes on app start (startHeadroomSnapshotPoller())

@akhilsinghcodes akhilsinghcodes merged commit fee1096 into main Jun 23, 2026
1 check passed
@akhilsinghcodes akhilsinghcodes deleted the feature/headroom_upgrade branch June 23, 2026 08:12
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