Repository navigation
Conversation
The service's "sync" control request looks at every folder the drive keeps current, but only the end-to-end scripts sent it. The app now offers it as "Sync now", in the notification area icon's menu and on the Status page beside Open folder, for a running drive that is connected (offline too, where it has the service try the server again). ServiceControl.RequestSyncAsync sends the request and waits for the run. It is given a little more than the service lets a run take, and connecting has its own short limit, so no service is known at once rather than after those five minutes. While the run goes, the button and the menu item are disabled and read "Checking the server...", as does the icon's tooltip; syncing can still be stopped. A run that did not finish gets a message, unless the user stopped or restarted syncing meanwhile. A server that cannot be reached is told by the notification a drive going offline always gets, once: also for a drive that was offline before, after the service had the time its own check of the server takes to say that it is back. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
The service's
synccontrol request looks at every folder the drive keeps current, but only the end-to-end scripts sent it. The app now offers it as Sync now:It can be pressed for a running drive that is connected. That includes an offline drive, where it has the service try the server again at once. It is disabled while the service starts or could not start the drive, and while a start, stop or save is under way.
How it behaves
Changes
ServiceControl.RequestSyncAsync(syncRoot, timeout, cancellationToken)returns whether the run finished.ServiceControl.SyncRequestTimeoutis a little more than the service's own limit for a run, so the service's answer comes first. Connecting has its own 5 s limit (SendAsynctakes an optionalconnectTimeout): without a service, connecting to a pipe goes on trying for as long as it is given.DriveSnapshot.CanSyncNow,IDriveApp.CheckingandIDriveApp.SyncNowAsync;TrayApp.SyncNowAsyncdoes the above.SyncRootConnection.ListingTimeoutis public, so the app's wait follows it.docs/user-guide.mddescribes Sync now under the icon's menu and the Status page;docs/architecture.mdmentions it for the app.Tests
ServiceControlTests: the request is answered only once the run has finished; a failed run, a service that stops meanwhile, a service that does not know the request and no service all give false; a request whose answer may take long still learns soon that no service is there.MainFormLayoutTests: a new "checking the server" state goes through the layout checks at every size and scale, andSyncNow_IsOfferedForAConnectedDrive_AndSaysWhileItCheckspins when the button shows, when it can be pressed and what it reads.dotnet test .\OpenCfDrive.slnxwith rclone on PATH: 305 passed, 0 failed, 0 skipped.ServiceControlServerholding the drive's mutex): a run that succeeds, one that fails, an offline drive whose server answers again, one that stays offline, and a drive that goes offline during the run. Each gave the behaviour above, with exactly one notification where one is due.Notes for merging
claude/folder-poll-backofftouches some of the same files. Expect one small conflict: the Status page's button row inMainForm.Status.cs(both add a button toTheme.ButtonRow(...)). The other edits were kept away from that branch's lines.syncbefore its check of the server has finished, which is why the app waits on the "back online" pulse with a time limit. If the service answered only once that check is done, the app could drop the limit.🤖 Generated with Claude Code