You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Late converter file reads overwrite newer uploads or manual path edits #3872
A late FileReader callback can overwrite the most recently selected converter file or a newer manual path in the same dialog opening. The overwritten value is subsequently sent to convertersApi.createConverter. This is a file-read ownership race, not a pending create/build/apply response race.
Steps/Code to Reproduce
In the ImageOverlayConverter dialog, start reading file A and then file B. Complete B's FileReader first, then A's. The retained round-36 test renders the actual dialog and controls the FileReader completion order. A second case starts reading A, enters a new manual path, and then completes A.
Expected Results
Only the latest owning input updates the parameter. The new upload or manual path remains visible and is the value submitted.
Actual Results
Completing B then A changes the field from B back to A, and the create request submits A. Completing A after a newer manual URL similarly replaces the URL. The close/reopen stale-read control passes. The proof covers component state and request payload, not native browser scheduling or image decoding.
Screenshots
N/A. Deterministic React/JSDOM regression evidence is retained in the QA session artifacts.
Versions
Linux; Node 26.12.1; frontend 1.2.0-dev.0; React 19.3.1; Jest 30.5.2; revision 01ce6ca66a315770b36c7dca1f320668c0d92d7c. Actual dialog with deterministic file-read/service mocks; no backend or browser claim.
Fixed by #3648, which gave converter file reads an ownership guard: each read holds a per-parameter token plus a dialog epoch, and a FileReader completion that is no longer the current selection is discarded; a manual path edit also invalidates the pending read. Both repro cases (B-then-A completion, late read after a newer manual URL) are covered on current main. Closing; #3895 was superseded by that change.
Activity
RashiChauhan67 commentedon Nov 3, 2026
I would like to take this one. I have a fix and regression tests for both cases in the report and will open a PR shortly.
romanlutz commentedon Nov 18, 2026
Fixed by #3648, which gave converter file reads an ownership guard: each read holds a per-parameter token plus a dialog epoch, and a
FileReadercompletion that is no longer the current selection is discarded; a manual path edit also invalidates the pending read. Both repro cases (B-then-A completion, late read after a newer manual URL) are covered on current main. Closing; #3895 was superseded by that change.