You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Payouts Overview tab with status tables and trend charts (#25589)
## Summary
- Adds a new **Overview** tab as the first tab on the Payouts page,
showing a dashboard of payout metrics for the last 7 days
- **Status tables**: two side-by-side cards showing payout counts by
status (Completed, Processing, Pending, Rejected, Failed) split by
platform vs customer payouts
- **Stat + chart cards**: three cards combining headline numbers with
Origin `LineChart` trend graphs — total payouts sent, total volume
(grouped by sending currency), and completion rate
- **Backend**: new `grid_payout_overview_stats` GraphQL query with
SQLAlchemy aggregation, 10-second memcache TTL
- **Refactored** `sla_metrics_cache` into a generic
`grid_dashboard_cache` with configurable namespace and TTL, so both SLA
metrics and payout overview share the same caching infrastructure
## Test plan
- [ ] Navigate to `/grid/payouts` and verify it redirects to the
Overview tab
- [ ] Verify status tables show correct counts for platform and customer
payouts
- [ ] Create new payouts and verify they appear in status tables within
~10 seconds
- [ ] Verify line charts show 7-day trends including today's data
- [ ] Verify volume card shows per-currency breakdown when multiple
currencies are used
- [ ] Verify loading spinner shows while data is fetching
- [ ] Verify completion rate shows 100% on days with no payouts
- [ ] Run backend tests: `env -u QUART_CONFIG uv run pytest
sparkcore/graphql/objects/grid_dashboard/tests/test_grid_payout_overview_stats.py
-v`
<img width="1366" height="753" alt="Screenshot 2026-03-31 at 2 23 05 PM"
src="https://github.com/user-attachments/assets/783120df-3576-4d88-91fd-5f5987a6263d"
/>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: 72a966c68f12e3c24ed270626abc9b4b1bc80bcc
0 commit comments