Repository navigation
[bugfix] canvas: preserve uploads across image quality defaults - #392
Merged
wangtiance merged 1 commit intoNov 17, 2026
Merged
wangtiance merged 1 commit into
wangtiance merged 1 commit into
Conversation
## summary - Compare omitted image quality and auto as the same editing intent. - Preserve rejection of explicit quality changes in upload guards and generation edit identities, with regression coverage in both locales. - Check that HEIF uploads bind the original node to the registered asset. - Record the recurring projection-default risk and a fixture screenshot. Fixes: ThinkFlowLab#377
wangtiance
requested review from
hsliuustc0106 and
princepride
as code owners
November 17, 2026 12:16
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.
Summary
Uploading HEIF into a fresh image node could register the original asset but leave the node empty when its first save acknowledgement arrived during upload. The projection expands omitted image quality to
auto; the upload guard incorrectly treated that equivalent default as an edit.Normalize omitted image quality in the shared generation edit comparison used by upload guards and generation edit identities. Explicit low/medium/high quality changes remain conflicts. Strengthen the browser regression to check the original target node ID and the registered asset binding, and record the recurring default-expansion risk.
Linked issue
Fixes #377
Labels
Test plan
Local Windows validation with Chrome 157, Node 26.13.0, an isolated creation API and real HEIF fixture bytes:
false !== true) and the originalheif_upload_recovery.mjsreproduced the en-US node timeout with an original asset registered and an empty saved binding.node --test tests/canvasWorkspaceEntry.test.ts tests/modelResolution.test.ts: 31 passed.node tests/browser/heif_upload_recovery.mjs: all 12 scenarios passed in development mode, and all 12 passed again against the production build. Both locales cover upload, drop, fresh node upload, image/video references, injected preview failure, preview dimensions, original bytes and reload.PYTHONUTF8=1 npm test: 833 passed. The first run without that setting failed in the unchanged browser-host Python discovery test due to a garbled Chinese temporary-directory path; it is not reported as a passing run.npm run build,npm run check:i18n,npm run check:browser-locale,npm run check:browser-manifest, andgit diff --check: passed.python -m pre_commit run --from-ref upstream/main --to-ref HEAD: passed. Used a copied Git index and temporary object directory to accommodate child-process .git write restrictions; no hooks were excluded. Automatic hook installation remains blocked by this environment's .git/hooks permissions.Left to CI: Release checks and Ubuntu 22.04 Nightly extended/production lanes. Full Python suite and installed desktop validation were not run locally.
Evidence that it works
The regression reproduces the reported saved empty binding before the two-line normalization change. Both browser build modes pass afterward, preserving the original node identity and uploaded asset bytes. Production-build fixture screenshot after reload:
Provider verification
No real-provider calls or generation submissions. Browser validation uses isolated model fixtures, real upload/preview/persistence operations and the bundled
oriented.heicsample.Bilingual UI
No user-facing strings changed. The new unit regression and the HEIF browser journey cover zh-CN and en-US.