Page MenuHomePhabricator

[lib] Add farcaster friend fids to sqlite
AbandonedPublic

Authored by will on Thu, Apr 11, 10:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 5:31 AM
Unknown Object (File)
Mon, Apr 22, 12:33 PM
Unknown Object (File)
Sun, Apr 21, 11:56 AM
Unknown Object (File)
Sat, Apr 20, 8:58 AM
Unknown Object (File)
Thu, Apr 18, 1:12 PM
Unknown Object (File)
Thu, Apr 18, 10:53 AM
F1554364: Screenshot 2024-04-16 at 5.11.04 PM.png
Tue, Apr 16, 3:25 PM
F1554363: Screenshot 2024-04-16 at 5.11.04 PM.png
Tue, Apr 16, 3:25 PM
Subscribers

Details

Reviewers
ashoat
ginsu
atul
Summary

Depends on D11672

Test Plan

Tested with local prod keyserver build with physical iOS device.

Connected my farcaster account and confirmed auxUserStore was populated with farcaster mutuals:

Logs:

LOG  dispatching with [{"farcasterID": "388441", "userID": "AF283B63-D6E4-4C16-A10C-ECB96CC975FF", "username": "ginsu-test4"}, {"farcasterID": "389335", "userID": "0FD9CF89-17D9-4DDA-B457-6E4FC1571786", "username": "electrichack"}]

Went on to Warpcast and unfollowed both Ginsu and Varun and upon reconnecting Farcaster account, confirmed they were both null values

On following Ginsu or Varun individually, only one of them is added to auxUserStore.

Diff Detail

Repository
rCOMM Comm
Branch
sqlite/farcaster-friends
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will requested review of this revision.Thu, Apr 11, 11:02 AM

update to use commFCUsers and also clear prior fids

will edited the test plan for this revision. (Show Details)
This comment was removed by will.

Given that we're already checking farcaster friends in a useEffect, should we consider adding a syncing action type that not only adds new farcaster friends but also removes farcaster friends that we've unfollowed as well?

Currently, the "sync" only happens by having a user reconnect their farcaster account, clearing all their prior farcaster friends, and readding everything

ashoat requested changes to this revision.Wed, Apr 17, 6:33 AM

Back to you with questions:

should we consider adding a syncing action type that not only adds new farcaster friends but also removes farcaster friends that we've unfollowed as well

Doesn't the current approach (clearing and adding the current ones) achieve the same thing?

Currently, the "sync" only happens by having a user reconnect their farcaster account, clearing all their prior farcaster friends, and readding everything

Interesting... looking at the code, won't this get triggered on every app start?

Separately, thinking about this a bit more... is the purpose of putting FIDs in the aux user store so that we can show Farcaster accounts on user profiles in Comm? If so, shouldn't we fetch FIDs for all users in the UserStore, and not just for Farcaster friends?

This revision now requires changes to proceed.Wed, Apr 17, 6:33 AM

Separately, thinking about this a bit more... is the purpose of putting FIDs in the aux user store so that we can show Farcaster accounts on user profiles in Comm? If >> so, shouldn't we fetch FIDs for all users in the UserStore, and not just for Farcaster friends?

Might have misunderstood the spec then. I originally believed this would be used for storing farcaster info for farcaster friends. If it's the case that we want to do this for all users in the UserStore, we'd need another identity rpc that when given a list of userIDs, returns all their associated farcaster infos.

I'll check with @ginsu

we'd need another identity rpc that when given a list of userIDs, returns all their associated farcaster infos

After you sync with @ginsu, let me know and we can discuss the best next steps here. I'm curious about the cost here, and what our alternatives might be if the cost is too high.

Going forward, let's make sure we're thoughtful about starting from concrete product use cases when scoping work.

Updated linear project with new tasks: https://linear.app/comm/project/farcaster-sqlite-followups-a2415120f443.

Canceling this task as we don't want to dispatch on just friends but on all users with farcaster integrations in our UserStore.