Cancel export and media download strategy improvement#1050
Merged
LeviXIII merged 7 commits intoJun 15, 2026
Conversation
…selecting an item. Making the working more natural
…Added cell ID and codex path to missing file events for better user navigation. Updated related interfaces and export handlers to support new functionality.
… supposed network "failure"
3 tasks
Contributor
Author
|
/build |
|
Pre-release: 0.28.0-pr1050-548374d https://github.com/genesis-ai-dev/codex-editor/releases/tag/0.28.0-pr1050-548374d |
LeviXIII
approved these changes
Jun 15, 2026
LeviXIII
left a comment
Contributor
There was a problem hiding this comment.
Works well for me. There was one issue that was caught unrelated to the PR but that was made into a separate issue.
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.
Cancel export and media download strategy improvement
Frontier: genesis-ai-dev/frontier-authentication#34
Pinned Project: 1050-cancel-export-and-media-download-strategy-improvement
#997
Summary
Adds the ability to cancel an in-progress project export (cleaning up any
partial output), makes whole-project audio export resilient to transient
LFS/network failures, and overhauls how unresolved/missing audio is surfaced
to the user — including a categorized, expandable, clickable issues list, a
targeted "retry failed" action, and clearer real-time progress.
Also tightens the media-download-strategy switch (clear "Calculating…" feedback
and diagnostic logging into why some media is retained).
Changes
Export cancellation
CancellationTokenthrough every exporter (audio, plaintext, USFM, HTML, VTT/SRT, XLIFF, CSV/TSV,
rebuild, backtranslations).
AbortSignalbridged from the token."Cancelled — partial output removed" state with a Close button.
closing the export tab aborts the run.
Resilient audio downloads
downloadLfsWithRetry: up to 4 attempts with exponential backoff + jitter.ECONNRESET,fetch failed,etc.); fails fast on permanent ones (4xx, corrupt pointer) and never retries a
user-initiated abort.
Export issues UX
categorized, collapsible list with human-readable labels/descriptions and an
"Expand all / Collapse all" toggle.
(cell id + codex path threaded through the reporter chain).
(recoverable) split out from hard "could not be resolved" errors.
recovered audio back into the existing export folder.
Pre-flight (Step 1) + real-time stats
isMissingare surfaced as "possiblymissing"; cells whose only remaining takes are all missing are reclassified as
"without audio" (consistently in pre-flight and export).
.codexfile watcher;the cell-list popover stays open when navigating to a cell.
Progress display
(cell label while writing) instead of repeating the
.codexfilename duringconcurrent downloads.
Media download strategy switch
replaceFilesWithPointersexplaining why each file wasretained (persisted / unsynced / already-pointer) without changing behavior.
Testing Checklist
Export cancellation
Resilient audio downloads (retry/backoff)
ECONNRESET,fetch failed) auto-recover via retry.Export issues UX
Pre-flight (Step 1) + real-time stats
isMissingtake show as "possibly missing".Progress display
.codexfilename during concurrent downloads.Media download strategies — audio pointerization (
replaceFilesWithPointers)pointers/holds the pointer,files/holds real bytes) to a pointer.files/andpointers/) — bytes untouched.restrictToAudiopointerizes audio only, leaving video untouched.restrictToVideospointerizes video only, leaving audio untouched.ignorePersistedfrees it.Media download strategies —
countSyncedDeletableAudioFilespointers/, real bytes infiles/)..webmrecordings as audio (not referenced by a notebookvideoUrl).Media download strategies — counting & stubs
countDownloadedMediaFilescounts real downloaded media, ignores pointer stubs.removeFilesPointerStubs(less-restrictive switch, audio): removes audio pointer stubs so they re-download; preserves real downloaded audio bytes.Media download strategies —
applyMediaStrategytransition matrixkeep-video): local videos allowlisted and kept; rest freed.free-all): everything freed incl. saved videos; video allowlist cleared.keepVideo/keepAudiocombinations).keepFilesOnStreamAndSave === false): explicit free incl. saved videos.forceApplyre-runs anyway.Media download strategies — "Calculating…" UX (
project.mediaStrategyCalculating)calculating: true) before counting media files.calculating: false) on cancel and before persisting the result.Frontier-authentication — AbortSignal for LFS downloads
AbortErroruntouched (callers can distinguish cancel vs failure).