Skip to content

Gate Follow button behind Pulse feature flag#1019

Draft
tellaho wants to merge 1 commit into
mainfrom
tho/gate-follow-behind-pulse
Draft

Gate Follow button behind Pulse feature flag#1019
tellaho wants to merge 1 commit into
mainfrom
tho/gate-follow-behind-pulse

Conversation

@tellaho

@tellaho tellaho commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Overview

Category: improvement
User 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 UserProfilePanel was 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 pulse feature 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 to ProfileSummaryView.

desktop/src/features/profile/ui/UserProfilePanelSections.tsx
Threads showFollowAction through ProfileSummaryView into ProfilePrimaryActions, which now conditionally renders the Follow/Unfollow quick action.

Reproduction Steps

  1. Run the desktop app with the pulse preview feature disabled (default).
  2. Open any user's profile panel (click a user in a channel).
  3. Confirm the Follow button is absent; Message still shows.
  4. Enable the pulse preview feature, reopen a profile panel.
  5. Confirm Follow / Unfollow reappears and works as before.

Notes

  • Uses the existing useFeatureEnabled hook — same gating mechanism as the Pulse sidebar/route.
  • The unrelated thread-following feature (features/messages, localStorage-backed, follows thread roots not pubkeys) is deliberately left untouched.
  • pnpm typecheck and biome lint pass clean.

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>
@tellaho tellaho marked this pull request as draft June 12, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant