Repository navigation
Conversation
The sync page auto-enrolled any drive the account had enrolled until the node-side proof of hosting (live sync + drive usage) arrived. On a drive already on Cloud Server that re-ran enrollment, reconnected the socket (a spurious 'Working offline' toast) and announced 'Connected to Cloud Server'. Skip it when the current server is already a managed node, and read the user-disconnected flag per event in NetworkIndicator.
|
E2E shard 3 of run 38060558450 is red on one test: Generated by Claude Code |
|
Landed in develop through the batch #2210 (squash f39e460), tested together on Mancave run 5204. Generated by Claude Code |
Requested by Joep · project thread
Before: Opening the sync page on a drive already hosted on Cloud Server showed a "Working offline" toast and then "Connected to Cloud Server. Syncing this workspace…" every time.
After: Neither toast appears for a drive that is already on a managed node. A drive that really needs enrolling still auto-enrolls, with the same success toast, and real disconnects still show the offline toast.
The sync page auto-enrolled any account-enrolled drive until the node's proof of hosting arrived, so it re-ran enrollment, and the socket reconnect in
enableCloudSyncForDrivelooked like a disconnect toNetworkIndicator.How: new
shouldAutoEnrollhelper (driveSyncStatus.ts) waits until/serverhas answered for the current server and skips servers that are already managed;SyncRoute.tsxtracks which server that info came from.NetworkIndicatornow reads thews-disconnectedflag per event instead of once at mount. Unit tests for the helper added (2 of 4 new cases fail without the fix). I could not make the toasts show in a browser even with a mocked managed setup, but the unwanted/api/sync-enrollments/challengerequest reproduced before the fix and is gone after. Screenshots of the sync page follow in a comment.Generated by Claude Code