Add the All programs Overview page for partners #4649
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 412 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4649"
general
weight: 0.35
Joker666
Changes
Fixes https://linear.app/dubinc/issue/ENG-1749/make-the-partner-earnings-endpoints-work-across-all-programs
Fixes https://linear.app/dubinc/issue/ENG-1746/add-the-all-programs-navigation-to-the-partner-sidebar
Fixes https://linear.app/dubinc/issue/ENG-1748/build-the-all-programs-overview-page-for-partners
/api/partner-profile/earnings,/count,/timeseriesand/topfor all programs, or one program withprogramIdOrSlug. The per-program routes share the same code./overviewpage and an Overview item in the sidebar./overview, or on/programsif they have no approved program.overviewslug and match whole path segments in the partners middleware.Commissionindex on[partnerId, createdAt].typefilter.Motivation
A partner in several programs has no single place to see their earnings across programs.
UI/Screenshot
<img width="2880" height="2000" alt="overview" src="https://github.com/user-attachments/assets/f42cafb2-8cc9-451c-b8d3-fb0dbfd5fd73" />
<img width="2880" height="2000" alt="overview-tooltip" src="https://github.com/user-attachments/assets/f93623c4-ef3c-476b-b56b-1ad3a9ddd395" />
<img width="880" height="720" alt="sidebar" src="https://github.com/user-attachments/assets/f7ad3d15-5d1c-4379-8c8b-fe8da619b9a8" />
<img width="880" height="1040" alt="sidebar-dropdown" src="https://github.com/user-attachments/assets/70659e1c-54df-413d-9ca5-d5ebad177ad2" />
Deployment Steps
1. Before merging, push the schema to the PlanetScale
stagingbranch, then open and deploy a deploy request intomain.How to test
1. Add the index to your local database, then run
pnpm devinapps/web:2. Log in at
http://partners.localhost:8888as a partner in two or more programs, with commissions in the last 30 days. You land on/overview. A partner without an approved program lands on/programs.3. Check that the earnings total and the cards match the partner's commissions, that the chart tooltip lists earnings per program, and that changing the date range updates the cards.
4. Open a program's Overview and Earnings pages. They work as before.
5. Log out and open
/overviewai(a slug that does not exist). It shows the program page, not the login page.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- Added a partner dashboard overview with an earnings chart, recent payouts and earnings, tasks, and top-performing programs and links.
- Added partner earnings reports with date-range and program filters, totals, trends, counts, and top results.
- Partners with an approved program now land on the overview; partners without one continue to land on Programs.
- Updated partner navigation to include Overview and renamed “Your programs” to “All programs.”
- Updated payout cards to present recent payouts and program details more clearly.
- Customer email visibility in earnings now reflects each program’s data-sharing settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->