return communities that the member is a part of
Active Repositories
Recent Activity
Today
Because pf https://linear.app/comm/issue/ENG-10039/allow-checking-if-a-user-has-a-backup I had to hack it a bit: instead of calling retrieveLatestBackupInfo I hardcoded its return value to null. Then for both password and SIWE user verified that it is possible to log in.
Are we sure we want to wait for the connection in each place where useUpdateRelationships is used? There are a lot of them.
We don’t wait every time we call useUpdateRelationships, the waiting is put in updateRelationshipsAndSendRobotext, so it waits only when we create a new relationship.
Should we wait again after e.g. Tunnelbroker gets disconnected, or should we just wait for the initial connection?
I think it's better to wait again:
- The bugs will happen mostly when we’re opening the app but I think it’s theoretically possible for the bug to appear after tunnelbroker is disconnected
- It’s easier
Do we want to have a timeout?
We can have a timeout but what do we do if we encounter it?
- Ignore everything and let the duplicated thread be created?
- Throw an error?
I think throwing an error is better so I added it for now in a separate diff.
What if the waitForConnection function was called multiple times? We're resolving only the most recent promise because creating a new one results in overriding the ref.
Ok, I guess it may be possible for this scenario to occur, I added a list of promises.
Is it guaranteed that if waitForConnection is called when isConnectedOrUnreachable is false, and then turns to true, the effect will always fire late enough so that the ref already contains the resolve function?
I don’t understand what can be problematic here. When waitForConnection is called we check for isConnectedOrUnreachable. If it’s false then we set the callback to the ref and return the promise. There is nothing async and no waiting on anything and useEffect can’t fire during setting the callback because js is one threaded.
Review changes: add list of promises
Yesterday
Wed, Dec 25
Tue, Dec 24
Mon, Dec 23
address feedback