Block incomplete profiles from commenting on all threads#9233
Conversation
Gate the shared Threads.PostReply RPC on event threads with has_completed_profile (mirroring the CreateDiscussion/CreateEvent precondition pattern), and surface ProfileIncompleteDialog on the event comment box via an opt-in attemptedAction prop threaded EventPage -> CommentTree -> CommentForm. Scoped to events only: discussions, groups, and pages share the same comment components/RPC and are unaffected. Also remove a negative top margin on the community/discussion PageHeader that let the full-bleed map cover the push-notification banner. 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
|
|
What is the motivation for this change? Sorry I don't remember. I'm not sure why we have an exception for events: why not implement for all threads? Also I feel like empty profiles posting on events is not much of an issue (it may get people to join, then complete profile later)? |
We talked about it at the last meeting and Nick said moderation-wise he felt it was an issue so we decided to do it. I might have missed something re: threads. Are you saying to do the logic upstream? |
|
@aapeliv In my research we can implement it for all threads, but the specific task was to "only prevent from commenting on events" since we already had another story to prevent commenting on discussions. So you want it prevented for any type of comments? |
|
@aapeliv would you like to me implement this for all threads? |
|
Block on all threads suggestion by Aapeli on 7/10/2026 during Couchers stand up |
Generalize the incomplete-profile comment gate from event-only to every thread (events, discussions, groups, guides, places). PostReply now enforces has_completed_profile unconditionally as the single backend choke point, and the frontend shows the profile-incomplete dialog on both comment components (CommentForm and NewComment) with a generic "post a comment" message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Hey @kevinortiz43 just a tip for the future to help your PRs get reviewed faster as I'm noticing a trend. The description, etc. looks very AI-heavy, lots of jargon and hard to read, and feels like a wall of text at first open, more text than needed for something simple like this, which makes it overwhelming. Please keep your human readers in mind! Try to put it in your own words in the future, make sure you understand what AI did, and keep it more in the tone of "what does the reviewer actually need to know to review this?", why you made certain decisions, etc. Otherwise it puts the burden on the reviewer to parse through everything and figure out what's going on, and when we see something very AI-heavy, it doesn't elicit trust that you know what's going on, which makes it feel like we need to have extra attention to detail when reviewing, which also takes more time. |
|
@nabramow understood I will rework the description of my pull requests. I have a few open ones right now would you like me to rework the descriptions and resubmit them? |
That would be great if you don't mind! |
|
@nabramow can do, also regarding the sunflower drop, I believe the deadline for that is tomorrow. I will get the PR descriptions fixed by then but I did want to move fast to try and meet the deadline. Should we move that deadline to the right? or are we going to speak more about it on Friday? |
It's okay we can just miss the deadline as long as we get it around that time. I also won't be able to attend this meeting Friday as I'll be on a canoe trip 😅. |
|
@nabramow that sounds so fun! I hope you have a great time! |
nabramow
left a comment
There was a problem hiding this comment.
Alright this seems okay to me, I've also clicked around and tested discussions and events comments with and without a profile.
📝 Release NotesThis PR should be included in the release notes. Suggested release note: 🤖 Bot Debug InformationModel: |


Generalizes the incomplete-profile comment gate from event-only to all threads. A user with an incomplete profile (no photo, or fewer than 150 characters in "about me") can no longer post a comment or reply on any thread — events, community discussions, groups, guides, or places — and is shown the existing
ProfileIncompleteDialogprompting them to complete their profile. This replaces the earlier event-scoped, opt-in version of this gate.How it works
Comments are a single shared mechanism: every comment box posts via the shared
Threads.PostReplyRPC. The gate is enforced on both layers:PostReplynow callshas_completed_profileunconditionally and abortsFAILED_PRECONDITION / incomplete_profile_post_commentfor any thread. The old event-only_is_event_threadreverse-lookup is deleted. Mirrors theCreateEvent/CreateHostRequest/CreateDiscussionpattern (a single choke point).CommentForm(discussion/event comments + replies) andNewComment(group/guide/placeCommentBox) — checkaccountInfo.profileCompleteand openProfileIncompleteDialogwith a genericattempted_action="post_comment"("post a comment") instead of the event-specific copy. The opt-inattemptedActionplumbing throughCommentTree/EventPageis removed.Also included
PageHeaderthat pulled the full-bleed map up over the banner on Community/Discussion pages.Testing
ruff format --check+ruff checkclean;mypyverified clean on the change;pytest src/tests/test_threads.py— 22 passed, including the new/updated cases: incomplete profile blocked on an event comment, on an event reply, and on a discussion thread (proving the gate is no longer event-scoped), plus complete profile allowed.yarn formatclean;tsc --noEmitintroduces no new errors. NewCommentFormgate tests: incomplete profile opens the dialog and does not callpostReply; complete profile posts. Web unit tests (jest) run in CI — the local jest env is currently broken (next/jestresolution), so they were not run on this machine.CreateDiscussion+PostReplyboth200, comment persisted, no dialog.PostReply.Backend checklist
developif necessary for linear migration historyWeb frontend checklist
For maintainers
This PR was created with the Couchers PR skill.