Block incomplete profiles from creating discussions#9167
Conversation
Empty profiles could start discussion threads. Gate the "New post" action behind the existing ProfileIncompleteDialog (same pattern as events/messages/friend requests), shown when the profile is incomplete. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MobileInstall the Dev Tool (iOS via TestFlight, iOS Simulator, or Android .apk) here. Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.
Deep linksiOS Android Web (Vercel)View the Vercel web preview for this branch. Backend
Other
|
|
Here are the ones in languages that do not have a translatable version, its only these ones, I verified by clicking all options in the dropdown. @tristanlabelle
|
|
@kevinortiz43 I think we need to validate this on backend as well. Let me know if you need any help with that! |
|
@WouldYouKindly I would like the help regarding backend testing! |
|
@kevinortiz43 Missing translations are not a concern. They happen when they happen, as our volunteer translators have the time to work on them. Until then falling back to English is expected. |
The frontend gate alone is bypassable via gRPC. Mirror the existing pattern (CreateEvent/SendMessage/etc.) and abort CreateDiscussion with FAILED_PRECONDITION for incomplete profiles, with a regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@tristanlabelle sounds good! |
There was a problem hiding this comment.
Hey just blocking this as it's not clear if anyone actually tested this yet? @WouldYouKindly before you approved did you pull the branch and test?
We've had issues with bugs being merged to prod recently and discussed it in the last meeting we really wanna get in the habit of testing (if there is any frontend at least) before approving.
|
@nabramow got you. I haven't tested it, no |
Address review: replace the useEffect + profileDialogOpen state with values derived during render, so both entry points (#new hash, New post button) share one gate and nothing flashes while accountInfo loads. Update the test to mock a complete profile so it exercises the form-open path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@nabramow I have fixed the issues, please let me know if it is able to be merged |
On mobile the dialog is narrow enough that the button labels wrap; the wrapped lines defaulted to left-aligned (e.g. "now" under "Edit your profile"). Add textAlign center so wrapped button text stays centered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@nabramow Yeah you are right I have centered the text in mobile
|
nabramow
left a comment
There was a problem hiding this comment.
This looks good to me now! Merge away!
|
Need to do a follow up story for signing up for event with an incomplete profile. |
📝 Release NotesThis PR should be included in the release notes. Suggested release note: 🤖 Bot Debug InformationModel: |






Prevents users with incomplete profiles from creating new discussion threads in community pages. Previously, a user who had not completed their profile could click "New post" and submit a discussion — an empty/incomplete profile appearing as author of community content. This patch intercepts the action (both the button click and the
#newdeep-link) and shows theProfileIncompleteDialoginstead, consistent with how other profile-gated actions (messaging, adding friends) already work.It also adds server-side enforcement: the frontend gate alone is bypassable via a direct gRPC
CreateDiscussioncall, soCreateDiscussionnow aborts withFAILED_PRECONDITIONfor incomplete profiles — mirroring the existing pattern inCreateEvent/SendDirectMessage/CreateHostRequest/SendFriendRequest/CreatePublicTrip. Fixes Couchers-org/bugs#75.Testing
Web CI gate — GO:
yarn formatclean (prettier + eslint --fix, no changes)tsc --noEmitclean (no type errors)Backend gate:
make mypyclean (Success: no issues found in 454 source files)uv run pytest src/tests/test_discussions.py— 23 passed, including the newtest_create_discussion_incomplete_profile(incomplete-profile token →CreateDiscussion→FAILED_PRECONDITION).Manual in-browser verification:
ProfileIncompleteDialogappears with "…before you can create a discussion…" — correct.#newdeep-link → same dialog intercepts — correct.Backend checklist
developif necessary for linear migration historyWeb frontend checklist
Before

After:

Translation note
This PR adds a single new key (
complete_profile_dialog.actions.create_discussion = "create a discussion") toapp/web/features/profile/locales/en.json. Per the repo's Weblate workflow this string will be picked up and translated into all languages automatically — no manual action needed for the new key itself.However, the broader
complete_profile_dialogblock is currently untranslated in several locales, so the dialog renders in English for users in those languages. Affected locales include zh-Hans zh-Hant the other languages are fine @tristanlabelle — could you advise on the missing Chinese translations specifically? Happy to help coordinate if there's a preferred process for flagging these to translators. I have included a picture of how it looks in different languagesFor maintainers
This PR was created with the Couchers PR skill.