Skip to content

Late converter file reads overwrite newer uploads or manual path edits #3872

Closed

Description

@romanlutz

Describe the bug

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.

Activity

  1. RashiChauhan67 commented on Nov 3, 2026

    @RashiChauhan67

    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.

  2. romanlutz commented on Nov 18, 2026

    @romanlutz
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions