Skip to content

Support row-level spend/merchant targets in referral rewards - #2571

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/monday-tasks-review-fixes-6xxe0w
Sep 24, 2026
Merged

MusabShakeel576 merged 1 commit into
masterfrom
claude/monday-tasks-review-fixes-6xxe0w

Conversation

@MusabShakeel576

@MusabShakeel576 MusabShakeel576 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds support for row-level spend and merchant targets in the referral rewards list, allowing each friend's progress to be measured against the bar they cleared rather than the current program-level targets.

Key Changes

  • Added optional spendTargetUsd and merchantTarget fields to ReferralRewardListItem type to support per-row targets from the API
  • Updated ReferralFriendRow component to use row-level targets when available, falling back to program-level targets for backward compatibility with older API versions
  • Renamed component props from spendTargetUsd/merchantTarget to programSpendTargetUsd/programMerchantTarget to clarify they are program-level defaults

Implementation Details

The change addresses a UX issue where friends who qualified under an older (lower) target would show progress like "$80/$150 spent" next to a "Qualified" status, which appears incorrect. Now, qualified friends are measured against the bar they actually cleared, which may be lower than today's target. The implementation maintains backward compatibility by using program-level targets when the API doesn't provide row-level targets.

https://claude.ai/code/session_01C4DDGA1KnJ6ADwWHFgUX4Q


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The referral target moved from $75 to $150 while rewards that qualified on $75
were still in their 30-day payout delay. Their rows read "$145.63/$150 spent"
next to "Qualified", which looked like a mistake and was reported as one.

The referral summary now sends each row's own bar (spendTargetUsd,
merchantTarget): the one a qualified friend cleared, today's for everyone else.
The row uses it for the spent line, the "to go" chip and the progress bar, and
falls back to the program-level target when talking to a backend that doesn't
send it yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C4DDGA1KnJ6ADwWHFgUX4Q
@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Sep 24, 2026 6:42am UTC
solid-app-staging Ignored Ignored Sep 24, 2026 6:42am UTC

Request Review

@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@MusabShakeel576
MusabShakeel576 merged commit d19649a into master Sep 24, 2026
7 checks passed
@MusabShakeel576
MusabShakeel576 deleted the claude/monday-tasks-review-fixes-6xxe0w branch September 24, 2026 08:20
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