Improve the partner Overview and Programs pages #4682
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.69) × (1 − Review Confidence (0.65)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.69 · 514 lines diff across 21 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.47 · 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.374
Mass File Touch
mass_file_touch
0.080
Real PR Conversation Timeline
1 item
"Review active on #4682"
general
weight: 0.35
steven-tey
Joker666
Changes
Fixes https://linear.app/dubinc/issue/ENG-1797/reorder-the-cards-on-the-partner-all-programs-overview-page
Fixes https://linear.app/dubinc/issue/ENG-1798/show-each-programs-share-of-earnings-in-top-programs-by-earnings
Fixes https://linear.app/dubinc/issue/ENG-1807/stop-the-marketplace-filter-counts-from-running-on-the-partner
Fixes https://linear.app/dubinc/issue/ENG-1747/add-status-tabs-to-the-partner-programs-page-with-an-inactive-tab
Mobile order
Top programs
Programs page
/programs. Before, each tab change, search or sort sent 3 requests.GET /api/partner-profile/programsreturnsinactiveAt:bannedAtfor a ban, or the latestpartner.deactivatedorpartner.archivedactivity log. Changes before activity logs existed show "-". The log lookup runs only withincludeInactiveDates=true, which only the Inactive table sends.Shared code
formatPercentagein@dub/utilsreplaces three identical local copies (program overview blocks and funnel chart) and the Top programs formatter.Tests
/programssends no Marketplace count requests.inactiveAt.Motivation
On small screens, Recent payouts and Tasks showed directly below the chart, before the earnings cards. The updated mobile layout shows Top programs and Recent earnings first. The share of earnings shows which programs drive the total. The Marketplace counts were extra requests that the Programs page never showed. The Inactive table now has the columns of the design.
UI/Screenshot
Mobile, a 1200px window, desktop (layout unchanged), Top programs, and the Inactive table. The Top programs screenshot adds test programs, because the local data has earnings in one program only.
<img width="390" alt="overview-mobile" src="https://github.com/user-attachments/assets/5b4ff153-2cb4-4cdb-8671-347295bcf1d4" />
<img width="1200" alt="overview-1200" src="https://github.com/user-attachments/assets/a07ed479-53ca-4c5c-b937-fda410b70549" />
<img width="1440" alt="overview-desktop" src="https://github.com/user-attachments/assets/5dca7cea-c467-47e5-9236-f872c972438e" />
<img width="350" alt="top-programs" src="https://github.com/user-attachments/assets/2daba93c-dd56-41f7-ae6e-ea72d9555f49" />
<img width="1440" alt="inactive-table" src="https://github.com/user-attachments/assets/622e598f-bc05-49f6-88e3-01487feb48b8" />
How to test
1. Run
pnpm devinapps/weband log in topartners.localhost:8888as a partner with earnings in a few programs.2. Open
/overviewin the browser device mode at a phone or tablet width. The cards stack in the order above.3. In a 1200px window, the cards show in 2 columns in the same order. At 1440px or wider, the layout is the same as before.
4. In Top programs, check that the percentages add up to 100% (rounded). Change the date range, and they update.
5. Open
/programs, switch tabs and search. The network panel shows no/api/network/programs/countrequest. On/marketplace/all, the sidebar filters still show their counts.6. Ban one partner and deactivate another in a program dashboard. In
/programs?tab=inactiveas each partner, the table shows the reason and the date.7. Run
pnpm exec playwright test playwright/partners/overview.spec.ts playwright/partners/programs.spec.ts --project=partnersandpnpm exec playwright test playwright/api/partner-profile/programs.spec.ts --project=apiinapps/web.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
The Top Programs card shows each program’s share of total earnings, with bars highlighting relative earnings.
Inactive programs display a status reason and the date they became inactive, when available.
Improvements
On mobile, Recent payouts, Tasks, and Top links follow the earnings and program cards; larger-screen layouts retain a side-by-side layout for Recent payouts and the earnings chart.
The earnings chart reflects total earnings for the overview period.
Marketplace filter counts load only when the filter sidebar is shown.
Small percentage values are displayed more clearly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->