chore: use available sync hooks from @comapeo/core-react#1091
Merged
chore: use available sync hooks from @comapeo/core-react#1091
Conversation
e1daad4 to
caa30f1
Compare
caa30f1 to
27ff047
Compare
cimigree
approved these changes
Apr 15, 2025
Contributor
cimigree
left a comment
There was a problem hiding this comment.
Everything from the old useSyncState seems to be removed, and I see the new useSyncState({ projectId }) from @comapeo/core-react is replacing it. The new test for getConnectedPeersCount covers the logic well as far as I can tell. I don’t see any stray references to the old sync code or manual query invalidations, so it all looks clean. I can’t actually test the Sync UI right now, but from reading through these diffs, the code looks straightforward and consistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #1081 (specifically simplifying the
useActiveProject()hook).There should be no user-facing changes with this, as the implementation from core-react is directly ported from the implementation that was here.
There are some methods related to sync that are used in the app that haven't been ported to core-react just yet, but wouldn't consider this a blocker since they don't rely on query invalidations right now.
Also adds a unit test for a helper function related to sync state.