Skip to content

fix: show live usage events head before full cache sync - #8

Merged
pj-workspace merged 1 commit into
mainfrom
fix/live-usage-events-head
Aug 10, 2026
Merged

pj-workspace merged 1 commit into
mainfrom
fix/live-usage-events-head

Conversation

@pj-workspace

Copy link
Copy Markdown
Owner

Summary

  • Merge fresh page-1 usage events into local cache on every background sync, even when billing metrics are unchanged
  • Prefer merged canonical events in the Events tab instead of stale full cache
  • Burst-fetch page 1 when opening Events tab or tapping Refresh (skips RequestPacer wait)
  • Keep full-cycle chart backfill in background for search/filter/charts

Test plan

  • ./scripts/build-app.sh release succeeds
  • After new Cursor usage appears on the website, open Events tab and confirm newest rows show within seconds
  • Refresh updates page 1 without waiting for chart backfill
  • Search/filter still works after full cache completes

Production risk

Low — read-only merge/display logic on existing usage events API; background full sync unchanged.

Merge fresh page-1 API data into the local cache on every sync, prefer
the merged head in the events list, and burst-fetch page 1 when opening
the Events tab so details update without waiting for full-cycle backfill.
Copilot AI lite review requested due to automatic review settings August 10, 2026 08:45
@pj-workspace
pj-workspace merged commit a8a4dd1 into main Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants