Skip to content

fix: display flat $150 for RHF peer-review bounty notifications#749

Open
jeevan6996 wants to merge 9 commits into
ResearchHub:mainfrom
jeevan6996:fix/rhf-peer-review-bounty-display
Open

fix: display flat $150 for RHF peer-review bounty notifications#749
jeevan6996 wants to merge 9 commits into
ResearchHub:mainfrom
jeevan6996:fix/rhf-peer-review-bounty-display

Conversation

@jeevan6996

@jeevan6996 jeevan6996 commented Apr 7, 2026

Copy link
Copy Markdown

Summary

Display a flat $150 USD amount for ResearchHub Foundation-sponsored peer-review bounty notifications instead of converting the variable RSC amount.

Closes ResearchHub/issues#342.

Depends on ResearchHub/researchhub-backend#3815, which adds the bounty creator ID required to distinguish Foundation bounties from user-created review bounties.

Changes

  • recognize only BOUNTY_FOR_YOU + REVIEW notifications created by FOUNDATION_USER_ID
  • use FOUNDATION_BOUNTY_FLAT_USD for the notification message
  • normalize bounty_creator_id from notification metadata
  • preserve the normal converted amount for non-Foundation review bounties

Files

  • components/Notification/lib/formatNotification.ts
  • types/notification.ts

Testing

Full frontend type-check could not run from the current local install because compiler dependencies are absent and a clean install requires the private Tiptap registry credentials.

Deployment

The remaining Vercel failure requires ResearchHub team authorization; it is not a build result.

@jeevan6996
jeevan6996 requested a review from a team as a code owner April 7, 2026 07:14
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@jeevan6996 is attempting to deploy a commit to the ResearchHub Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread components/Notification/NotificationItem.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dfde721. Configure here.

Comment thread components/Notification/lib/formatNotification.ts
@jeevan6996

Copy link
Copy Markdown
Author

Implemented the Cursor feedback and pushed an update to keep bounty messaging consistent: is now applied regardless of , so the badge/value no longer diverges from the notification message in peer-review bounty cases.

@jeevan6996

Copy link
Copy Markdown
Author

Correction: implemented the Cursor feedback and pushed an update to keep bounty messaging consistent. The bountyUsdOverride value is now applied regardless of showUSD, so the badge/value no longer diverges from the notification message in peer-review bounty cases.

@cursor

cursor Bot commented Apr 11, 2026

Copy link
Copy Markdown

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@jeevan6996

Copy link
Copy Markdown
Author

Quick follow-up: Sonar checks are green; the remaining blocker is Vercel authorization for this repo/team integration. If a team member can authorize the deployment integration, this PR should be unblocked for normal review.

@sonarqubecloud

Copy link
Copy Markdown

@jeevan6996

Copy link
Copy Markdown
Author

Quick status check from my side: code changes are complete, and the remaining failure is Vercel. If a maintainer can help with deployment authorization/trigger, I can handle any follow-up changes immediately.

@jeevan6996

Copy link
Copy Markdown
Author

Addressed the remaining Cursor finding in commit 3034936: the flat USD override now only applies to BOUNTY_FOR_YOU review notifications when the notification extra identifies the bounty creator as the configured ResearchHub Foundation user. This avoids applying the Foundation display to non-Foundation review bounties.

Local verification: formatted the touched files and ran git diff --check. Full npm type-check could not be completed locally because npm ci is blocked by the private Tiptap Pro registry credentials (403 from registry.tiptap.dev). The current PR check failure remains Vercel authorization required for the ResearchHub team deployment.

@sonarqubecloud

Copy link
Copy Markdown

@jeevan6996 jeevan6996 changed the title fix: display flat for RHF peer-review bounty notifications fix: display flat $150 for RHF peer-review bounty notifications Jul 18, 2026
@jeevan6996

Copy link
Copy Markdown
Author

Cross-checking the frontend guard against the backend notification producer found that BOUNTY_FOR_YOU metadata does not currently include bounty_creator_id. I opened ResearchHub/researchhub-backend#3815 to add that field in both producer paths, with a passing regression test.

Until the backend dependency is deployed, this frontend guard safely falls back to the existing converted amount. New notifications carrying the creator ID will use the flat $150 USD display only for Foundation review bounties; user-created review bounties remain unchanged.

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.

RHF bounty dollar amount display

1 participant