Skip to content

[frontend] Show profile-incomplete dialog when adding a friend - #8521

Merged
aapeliv merged 1 commit into
developfrom
web/feature/incomplete-profile-friend-request
May 13, 2026
Merged

[frontend] Show profile-incomplete dialog when adding a friend#8521
aapeliv merged 1 commit into
developfrom
web/feature/incomplete-profile-friend-request

Conversation

@aapeliv

@aapeliv aapeliv commented May 10, 2026

Copy link
Copy Markdown
Member

Stacked on top of #8520. Apply the same client-side incomplete-profile gate to the friend-request action that already exists for messaging and host requests: clicking "Add friend" with an incomplete profile now opens `ProfileIncompleteDialog` instead of firing the request and showing the backend error.

Changes:

  • Extend `ProfileIncompleteDialog`'s `attempted_action` union with `send_friend_request`.
  • Add the matching `send_friend_request` label to `features/dashboard/locales/en.json`.
  • Wire `useAccountInfo` into `AddFriendButton` and gate the mutation on `profileComplete`, mirroring `MessageUserButton`.

Testing

  • `yarn test --testPathPattern AddFriendButton` — 5/5 passing, including a new "pops up incomplete profile note if profile is incomplete" case.
  • `yarn lint:fix` and `yarn format` clean.
  • Existing `MessageUserButton` / `ProfileIncompleteDialog` tests still pass.

Web frontend checklist

  • There are no console warnings when running the app
  • Added tests where relevant
  • Clicked around my changes running locally and it works
  • Checked Desktop, Mobile and Tablet screen sizes

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

This PR was created with the Couchers PR skill.

Mirror the existing message/host-request flows: gate the AddFriendButton
on the user's profile completeness and pop the ProfileIncompleteDialog
with the new send_friend_request action when it isn't complete.
@aapeliv
aapeliv requested a review from nabramow as a code owner May 10, 2026 03:59
@vercel

vercel Bot commented May 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview May 10, 2026 4:01am

Request Review

@aapeliv aapeliv changed the title Show profile-incomplete dialog when adding a friend [frontend] Show profile-incomplete dialog when adding a friend May 10, 2026
tristanlabelle
tristanlabelle previously approved these changes May 12, 2026
Base automatically changed from backend/feature/incomplete-profile-friend-request to develop May 13, 2026 02:33
@aapeliv
aapeliv dismissed tristanlabelle’s stale review May 13, 2026 02:33

The base branch was changed.

@aapeliv
aapeliv merged commit d252d30 into develop May 13, 2026
7 checks passed
@aapeliv
aapeliv deleted the web/feature/incomplete-profile-friend-request branch May 13, 2026 02:34
@github-actions github-actions Bot added the release notes: pending Add to stuff that should be included in release notes label May 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR should be included in the release notes.

Suggested release note:

Improved friend requests by showing a clear prompt to complete your profile before sending one
🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: include
Reasoning: This is a noticeable user-facing UX improvement: instead of failing with a backend error, users with incomplete profiles now get a clear dialog explaining they need to complete their profile before sending a friend request. It affects a core social action and improves the experience around an important platform rule.

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

Labels

release notes: pending Add to stuff that should be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants