Skip to content

chore(Pulse): gate Follow button behind Pulse feature flag#1019

Open
tellaho wants to merge 3 commits into
mainfrom
tho/gate-follow-behind-pulse
Open

chore(Pulse): gate Follow button behind Pulse feature flag#1019
tellaho wants to merge 3 commits 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.

@tellaho tellaho marked this pull request as draft June 12, 2026 22:07
npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f and others added 3 commits June 14, 2026 18:14
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
@tellaho tellaho changed the title Gate Follow button behind Pulse feature flag chore(Pulse): gate Follow button behind Pulse feature flag Jun 15, 2026
@tellaho tellaho force-pushed the tho/gate-follow-behind-pulse branch from 50b69dd to e7334e7 Compare June 15, 2026 01:19
@tellaho tellaho marked this pull request as ready for review June 15, 2026 01:20
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