Skip to content

Keep the latest image selection when async loads finish out of order - #6

Draft
steveseguin wants to merge 1 commit into
masterfrom
fix/latest-image-selection
Draft

steveseguin wants to merge 1 commit into
masterfrom
fix/latest-image-selection

Conversation

@steveseguin

@steveseguin steveseguin commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Problem

Selecting a second color-card or test image while the first is decoding lets the older onload callback replace the newer choice. A slow demo fetch can similarly replace a subsequent upload, and obsolete failures can report errors over a successfully loaded image.

Changes

  • Track selection revisions separately for color-card and test images.
  • Claim a demo selection before starting its fetch, and carry that revision through decoding.
  • Ignore obsolete completions/errors while still revoking decoded image object URLs.
  • Add seven dependency-free tests against the production app callbacks using synthetic image/fetch objects.

Validation

  • The unmodified base fails six of the seven new regressions; the independent image-slot case already passes.
  • npm test: all 24 JavaScript tests and four Python tests pass.
  • node --check app.js and git diff --check pass.
  • Local browser E2E could not start: the installed Chromium exits because this isolated environment forbids its process-singleton socket. New regression inputs are synthetic and no external image services were used.
  • GitHub CI subsequently passed on head 092b11d05952129e814e96828012209075708b4b, including npm test and the existing npm run test:e2e suite: https://github.com/steveseguin/LUT-maker/actions/runs/37208370782.
  • Reviewed .github/workflows/tests.yml: push/PR tests only; no deployment step. No workflow changes.

Base: master at 205a06a. No open PR overlap at publication.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant