Translate from preserved source, retry transient errors, parallel requests (v0.3.0) - #1
Merged
Merged
Conversation
… requests - Cue.source keeps the original text: retranslate (per-line or full re-run) always starts from the source, never from a previous translation. - Transient LLM errors (network/timeout/429/5xx) retry with backoff instead of killing a long run; cancel mid-request now shows the cancel toast. - Progress refresh coalesced to one per animation frame (was quadratic on large files). - New "Parallel requests" option (default 1 = old sequential behaviour): batches translated concurrently, big speedup on cloud endpoints. - Bump version to 0.3.0. Co-Authored-By: Claude Fable 5 <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.
What & why
Four fixes from a full-codebase review, plus the v0.3.0 bump so the next tag rebuilds the portable builds for all platforms:
Cue.source, set at parse time and never mutated. The engine now translates from it instead ofcue.text, so the per-line ↻ retranslate and a Cancel-then-Translate re-run always start from the original text instead of re-translating a previous translation (previously the only copy of the source lived in a DOM cell).isTransientLlmErrorinclient.ts) instead of killing a long run. Auth/4xx errors still fail immediately. Also: cancelling mid-request (LlmErrorkindaborted) now shows the "Cancelled — partial result kept" toast instead of an error toast.concurrencyparam and a persisted "Parallel requests" setting (default 1 = exactly the old sequential behaviour). Higher values run that many batches in flight via a small worker pool: a large speedup on cloud endpoints. On failure the pool stops picking up new batches, in-flight batches finish (partial results kept), and the first error is rethrown.Trade-off (documented in the UI hint): with parallel requests > 1, context continuity becomes best-effort — a batch sees whatever earlier lines have finished. 1 remains the right setting for local servers.
Releasing: the Windows portable exe in
portable/was rebuilt locally at 0.3.0. macOS/Linux portables can't be built from Windows — after merging, push thev0.3.0tag and the release workflow builds all three platforms into a draft release.Engine invariants (check the ones this PR touches)
⟦n⟧placeholder masking is preserved (id-tag + token-set validation intact)Testing
npm run typecheckpassesnpm testpasses — 115 tests (4 new: translate-from-source, transient retry, no-retry-on-401, parallel overlap + correctness)npm run tauri build) completed at 0.3.0Notes
concurrency: 1takes the identical code path as before (worker pool degenerates to a sequential loop), so default behaviour is unchanged for existing users; saved settings withoutparallelRequestsmerge to 1.🤖 Generated with Claude Code