SD-2505 - fix: avoid UI stalls with on Typo.js example#2765
SD-2505 - fix: avoid UI stalls with on Typo.js example#2765chittolinag wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02dbe3d671
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const onAbort = () => { | ||
| pending.delete(requestId); | ||
| cleanup(); | ||
| reject(createAbortError()); |
There was a problem hiding this comment.
Prevent abort handler from dropping uncancelled worker checks
If a proofing batch takes longer than timeoutMs (10s default in ProofingSessionManager), this abort handler rejects immediately and removes the request from pending, but the worker keeps computing because no cancel message is sent. When the worker eventually posts its result, handleMessage drops it (if (!entry) return), so segment hashes are never updated and the same segments can keep timing out/retrying without ever producing accepted results. This regresses behavior for large/slow documents; either propagate cancellation to the worker or avoid rejecting until the worker run is actually stopped.
Useful? React with 👍 / 👎.
Issue
./typoWorkerMessages,./typoWorker).Proposed solution