chore(Pulse): gate Follow button behind Pulse feature flag#1019
Open
tellaho wants to merge 3 commits into
Open
chore(Pulse): gate Follow button behind Pulse feature flag#1019tellaho wants to merge 3 commits into
tellaho wants to merge 3 commits into
Conversation
The people-follow graph (kind:3) is only consumed inside Pulse — the
Following feed filter. With Pulse off there's nowhere to consume the
graph, so the Follow/Unfollow affordance on UserProfilePanel went
nowhere meaningful.
Gate the action with useFeatureEnabled("pulse"), threading a
showFollowAction flag through ProfileSummaryView into
ProfilePrimaryActions. When Pulse is disabled the Follow/Unfollow
button is hidden entirely; Message and Edit actions are unaffected.
Unrelated thread-following (features/messages, localStorage-backed) is
deliberately left untouched.
Co-authored-by: tho <80c5f18be5aafa62cf6198c6335963ba3306b595288117c8ea2f805fc9bdc94a@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: tho <80c5f18be5aafa62cf6198c6335963ba3306b595288117c8ea2f805fc9bdc94a@sprout-oss.stage.blox.sqprod.co>
- Move the Pulse feature flag lookup from UserProfilePanel into ProfilePrimaryActions, where the Follow affordance is rendered - Remove the showFollowAction prop from UserProfilePanel and ProfileSummaryView to avoid passing UI-only gating state through intermediate components - Keep the existing follow/unfollow behavior and explanatory gating comment next to the gated action UI
- Replace duplicate Follow and Unfollow ProfileQuickAction branches with a single follow-gated render path - Select the active follow/unfollow mutation once while rendering the follow-specific props directly at the ProfileQuickAction call site - Remove the verbose Pulse follow-gate comment now that the feature flag usage is self-evident
50b69dd to
e7334e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Category:
improvementUser Impact: When Pulse is turned off, the Follow/Unfollow button no longer appears on user profile panels.
Problem: Following someone writes a Nostr kind:3 contact list, but the only thing that consumes that graph in the UI is Pulse (the "Following" feed filter). The Follow button on
UserProfilePanelwas ungated, so even with Pulse off, users could follow people — writing to a graph with nowhere to consume it.Solution: Gate the Follow affordance behind the same
pulsefeature flag that already controls the Pulse sidebar entry and route. When Pulse is disabled, the Follow/Unfollow action is hidden entirely (option A). Message and Edit actions are unaffected.File changes
desktop/src/features/profile/ui/UserProfilePanel.tsx
Computes
showFollowAction = useFeatureEnabled("pulse")and passes it down toProfileSummaryView.desktop/src/features/profile/ui/UserProfilePanelSections.tsx
Threads
showFollowActionthroughProfileSummaryViewintoProfilePrimaryActions, which now conditionally renders the Follow/Unfollow quick action.Reproduction Steps
pulsepreview feature disabled (default).pulsepreview feature, reopen a profile panel.Notes
useFeatureEnabledhook — same gating mechanism as the Pulse sidebar/route.features/messages, localStorage-backed, follows thread roots not pubkeys) is deliberately left untouched.pnpm typecheckandbiome lintpass clean.