Fix the tray items from the review - #891
Merged
Merged
Conversation
- The piper port is bound synchronously at startup (PiperServer.TryBind), and a bind that fails is logged and shown. It used to fault a task nothing looked at until exit, so the tray ran without its listener, holding the mutex, and then crashed on the way out. - A locking process is killed only while it is the one Restart Manager reported: LockingProcess keeps the start time it gave, and Kill compares it with the process it opens. The kill can follow a dialog that waits on the user, and Windows reuses ids. - "Open diff tool" finds the move again by its received file when clicked, and AddMove takes the process it disposes off the move it was on. A menu built before a re-run's move threw on the UI thread. - The accept loop catches a bare SocketException ConnectionReset, which is what a connection that reset before it was accepted throws, instead of showing the modal "open an issue" box on the loop's thread. Each connection is handled on its own task. - FileComparer opens both files shared with writers and deleters, so a test's rewrite or delete of its received file is not refused during a compare, and a pass that reads less from one file than the other is a difference rather than the end of both. - "Always kill locking processes" applies to accepts arriving over the socket, which never prompt and so never reached the resolver that read it.
This was referenced Sep 23, 2026
Merged
Merged
Merged
Merged
Merged
This was referenced Sep 24, 2026
Merged
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.
This fixes the "Tray" group from
todo.md. The review's repro tests now live in the tray test class for each topic.PiperServer.TryBindbinds synchronously at startup, and a failure is logged and shown in a balloon.Serveruns the loop.Startstays as a bind-then-serve helper for the testsPiperTest.ABindThatFailsSaysWhyLockingProcesskeeps the start time Restart Manager reported.Killcompares it with the process it opens, and leaves the process alone if it differs or can't be readFileLockKillerTest.Kill_LeavesAProcessThatIsNoLongerTheOneReportedTracker.FindMove), andAddMoveclears the process it disposesTrackerMoveTest.OpenDiffToolFromAMenuBuiltBeforeTheMoveWasUpdatedSocketExceptionConnectionReset, which is how the accept throws it. The read path's wrapped catch stays as it was. Each connection is handled onTask.RunPiperTest.AClientThatResetsBeforeItIsAcceptedIsNotReportedAsAnErrorFileComparerblocks a test's delete during a compareReadWrite | Deletesharing. A pass that reads different counts from the two files is a difference, since widening the sharing alone let a file cut short mid-compare read as equalFileComparerTests.ATestCanDeleteItsReceivedFileWhileTheScanComparesIt,A_file_cut_short_mid_compare_is_not_equalShouldKillreadsLockedFilesHandler.AlwaysKillitself, before the no-prompt branch. The resolver is still never consulted for a wire acceptTrackerTrackedFilesTest.AlwaysKillAppliesToAnAcceptArrivingOverTheSocketThe full solution passes locally in Release: 2,087 passed, 22 skipped.