Skip to content

feat(runtime): add a Cancel button to the world-exit backup toast - #17

Merged
ishaanko merged 3 commits into
mainfrom
feat/cancel-exit-backup
Sep 10, 2026
Merged

ishaanko merged 3 commits into
mainfrom
feat/cancel-exit-backup

Conversation

@ishaanko

@ishaanko ishaanko commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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 CoordinatorFakes because the test file crossed the 1,000-line ceiling.

🤖 Generated with Claude Code using Claude Fable 5.1.

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>
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Sep 8, 2026
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

No blocking failure remains.

What we checked:

    • Validated the Git pending-sync cancellation flow by inspecting the predecessor cancellation log, the narrow-test command, and the current-path behavior, confirming that stop() preserves the backend result and that PENDING_SYNC is cataloged. T-Rex
    • Confirmed the world cancellation tests share a single runner and that both tests were blocked before execution due to a missing Java runtime (JAVA_HOME not set or java not in PATH). T-Rex
    • Repeated the world-exit cancellation validation script twice and observed both runs exit before test discovery due to JAVA_HOME not set and no Java found in PATH. T-Rex

Summary

  • This change adds a Cancel control to world-exit backup progress and preserves completed local backup results when cancellation interrupts later work.
  • T-Rex validation blocked The required Gradle cancellation tests could not start because the Java tool is unavailable: JAVA_HOME is unset and no java command is present on the runner.

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>
@github-actions github-actions Bot added size:XL 500-999 effective changed lines (test files excluded in mixed PRs). and removed size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Sep 8, 2026
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>
@ishaanko
ishaanko merged commit c66933d into main Sep 10, 2026
3 checks passed
@ishaanko
ishaanko deleted the feat/cancel-exit-backup branch September 10, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant