Repository navigation
Render 2D image edits in a reusable tiled worker - #261
Merged
Merged
Conversation
vycdev
force-pushed
the
t3/modernize-219-tiled-image-worker
branch
from
November 30, 2026 21:16
4f4e98e to
03deacc
Compare
The tiled image worker now captures and encodes dedither's input with OffscreenCanvas, so the page's HTMLCanvasElement.toBlob hook sees only the result. The result is still checked against the pinned goldens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Apply takes the edit lock and disables the adjustment controls until its render lands, so a slider moved meanwhile is not baked over and reset. - Unmounting the preview, such as switching to 3D, no longer cancels an export still in flight; the worker stays until it settles, so Dedither's input arrives. A new image still cancels it. - A committed touch-up keeps the current adjusted image on screen while the worker re-renders, instead of falling back to the raw image. - The changelog entry moves from v4.3.0 to Unreleased, and the translated image adjustment guides describe background rendering and Retry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Holding the processing lock during Apply refused an Apply started while a touch-up's snapshot was still loading, and rolled back that touch-up. Apply now starts like before and instead disables the adjustment controls and ignores slider commits until it lands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Touch-up tools wait while Apply, or any other image edit that holds the lock, is running. A fill or stroke accepted meanwhile landed first and left Apply with a stale image, so Apply was dropped. - The adjustment panel mounts with the adjustments in effect, so after a trip to 3D it shows them and Apply bakes them, instead of showing zero. - The renderer updates its current-image ref during render, so an export started right after an image change is not cancelled as stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Disabling touch-ups for Apply also ran the processing rollback, which dropped a fill or stroke whose save was still running. Apply now pauses touch-up input without the rollback, waits for queued saves and the render they cause, and only then takes the edit guard, so the touch-up keeps its own Undo step and Apply starts from it. The Image colors inspector, whose merge popover sits outside the disabled panel, is off while Apply runs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
vycdev
force-pushed
the
t3/modernize-219-tiled-image-worker
branch
from
November 30, 2026 21:32
03deacc to
32bd48c
Compare
This was referenced Dec 1, 2026
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.
Supersedes #219 by @JohnSt99, rebased onto current
developwith their commit and authorship kept. Closes #165.The 2D adjustment preview and Apply now render in one reusable background worker, in 128×128 tiles with a one-pixel clarity halo, so seams match full-frame output:
On the contributor's 3,072 × 2,048 test image (median of four runs):
Changes made while rebasing and during review:
CanvasPreview. The Image colors dim and merge preview takes precedence. Otherwise the worker's adjusted preview is drawn, or the raw image.Proof:
@smoketests intiled-image-editing.spec.tshold the worker's PNG results or the touch-uptoBlob. They cover a pending Apply, a 3D switch during Dedither, a fill during and before Apply, and the panel after a 3D trip. Each failed with its fix reverted and passes with it.tsc -bpass.npm test: 1406 passed. i18n and docs checks pass.test:e2e:allpassed on fresh servers (port 52067): 218 smoke tests and all 7 area suites.Council review
Rounds: 4
Round 4 found no must-fixes. The remaining nice-to-haves are edge cases where Apply does nothing and can be retried, without losing work.
🤖 Generated with Claude Code