Repository navigation
feat(admin): split reset pass revenue, 2-row KPIs - #3116
Conversation
Break Reset Pass sales out of the DevPass gross revenue split into their own line on the admin dashboard total revenue card. They remain counted in the gross revenue total; the DevPass split now covers subscription payments only, so the splits stay disjoint and sum to the total. Also lay out the DevPass KPI cards as a 2-row grid. Claude-Session: https://claude.ai/code/session_017Xbd48rpcVQWW2kx4vFiJ9
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughReset Pass transactions are separated from subscription DevPass revenue, aggregated as ChangesReset Pass Revenue Reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AdminMetrics as admin /metrics
participant Database
participant AdminDashboard as admin dashboard
AdminMetrics->>Database: Aggregate subscription and Reset Pass transactions
Database-->>AdminMetrics: Return gross revenue metrics
AdminMetrics->>AdminDashboard: Provide grossResetPassRevenue
AdminDashboard->>AdminDashboard: Render Reset passes row
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
DEV_PLAN_TX_TYPES; the DevPass split now covers subscription payments only (newDEV_PLAN_SUBSCRIPTION_TX_TYPES), so the splits stay disjoint and still sum to the gross revenue total — Reset Passes remain fully counted in total revenue.grossResetPassRevenuemetric onGET /admin/metrics: sum of completed one-timedev_plan_reset_passpurchases on DevPass orgs (PaymentIntent purchases, no invoice, so no invoice dedup needed), gross like the other splits.Testing
admin-metrics-gross-revenue.spec.tswith a Reset Pass purchase: asserts it lands in its own split, is excluded from the DevPass subscription split, and is included in the gross revenue sum.turbo run build --filter=api --filter=adminpasses; OpenAPI spec + admin typed client regenerated.https://claude.ai/code/session_017Xbd48rpcVQWW2kx4vFiJ9
Summary by CodeRabbit