feat(runtime): add a Cancel button to the world-exit backup toast - #17
Merged
Merged
Conversation
The toast that appears after you leave a world had no way to stop the backup. Toasts get no input of their own, so the monitor forwards screen clicks to the toast, which records where the toast manager placed it. Cancel interrupts the capture thread while the world is copied, and cancels the coordinator operation once dispatched. The coordinator's point of no return moves from the start of destination writes to the catalog record, so in-flight ZIP and Git writes are interrupted; a destination that had already finished is kept and recorded. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cancelling a destination's future discarded whatever the backend went on to produce. Git publishes the local snapshot before it pushes, and an interrupted push returns a pending-sync result, so that snapshot was left out of the catalog or recorded as failed. Interruptible futures now expose stop(), which interrupts the worker but lets the future complete with the backend's real result. The Git executor and the ZIP backend both return one, and the coordinator stops destinations through it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
WorldGitSnapshotStore composed its write from a locate stage and the child backend's future, so the coordinator saw a plain future and cancelled it outright. A snapshot published before an interrupted push was then lost from the catalog. The store now runs the locate check and the child's blocking write inside one interruptible future on the shared worker executor, so a stop interrupts the Git thread directly and the outcome is kept. The backend contract documents that the stage must be returned as is. Co-Authored-By: Claude Fable 5.1 <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.
The toast that appears after you leave a world had no way to stop the backup. If the backup was slow, the only option was to wait.
The toast now draws a Cancel button while the backup can still be cancelled. Toasts get no input of their own, so the background monitor forwards screen clicks to the toast, which records where the toast manager placed it. No mixins.
Cancel interrupts the capture thread while the world is copied, and cancels the coordinator operation once dispatched. The coordinator's point of no return moves from the start of destination writes to the catalog record, so in-flight ZIP and Git writes are interrupted. A destination that had already finished is kept and recorded, so no complete artifact is left out of the catalog. A cancelled backup shows "Backup cancelled; world was saved" and leaves no retained warning.
The coordinator test fakes moved into
CoordinatorFakesbecause the test file crossed the 1,000-line ceiling.🤖 Generated with Claude Code using Claude Fable 5.1.