← Back to Pull requests

Add tabs, a list view and an All programs page to partner Bounties #4684

Closed
unknown closed this pull request without merging on Oct 13, 2026 19:56 UTC
View on GitHub
unknown unknown commented on Oct 13, 2026 17:06 UTC
Author

Changes

Fixes https://linear.app/dubinc/issue/ENG-1745/add-a-compact-list-view-for-partner-bounties
Fixes https://linear.app/dubinc/issue/ENG-1769/build-the-all-programs-bounties-page-for-partners

Program Bounties page

  • A tab bar with Active and Completed (with counts) and Expired (no count). The tab is in the URL.

  • A grid/list toggle on the right of the tab bar, remembered in the browser. Until the partner picks a view, the page starts on the list when there are more than 6 active bounties, the same rule as the Programs page.

  • A new PartnerBountiesTable for the list view: Bounty, Expires, Progress and Earnings, sortable by Expires and Earnings, 10 per page.

  • An empty state for each tab.
  • All programs Bounties page

  • New GET /api/partner-profile/bounties returns the bounties of all approved and archived enrollments (archived partners can still submit) with their program. It loads them in one query with one eligibility filter for all enrollments, so the query does not grow with the number of programs, and sums the link stats per program in the database. getBountiesForPartner and the single bounty route use the same code, with the same output.

  • New /bounties page with the same tabs and views, plus a Program column in the list and a program row on the cards. A row opens the bounty in its program.

  • A Bounties item under Engage in the All programs sidebar, with the active count. The sidebar loads the bounties only in the All programs area.

  • /bounties is a partners dashboard path, and bounties is a reserved slug. No production program uses that slug.

  • The page body is a shared PartnerBountiesView, and the bounty card moved to ui/partners/bounties.
  • Shared code

  • getPartnerBountyTab and countPartnerBountiesByTab. The badge and the tabs use the same completed check: the performance target is reached, or the maximum number of submissions is sent. A completed bounty stays in Completed after it ends.

  • The bounty badge shows Completed before Expired or Expiring soon, so it matches the tab. The sidebar count shows Active bounties only.

  • getBountyRewardAmount and formatBountyRewardAmount for the description and the table.

  • isPartnerBountyExpired replaces the repeated expiry checks.

  • SheetTabs accepts tabs without icons, a badge color per tab, and a right slot.
  • Tests

  • Unit tests for the bounty tabs, the tab counts and the reward amount and description.

  • An API test for the new route: enrollment statuses, deactivated programs, archived bounties, group-limited bounties, the program fields and the link stats.
  • Motivation

    The updated design adds a compact list next to the card grid, Completed and Expired tabs, and one Bounties page for all programs.

    UI/Screenshot

    All programs, list and grid:

    <img width="1440" alt="all-bounties-table" src="https://github.com/user-attachments/assets/fad40a4f-19c6-4575-8d35-0fd4f09167e8" />

    <img width="1440" alt="all-bounties-grid" src="https://github.com/user-attachments/assets/4511ac45-5812-4e53-9c1d-d22c5797b021" />

    One program, list and grid (test bounties):

    <img width="1440" alt="bounties-list" src="https://github.com/user-attachments/assets/863f4a76-aebc-4d4d-b8f3-1b0340748ef4" />

    <img width="1440" alt="bounties-grid" src="https://github.com/user-attachments/assets/fd299680-babc-4db7-8ab7-684cca28c917" />

    How to test

    1. Run pnpm dev in apps/web and log in to partners.localhost:8888 as a partner with bounties in two or more programs.
    2. Open /programs/<slug>/bounties. Check the tab counts, switch tabs, and switch between the grid and the list.
    3. Open /bounties from the All programs sidebar. Check that bounties of all approved programs show with their program, and that the counts match the sidebar badge.
    4. In the list, sort by Program, Expires and Earnings, and click a row to open the bounty.
    5. Run pnpm vitest run tests/bounties and pnpm exec playwright test playwright/api/partner-profile/bounties.spec.ts --project=api in apps/web.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Added a Bounties section to the partner dashboard, bringing together bounties across programs with links to their details.
    Browse bounties in grid or table view; sort and paginate the table, and filter by active, completed, or expired status.
    View bounty counts, program details, progress, expiry dates, and reward amounts, including “up to” amounts for capped rewards.
    * Bounty status reflects submission or performance completion, with completed status taking precedence over expiry.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 590 lines (+442 / -148) across 7 files Reviewer: Joker666 Review duration: 169m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 590 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.382
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #4684"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.0% (MEDIUM) · Higher = larger blast radius
    55.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.7% · Safe to merge
    21.7%
    Repository