fix: display flat $150 USD for RHF peer-review bounty notifications#750
Conversation
- Add getBountyForYouUsdOverride function to check for peer-review bounties - Use FOUNDATION_BOUNTY_FLAT_USD (150) for REVIEW type bounties - Apply override in formatNotificationMessage for consistent display - Apply override in CurrencyBadge with isUSD and skipConversion props
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@flaggdavid-source is attempting to deploy a commit to the ResearchHub Team on Vercel. A member of the Team first needs to authorize it. |
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2298d93. Configure here.
| size="xs" | ||
| variant={isReceivedRSC ? 'received' : 'badge'} | ||
| showText | ||
| isUSD={bountyForYouUsdOverride !== null} |
There was a problem hiding this comment.
Wrong prop name isUSD — CurrencyBadge expects currency
High Severity
The CurrencyBadge component expects a currency prop ('RSC' | 'USD') to determine if it should display USD, but the isUSD prop is passed instead. Since isUSD is not recognized, it's silently ignored, causing the badge to default to showing RSC and defeating the intent to display USD for bounty overrides.
Reviewed by Cursor Bugbot for commit 2298d93. Configure here.
| variant={isReceivedRSC ? 'received' : 'badge'} | ||
| showText | ||
| isUSD={bountyForYouUsdOverride !== null} | ||
| skipConversion={bountyForYouUsdOverride !== null} |
There was a problem hiding this comment.
Badge guard ignores override when RSC amount missing
Medium Severity
The CurrencyBadge only renders when rscAmount is truthy. This prevents the badge from appearing for BOUNTY_FOR_YOU notifications when rscAmount is null or zero, even if bountyForYouUsdOverride has a value. Users see the amount in the message but no corresponding badge.
Reviewed by Cursor Bugbot for commit 2298d93. Configure here.





Summary
Adjusts bounty notification display so RHF-sponsored peer review bounty prompts show a flat
$150 USDamount instead of derived variable amounts.Changes
getBountyForYouUsdOverridefunction to check if notification is a peer-review bounty (BOUNTY_FOR_YOU+bounty_type: REVIEW)FOUNDATION_BOUNTY_FLAT_USD(150) when override appliesformatNotificationMessageto show$150 USDin the messageNotificationItem.tsxCurrencyBadge withisUSDandskipConversionprops to ensure message and badge stay consistentFiles Modified
components/Notification/lib/formatNotification.ts- Added import, new function, and updated BOUNTY_FOR_YOU casecomponents/Notification/NotificationItem.tsx- Added import and updated CurrencyBadge propsTesting
FOUNDATION_BOUNTY_FLAT_USDis used in bountyUtil.ts)Note
Low Risk
Low risk UI formatting change limited to
BOUNTY_FOR_YOUpeer-review notifications; main risk is inconsistent currency display if the override logic misfires on unexpectedextra.bounty_typevalues.Overview
Peer-review bounty notifications now show a flat Foundation amount. For
BOUNTY_FOR_YOUnotifications withbounty_type: REVIEW, the message formatter usesFOUNDATION_BOUNTY_FLAT_USD(150) instead of deriving USD from the notification amount and exchange rate.Badge display is kept consistent with the message.
NotificationItemapplies the same override toCurrencyBadge, forcing USD display and bypassing conversion (skipConversion) when the flat amount is used.Reviewed by Cursor Bugbot for commit 2298d93. Bugbot is set up for automated code reviews on this repo. Configure here.