Skip to content

[TASK-15544] Add inviter name in points page#1299

Merged
Zishan-7 merged 5 commits intopeanut-wallet-devfrom
feat/inviter-name
Oct 8, 2025
Merged

[TASK-15544] Add inviter name in points page#1299
Zishan-7 merged 5 commits intopeanut-wallet-devfrom
feat/inviter-name

Conversation

@Zishan-7
Copy link
Copy Markdown
Contributor

@Zishan-7 Zishan-7 commented Oct 8, 2025

Also contributes to TASK-15697

image image

@Zishan-7 Zishan-7 requested a review from Hugo0 October 8, 2025 17:06
@notion-workspace
Copy link
Copy Markdown

@notion-workspace
Copy link
Copy Markdown

1 similar comment
@notion-workspace
Copy link
Copy Markdown

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 8, 2025

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

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Oct 8, 2025 6:34pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

Adds inviter-related UI and assets: new inviter-heart icon and registration, displays inviter on Points page and in UserHeader, updates EarlyUserModal to async close + refresh user, and extends IUserProfile with invitedBy (string | null).

Changes

Cohort / File(s) Summary
Points page inviter UI
src/app/(mobile-ui)/points/page.tsx
Renders a clickable inviter line when user.invitedBy exists, showing an inviter-heart icon and linking to the inviter’s profile with referral copy.
EarlyUserModal flow and copy
src/components/Global/EarlyUserModal/index.tsx
Makes modal close handler async, updates hasSeenEarlyUserModal then calls fetchUser; updates title and content to invite-focused messaging; now uses fetchUser from useAuth.
Icon registry update
src/components/Global/Icons/Icon.tsx
Imports and registers InviterHeartIcon; adds 'inviter-heart' to IconName and iconComponents.
New inviter-heart icon
src/components/Global/Icons/inviter-heart.tsx
Adds InviterHeartIcon React component exporting an SVG (FC<SVGProps<SVGSVGElement>>).
Updated invite-heart SVG
src/components/Global/Icons/invite-heart.tsx
Replaces the previous compact SVG with a larger multi-path SVG; component API unchanged.
User header inviter badge
src/components/UserHeader/index.tsx
Reads user from useAuth, computes isInviter, and renders an inviter-heart tooltip/icon when the viewer was invited by the profile user; retains existing invited-by indicator.
User profile interface
src/interfaces/interfaces.ts
Adds `invitedBy: string

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Hugo0
  • kushagrasarathe

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely and accurately summarizes the primary change of adding the inviter’s name to the points page, directly reflecting the core update in the PR. It includes the relevant task ID while avoiding unnecessary detail or noise. This makes it clear for reviewers scanning the history to understand the main purpose of the changeset.
Description Check ✅ Passed Although the description consists primarily of an issue reference and image attachments, it remains contextually related to the UI changes implemented in the PR. The included screenshots likely illustrate the new inviter UI on the points page, making it relevant to the described feature. Therefore, the description passes the lenient relevance check.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/inviter-name

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd91737 and 94d5fd6.

📒 Files selected for processing (1)
  • src/components/UserHeader/index.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/UserHeader/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy-Preview

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Oct 8, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aca307e and 35bae2c.

📒 Files selected for processing (7)
  • src/app/(mobile-ui)/points/page.tsx (1 hunks)
  • src/components/Global/EarlyUserModal/index.tsx (2 hunks)
  • src/components/Global/Icons/Icon.tsx (3 hunks)
  • src/components/Global/Icons/invite-heart.tsx (1 hunks)
  • src/components/Global/Icons/inviter-heart.tsx (1 hunks)
  • src/components/UserHeader/index.tsx (3 hunks)
  • src/interfaces/interfaces.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
src/components/UserHeader/index.tsx (3)
src/context/authContext.tsx (1)
  • useAuth (191-197)
src/components/Tooltip/index.tsx (1)
  • Tooltip (18-106)
src/components/Global/Icons/Icon.tsx (1)
  • Icon (207-216)
src/components/Global/Icons/Icon.tsx (1)
src/components/Global/Icons/inviter-heart.tsx (1)
  • InviterHeartIcon (3-23)
src/app/(mobile-ui)/points/page.tsx (1)
src/components/Global/Icons/Icon.tsx (1)
  • Icon (207-216)
src/components/Global/EarlyUserModal/index.tsx (2)
src/context/authContext.tsx (1)
  • useAuth (191-197)
src/app/actions/users.ts (1)
  • updateUserById (12-35)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy-Preview
🔇 Additional comments (6)
src/components/Global/Icons/invite-heart.tsx (1)

5-30: LGTM!

The SVG icon has been updated with a larger, more detailed design. The component signature remains unchanged, ensuring backward compatibility.

src/components/Global/EarlyUserModal/index.tsx (1)

29-29: LGTM!

The updated copy clearly explains the invite-only model and the revenue-sharing structure for invitations.

Also applies to: 35-43

src/interfaces/interfaces.ts (1)

330-330: LGTM!

The invitedBy field properly extends the IUserProfile interface to support the inviter relationship feature.

src/components/UserHeader/index.tsx (1)

62-62: LGTM!

The inviter detection logic correctly identifies when the current viewer is the inviter by comparing usernames with the invitedBy field.

Also applies to: 86-86

src/components/Global/Icons/Icon.tsx (1)

65-65: LGTM!

The new inviter-heart icon is properly registered in the icon system with correct import, type extension, and component mapping.

Also applies to: 132-132, 204-204

src/components/Global/Icons/inviter-heart.tsx (1)

1-23: LGTM!

The new InviterHeartIcon component follows the established pattern for icon components in the codebase, with proper typing and prop forwarding.

Comment thread src/app/(mobile-ui)/points/page.tsx
Comment thread src/components/Global/EarlyUserModal/index.tsx
Comment thread src/components/UserHeader/index.tsx
Comment thread src/app/(mobile-ui)/points/page.tsx
Comment thread src/components/Global/EarlyUserModal/index.tsx
Comment thread src/components/Global/EarlyUserModal/index.tsx
Comment thread src/components/Global/EarlyUserModal/index.tsx
Comment thread src/components/Global/Icons/invite-heart.tsx
Comment thread src/components/UserHeader/index.tsx Outdated
@Zishan-7 Zishan-7 merged commit 00b083b into peanut-wallet-dev Oct 8, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants