Skip to content

fix: guard against follow list overwrite when local list is empty#309

Merged
barrydeen merged 2 commits into
mainfrom
fix/follow-list-overwrite-guard
Mar 24, 2026
Merged

fix: guard against follow list overwrite when local list is empty#309
barrydeen merged 2 commits into
mainfrom
fix/follow-list-overwrite-guard

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • When a user with an empty local follow list tries to follow someone, we now query relays for an existing kind-3 event before allowing the follow to proceed
  • A confirmation dialog appears immediately (blocking the follow) showing a spinner while the relay check runs (up to 5s)
  • If a follow list is found on relays, it's loaded and the follow is added silently — no user action needed
  • If no list is found, the dialog updates to warn the user that following will start a new list at 1, and advises rebroadcasting from another client if they believe this is wrong
  • After logout with no remaining accounts, navigation now goes to the splash screen instead of the login screen

Test plan

  • Log in with an account that has no follow list on relays, attempt to follow from the feed (long-press avatar) — confirm dialog appears with spinner, then confirmation message after ~5s
  • Log in with an account that has a follow list but it hasn't loaded yet — attempt to follow — confirm dialog auto-dismisses and follow is added once relays respond
  • Log in with an account that has a follow list already loaded — follow normally with no dialog
  • Log out with no other accounts — confirm splash screen appears, not login screen
  • Onboarding follow-all flow is unaffected (no dialog)

🤖 Generated with Claude Code

barrydeen and others added 2 commits March 24, 2026 17:05
Before following someone, check if the local follow list is empty. If it
is, query relays for an existing kind-3 event before proceeding. If a
follow list is found on relays it is loaded and the new follow is added
normally. If no list is found after 5 seconds, a confirmation dialog is
shown warning the user that following will create a new list starting at
1, and advising them to rebroadcast from another client if they believe
this is wrong. The follow is blocked until the user explicitly confirms.

Applies to both SocialActionManager (feed/thread/search) and
UserProfileViewModel (profile screen). Onboarding is unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit 52aecca into main Mar 24, 2026
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