fix(export): make cancellation cooperative#1366
Open
VailElla wants to merge 4 commits into
Open
Conversation
VailElla
marked this pull request as ready for review
July 13, 2026 05:58
16 tasks
VailElla
force-pushed
the
codex/cooperative-export-cancellation
branch
from
July 18, 2026 10:49
a324dc3 to
003aa4d
Compare
VailElla
force-pushed
the
codex/cooperative-export-cancellation
branch
from
July 20, 2026 04:11
003aa4d to
59028ec
Compare
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.
Description
Fix export cancellation so it cooperatively stops dispatching work and lets already-started workers exit at safe checkpoints. The active export remains registered through worker cleanup and terminal event emission, preventing stale cancellation or completion events from racing with a later export.
Type of Change
Changes Made
CancellingUI state; export settings stay locked while workers clean up, and a failed cancel invoke restores the retryable exporting state.export-errorso the UI does not remain stuck at the final progress count.feature = "cargo-clippy"condition so full clippy with-D warningspasses locally.Screenshots/Videos
N/A — the UI change is a transient cancellation status rather than a persistent layout change.
Testing
Test Configuration:
Automated:
cargo +1.96.1 fmt --manifest-path src-tauri/Cargo.toml --check— passedcargo +1.96.1 check --manifest-path src-tauri/Cargo.toml— passedcargo +1.96.1 test --manifest-path src-tauri/Cargo.toml export_processing::tests:: -- --nocapture— 5 passed, 0 failedcargo +1.96.1 test --manifest-path src-tauri/Cargo.toml -- --nocapture— 5 passed, 0 failedcargo +1.96.1 clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings— passednpm run build— passednpm run i18n:check— passed; 952 plural resolutions validated across 12 localesmainbaseline exactly; no new findingsgit diff --check— passedChecklist
Additional Notes
mainat41d92c8f; the old upstream export-handle guard was removed because this PR's token lifecycle now owns registration, cancellation, cleanup, and terminal-event serialization.AI Disclaimer:
Please state the involvement of AI in this PR: