You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktop: a cancelled join drops its cleanup failure, so a vault can stay on the list unannounced #194
In the review of #145, finding X56 (Major, #145 (review)) found that a join's cleanup failure was dropped as a cancel. Finding X54 (Major, still partly open at re-review 3, #145 (review)) found that a join can leave a committed vault on the list. Re-review 3 closed X56 because cleanupFailed no longer wraps the cancel. #176 then added a "may remain on the list" warning for when vault.add loses its answer.
Then #182 (9b369da, for #164) changed the join's result handler (internal/desktop/window/vaults.go:431). It now drops any result whose run ID has changed. Every cancel changes the run ID: joinFlow.stop (:321) increments it, and it runs on Back, on Cancel, and when the dialog closes. So after a cancel the user sees neither of these:
the cleanup failure from run (:590, cleanupFailed at :559)
the lost-answer warning from addVault (:551)
A cancel is the case X56 described. TestACleanupFailureIsNotACancel tests only cleanupFailed itself, not this path. The result is that a vault can stay on the list without the user being told.
Left to do:
When a cancelled run ends with a cleanup failure or the lost-answer warning, show it outside the closed dialog, for example as a toast (App.toasts, window/app.go:221), instead of dropping it.
Add a test: cancel during "Joining…", make the vault's removal fail, and check that the user sees a message naming the vault.
Activity