Skip to content

fix(export): keep cancelled GIF exports from leaving a partial file - #2617

Merged
richiemcilroy merged 3 commits into
CapSoftware:mainfrom
yashranaway:fix/gif-cancel-partial
Oct 18, 2026
Merged

richiemcilroy merged 3 commits into
CapSoftware:mainfrom
yashranaway:fix/gif-cancel-partial

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

cancelling a gif export, or having it fail, left a broken half-written gif at the path you picked, because the encoder wrote straight to the destination.

new gif exports now go through the same temp file next to the destination that new mp4 exports already use, and only get moved into place once encoding finishes. existing destinations are still written in place, same as mp4. the helper just takes its suffix from the output path now instead of hardcoding mp4. two tests, a cancelled export leaves nothing behind and a finished one lands with frames. the cancel one fails on main.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

New GIF exports write to a temporary file beside the destination. The completed file moves into place only after encoding and rendering succeed. Existing destinations are still written in place.

  • New GIF exports appear at their chosen path only after encoding finishes.

Reviews (2) · Last reviewed commit: "fix(export): stop GIF exports when stagi..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment thread crates/export/src/lib.rs Outdated
Comment thread crates/export/tests/gif_cancellation.rs
@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit 2493255 into CapSoftware:main Oct 18, 2026
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants