Skip to content

Partner referrals#3858

Merged
steven-tey merged 136 commits into
mainfrom
partner-referrals
May 16, 2026
Merged

Partner referrals#3858
steven-tey merged 136 commits into
mainfrom
partner-referrals

Conversation

@devkiran

@devkiran devkiran commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • New Features

    • Added partner referral system with referral tracking, analytics, and shareable referral links
    • Introduced referral rewards and referral commission types with configurable triggers
    • Launched network program for partner marketplace and referrals
    • Added partner username field and referral relationship tracking
  • Improvements

    • Enhanced commission filtering and aggregation logic
    • Updated message and program filtering for network program exclusion
    • Improved reward icon and description formatting

Review Change Stack

@vercel

vercel Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dub Ready Ready Preview May 16, 2026 0:01am

Request Review

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 159 files, which is 9 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1bbaa721-f32a-4ab3-8ec8-f3c2d3a420b7

📥 Commits

Reviewing files that changed from the base of the PR and between 263fff9 and a79b65e.

📒 Files selected for processing (159)
  • apps/web/app/(ee)/admin.dub.co/(dashboard)/partners/network/network-partner-application-sheet.tsx
  • apps/web/app/(ee)/admin.dub.co/(dashboard)/partners/network/network-partner-change-history-item.tsx
  • apps/web/app/(ee)/admin.dub.co/(dashboard)/partners/network/network-partner-change-history.tsx
  • apps/web/app/(ee)/admin.dub.co/(dashboard)/partners/network/page.tsx
  • apps/web/app/(ee)/admin.dub.co/(dashboard)/programs/program-categories-list.tsx
  • apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts
  • apps/web/app/(ee)/api/cron/commissions/referrals/create/route.ts
  • apps/web/app/(ee)/api/cron/commissions/referrals/queue/route.ts
  • apps/web/app/(ee)/api/cron/partners/auto-reject/route.ts
  • apps/web/app/(ee)/api/cron/payouts/aggregate-due-commissions/route.ts
  • apps/web/app/(ee)/api/cron/payouts/charge-succeeded/send-paypal-payouts.ts
  • apps/web/app/(ee)/api/groups/[groupIdOrSlug]/route.ts
  • apps/web/app/(ee)/api/groups/route.ts
  • apps/web/app/(ee)/api/network/programs/route.ts
  • apps/web/app/(ee)/api/partner-profile/messages/count/route.ts
  • apps/web/app/(ee)/api/partner-profile/programs/[programId]/referrals/count/route.ts
  • apps/web/app/(ee)/api/partner-profile/programs/[programId]/referrals/route.ts
  • apps/web/app/(ee)/api/partner-profile/programs/[programId]/route.ts
  • apps/web/app/(ee)/api/partner-profile/programs/count/route.ts
  • apps/web/app/(ee)/api/partner-profile/programs/route.ts
  • apps/web/app/(ee)/api/partner-profile/referrals/route.ts
  • apps/web/app/(ee)/api/partner-profile/referrals/stats/route.ts
  • apps/web/app/(ee)/api/partner-profile/referrals/timeseries/route.ts
  • apps/web/app/(ee)/api/partners/[partnerId]/referral/route.ts
  • apps/web/app/(ee)/api/track/application/route.ts
  • apps/web/app/(ee)/api/workflows/partner-approved/route.ts
  • apps/web/app/(ee)/app.dub.co/embed/referrals/get-referrals-embed-data.ts
  • apps/web/app/(ee)/app.dub.co/embed/referrals/page-client.tsx
  • apps/web/app/(ee)/partners.dub.co/(auth-login-register)/(generic)/register/page-client.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/payouts/partner-payout-details-sheet.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/profile-details-form.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/earnings/earnings-composite-chart.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/earnings/earnings-table.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/referrals/page-client.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/referrals/page.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/apply/program-sidebar.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/invite/page.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/marketplace/use-program-network-filters.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/referrals/page-client.tsx
  • apps/web/app/(ee)/partners.dub.co/(dashboard)/referrals/page.tsx
  • apps/web/app/(ee)/partners.dub.co/(onboarding)/onboarding/onboarding-form.tsx
  • apps/web/app/api/og/program/route.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/analytics/commissions-analytics-chart.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/add-edit-bounty-sheet.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/confirm-create-bounty-modal.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/[commissionId]/page.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/rewards/group-rewards.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/links/page.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/use-partner-filters.tsx
  • apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/payouts/[payoutId]/page.tsx
  • apps/web/lib/actions/partners/ban-partner.ts
  • apps/web/lib/actions/partners/bulk-approve-partners.ts
  • apps/web/lib/actions/partners/bulk-ban-partners.ts
  • apps/web/lib/actions/partners/bulk-invite-partners.ts
  • apps/web/lib/actions/partners/bulk-reject-partner-applications.ts
  • apps/web/lib/actions/partners/create-program-application.ts
  • apps/web/lib/actions/partners/create-reward.ts
  • apps/web/lib/actions/partners/generate-lander.ts
  • apps/web/lib/actions/partners/onboard-partner.ts
  • apps/web/lib/actions/partners/trigger-aggregate-due-commissions.ts
  • apps/web/lib/actions/partners/update-partner-profile.ts
  • apps/web/lib/actions/partners/update-reward.ts
  • apps/web/lib/api/activity-log/get-resource-diff.ts
  • apps/web/lib/api/activity-log/track-reward-activity-log.ts
  • apps/web/lib/api/groups/get-group-or-throw.ts
  • apps/web/lib/api/groups/move-partners-to-group.ts
  • apps/web/lib/api/partner-profile/get-earnings-for-partner.ts
  • apps/web/lib/api/partners/applications/approve-partner.ts
  • apps/web/lib/api/partners/applications/reject-partner.ts
  • apps/web/lib/api/partners/bulk-reactivate-partners.ts
  • apps/web/lib/api/partners/create-and-enroll-partner.ts
  • apps/web/lib/api/partners/generate-partner-username.ts
  • apps/web/lib/api/partners/get-group-rewards-and-bounties.ts
  • apps/web/lib/api/partners/get-partners-count.ts
  • apps/web/lib/api/partners/notify-partner-commission.ts
  • apps/web/lib/api/partners/process-partner-deactivation.ts
  • apps/web/lib/api/partners/program-enrollment-query.ts
  • apps/web/lib/api/rewards/validate-reward.ts
  • apps/web/lib/api/workflows/execute-move-group-workflow.ts
  • apps/web/lib/application-events/mark-application-event-submitted-network.ts
  • apps/web/lib/auth/partner.ts
  • apps/web/lib/cron/enqueue-batch-jobs.ts
  • apps/web/lib/fetchers/get-network-program.ts
  • apps/web/lib/fetchers/get-program.ts
  • apps/web/lib/firstpromoter/import-partners.ts
  • apps/web/lib/middleware/utils/app-redirect.ts
  • apps/web/lib/partner-referrals/constants.ts
  • apps/web/lib/partner-referrals/create-network-referral-commission.ts
  • apps/web/lib/partner-referrals/create-referral-commission.ts
  • apps/web/lib/partner-referrals/hooks/use-network-referrals-stats.ts
  • apps/web/lib/partner-referrals/hooks/use-network-referrals-timeseries.ts
  • apps/web/lib/partner-referrals/hooks/use-network-referrals.ts
  • apps/web/lib/partner-referrals/hooks/use-partner-referral.ts
  • apps/web/lib/partner-referrals/hooks/use-referred-partner-filters.tsx
  • apps/web/lib/partner-referrals/hooks/use-referred-partners-count.ts
  • apps/web/lib/partner-referrals/hooks/use-referred-partners.ts
  • apps/web/lib/partner-referrals/schemas.ts
  • apps/web/lib/partner-referrals/types.ts
  • apps/web/lib/partner-referrals/utils.ts
  • apps/web/lib/partners/constuct-webhook-partner.ts
  • apps/web/lib/partners/create-partner-commission.ts
  • apps/web/lib/partners/create-stablecoin-payout.ts
  • apps/web/lib/partners/create-stripe-transfer.ts
  • apps/web/lib/partners/query-link-structure-help-text.tsx
  • apps/web/lib/partners/sort-rewards-by-event-order.ts
  • apps/web/lib/partnerstack/import-partners.ts
  • apps/web/lib/plan-capabilities.ts
  • apps/web/lib/rewardful/import-partners.ts
  • apps/web/lib/stripe/create-connected-account.ts
  • apps/web/lib/swr/use-commission-analytics.ts
  • apps/web/lib/types.ts
  • apps/web/lib/webhook/sample-events/partner-enrolled.json
  • apps/web/lib/zod/schemas/activity-log.ts
  • apps/web/lib/zod/schemas/groups.ts
  • apps/web/lib/zod/schemas/partners.ts
  • apps/web/lib/zod/schemas/programs.ts
  • apps/web/lib/zod/schemas/rewards.ts
  • apps/web/playwright/partners/onboarding.spec.ts
  • apps/web/scripts/dev/data.json
  • apps/web/scripts/dev/seed-application-events.ts
  • apps/web/scripts/dev/seed-commissions.ts
  • apps/web/scripts/dev/seed-partner-enrollment.ts
  • apps/web/scripts/dev/seed.ts
  • apps/web/scripts/dev/test-partner-referrals.ts
  • apps/web/scripts/migrations/backfill-partner-usernames.ts
  • apps/web/scripts/partners/fix-partner-groups.ts
  • apps/web/scripts/programs/bulk-star-partners.ts
  • apps/web/tests/partner-groups/index.test.ts
  • apps/web/ui/activity-logs/activity-feed.tsx
  • apps/web/ui/layout/sidebar/partners-sidebar-nav.tsx
  • apps/web/ui/partners/comission-type-icon.tsx
  • apps/web/ui/partners/commission-type-badge.tsx
  • apps/web/ui/partners/constants.ts
  • apps/web/ui/partners/format-reward-description.ts
  • apps/web/ui/partners/lander/lander-rewards.tsx
  • apps/web/ui/partners/partner-info-cards.tsx
  • apps/web/ui/partners/partner-platforms-form.tsx
  • apps/web/ui/partners/program-marketplace/program-rewards-display.tsx
  • apps/web/ui/partners/program-marketplace/programs-promo-banner.tsx
  • apps/web/ui/partners/program-marketplace/programs-promo-card.tsx
  • apps/web/ui/partners/program-reward-description.tsx
  • apps/web/ui/partners/program-reward-list.tsx
  • apps/web/ui/partners/program-rewards-panel.tsx
  • apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx
  • apps/web/ui/partners/rewards/partner-referral-reward-builder.tsx
  • apps/web/ui/partners/rewards/reward-event-icon.tsx
  • apps/web/ui/partners/rewards/reward-preview-card.tsx
  • packages/email/src/templates/new-commission-alert-partner.tsx
  • packages/prisma/schema/application.prisma
  • packages/prisma/schema/commission.prisma
  • packages/prisma/schema/group.prisma
  • packages/prisma/schema/partner.prisma
  • packages/prisma/schema/program.prisma
  • packages/prisma/schema/reward.prisma
  • packages/ui/src/icons/nucleo/index.ts
  • packages/ui/src/icons/nucleo/nodes-4.tsx
  • packages/ui/src/icons/nucleo/user-arrow-left.tsx
  • packages/utils/src/constants/main.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR refactors partner country handling, identity verification, and profile management. Country changes move to a new admin API; identity verification now gates on networkStatus instead of payout thresholds; the partner profile form gains username editing with rate limiting and removes country/Stripe-confirmation workflows; and the program enrollment page uses a new RewardList component for unified reward rendering.

Changes

Partner country management and identity verification refactoring

Layer / File(s) Summary
Schema and type changes for country removal
apps/web/lib/zod/schemas/partners.ts, apps/web/lib/stripe/create-connected-account.ts
Partner schemas now omit country from onboarding, add username to enrolled schema, and adjust Stripe account typing to make country an explicit intersection type.
Admin country change endpoint
apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts
New PATCH handler validates country changes, appends to partner change history, conditionally triggers Veriff re-verification via Qstash, and clears Stripe connected account when needed.
Partner profile action updates
apps/web/lib/actions/partners/update-partner-profile.ts
Adds username change rate limiting (5 per hour), removes country update logic, eliminates country-change history/Stripe cleanup, and simplifies compliance field checks to profile type only.
Profile details form refactoring
apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/profile-details-form.tsx, apps/web/ui/partners/partner-platforms-form.tsx
Removes country-change warning modal, enables username field with validation/helper text, refactors form submission (separate onSubmitAction callback), simplifies tooltips, and updates success/error toast messaging.
Promo cards identity verification gating
apps/web/ui/partners/program-marketplace/programs-promo-banner.tsx, apps/web/ui/partners/program-marketplace/programs-promo-card.tsx
Switches identity verification display from payout-based conditions to partner.networkStatus (approved/trusted); removes stablecoin payout banner logic.
Program enrollment page rewards UI
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx
Introduces RewardsTermsList, RewardList, and RewardListItem components to unify standard and referral reward rendering; replaces inline referral-link UI with cohesive card-based layout.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • dubinc/dub#3678: Modifies same bulk rejection transaction that now also clears referralRewardId as part of enrollment cleanup.
  • dubinc/dub#3730: Updates identity verification promo rendering affected by payout-count threshold removal in this PR.
  • dubinc/dub#3666: Overlaps with due-commissions cron route commission processing logic changes.

Suggested reviewers

  • steven-tey
  • pepeladeira

🐇 A country change walks into a form—username takes the stage,
No more Stripe surprises, just a cleaner page!
Verify by network, not by payout flow,
Rewards in a card deck: a unified show! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch partner-referrals

devkiran added 2 commits May 7, 2026 10:11
- Added validation for referral rewards in `validate-reward.ts`, ensuring proper handling of modifiers and configuration.
- Updated `referralRewardConfigSchema` to use `commissionsThresholdInCents` instead of `thresholdInCents`.
- Enhanced `PartnerReferralRewardBuilder` to accommodate new configuration structure and validation logic.
- Adjusted UI components to reflect changes in referral reward configuration handling.
@steven-tey

Copy link
Copy Markdown
Collaborator

@coderabbitai final review, any breaking changes, security issues, inefficient code?

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

@steven-tey Here's a focused analysis of the Partner referrals PR across the three areas you asked about:


🔴 Breaking Changes

1. isFirstCommission Made Optional — Silent Email Suppression

File: apps/web/lib/api/partners/notify-partner-commission.ts

isFirstCommission was changed from boolean (required) to boolean? (optional). Any call site that omits this parameter will now silently suppress the "new sale" emails to workspace owners (commission.type === "sale" && isFirstCommission evaluates to false when isFirstCommission is undefined). This is a behavioral breaking change for existing callers.

2. REWARD_EVENTS Constant Removed

File: apps/web/ui/partners/constants.ts

The exported REWARD_EVENTS constant (with click, lead, sale icon/text/event metadata) was fully removed. Replaced by REWARD_EVENT_ICON, but any code outside the migrated set that still imports REWARD_EVENTS will break at compile time.

3. onboardPartnerSchema No Longer Includes country

File: apps/web/lib/zod/schemas/partners.ts

country was omitted from onboardPartnerSchema. Any existing client or API integration that sends country during onboarding will have it silently dropped (Zod strips unknown fields). Pair this with createConnectedAccount's signature change — country is now a separate { country: string } parameter rather than part of the schema pick — which requires callers to be updated.

4. QueryLinkStructureHelpText Spacing Removed

File: apps/web/lib/partners/query-link-structure-help-text.tsx

The mt-1.5 margin was removed from the component's base class and must now be passed in via className. The embed referrals page already patches this with className="mt-1.5", but other call sites should be audited.


🔒 Security Issues

1. Silent Error Swallowing in markApplicationEventSubmittedNetwork

File: apps/web/lib/application-events/mark-application-event-submitted-network.ts

The entire function body is wrapped in try/catch {} with no logging, no rethrow, and no error capture. This means:

  • Failed DB writes (partner referredByPartnerId updates, customer creation) fail silently
  • Attribution data loss goes completely undetected
  • Bugs in this path will be invisible in production

Recommendation: At minimum, add console.error(e) or a log() call in the catch block.

2. Destructive Admin Endpoint — No Confirmation

File: apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts (new PATCH handler)

The new admin country-change endpoint deletes the partner's Stripe connected account (stripe.accounts.del(...)) and clears stripeConnectId. This is irreversible. The API performs the deletion after a simple 400 guard (already in that country), but there is no:

  • Idempotency check or soft-delete step
  • Audit trail beyond the changeHistoryLog append
  • Protection against concurrent requests racing to delete the same account

Recommendation: Wrap in a distributed lock or check stripeConnectId is still set just before deletion.

3. withPartnerProfile Network Program Guard

File: apps/web/lib/auth/partner.ts

The guard correctly throws not_found when params.programId matches NETWORK_PROGRAM_ID or NETWORK_PROGRAM_SLUG. Ensure this path also covers the [programId] used in the new referrals sub-routes (/programs/[programId]/referrals/*) to prevent partners from accessing network program data through those endpoints.


⚡ Inefficient Code

1. N+1-Style Queries in the Referrals List Endpoint

File: apps/web/app/(ee)/api/partner-profile/referrals/route.ts

After fetching the referred partners list, the handler fires two additional groupBy queries (total earnings per sourcePartnerId, active program count per partnerId). For a page of 100 partners, this is 3 round trips every page load:

findMany → referred partners
groupBy  → referral earnings (100 results)
groupBy  → active program counts (100 results)

Recommendation: Consider combining these into a single query with $queryRaw or restructuring the data model to precompute aggregates (e.g., denormalized counters on the partner record).

2. createReferralCommission — 466-Line Monolith

File: apps/web/lib/partner-referrals/create-referral-commission.ts

This function has multiple sequential DB queries, complex branching across 5+ trigger types, and 4 post-create side effects via Promise.allSettled. It's very difficult to test individual code paths and will be hard to maintain. Consider extracting resolveReferralContext, computeEarnings, and runPostCreateEffects into separate testable helpers.

3. generatePartnerUsername — Serial Retry Loop

File: apps/web/lib/api/partners/generate-partner-username.ts

The function retries username uniqueness checks in a serial loop (one findUnique per attempt). Under high concurrency (e.g., bulk partner imports), this could result in many sequential DB round trips. A createOrUpdate pattern with a unique constraint catch (P2002) would be more efficient.

4. Three Independent SWR Hooks for Referral Stats

Files: use-network-referrals-stats.ts, use-network-referrals-timeseries.ts, use-network-referrals-count.ts

These make 3 separate API calls on the referrals dashboard. Since they're all enabled together based on the same profileReady && isEligible condition, consider consolidating into a single /api/partner-profile/referrals/summary endpoint to reduce waterfall latency.

5. backfill-partner-usernames.ts — Double DB Round Trip Per Batch

File: apps/web/scripts/migrations/backfill-partner-usernames.ts

The batch script derives usernames, deduplicates within the batch, then makes another DB query to find conflicts, then potentially another suffix. A simpler approach would be to attempt updateMany with skipDuplicates using the unique constraint, relying on P2002 to handle any remaining conflicts.


Summary Table:

Category Count Severity
Breaking Changes 4 Medium–High
Security Issues 3 Medium–High
Inefficient Code 5 Low–Medium

The most urgent items before merge are: (1) the silent catch {} in markApplicationEventSubmittedNetwork, (2) auditing the isFirstCommission optional change for suppressed emails, and (3) the destructive Stripe delete in the admin PATCH endpoint.

✅ Actions performed

Full review triggered.

@steven-tey

Copy link
Copy Markdown
Collaborator

@coderabbitai review my latest changes

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

@steven-tey: Sure! I'll kick off a fresh review of your latest changes to the Partner referrals PR now.

✅ Actions performed

Full review triggered.

@steven-tey

Copy link
Copy Markdown
Collaborator

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@steven-tey

Copy link
Copy Markdown
Collaborator

@coderabbitai full review, any breaking changes?

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

@steven-tey Here's a focused summary of the breaking changes in this PR:


🔴 Breaking Changes

# File Change Risk
1 notify-partner-commission.ts isFirstCommission changed from required boolean → optional boolean?. Callers omitting it will silently suppress "new sale" workspace-owner emails. High
2 ui/partners/constants.ts REWARD_EVENTS export fully removed. Any consumer outside the migrated set still importing it will break at compile time. High
3 zod/schemas/partners.ts country omitted from onboardPartnerSchema. Existing clients sending country during onboarding will have it silently dropped (Zod strips unknown fields). Medium
4 query-link-structure-help-text.tsx mt-1.5 margin removed from the base class; must now be passed via className. The embed page is already patched, but other call sites may lose spacing. Low

🔒 Top Security Concern (unchanged)

markApplicationEventSubmittedNetwork.ts — The entire function body is wrapped in try/catch {} with no logging or rethrow. Failed attribution writes (partner referredByPartnerId, customer creation) fail completely silently. At minimum, add a console.error(e) in the catch block.


Triggering a full review now to cover any changes since the last pass.

✅ Actions performed

Full review triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants