Skip to content

[bugfix] canvas: preserve uploads across image quality defaults - #392

Merged
wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-377-upload-default-quality
Nov 17, 2026
Merged

wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-377-upload-default-quality

Conversation

@wangtiance

Copy link
Copy Markdown
Collaborator

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

  • type:bug, area:canvas, area:ci

Test plan

Local Windows validation with Chrome 157, Node 26.13.0, an isolated creation API and real HEIF fixture bytes:

  • Before the fix, the new unit regression failed (false !== true) and the original heif_upload_recovery.mjs reproduced the en-US node timeout with an original asset registered and an empty saved binding.
  • After the fix, 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, and git diff --check: passed.
  • Complete PR-diff 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:

HEIF uploaded into the existing image node 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.heic sample.

Bilingual UI

No user-facing strings changed. The new unit regression and the HEIF browser journey cover zh-CN and en-US.

## 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
@github-actions github-actions Bot added the area:docs Documentation / 文档 label Nov 17, 2026
@github-actions
github-actions Bot requested a review from wuzhf9 November 17, 2026 12:17
@wangtiance wangtiance added area:canvas Canvas, nodes and direct manipulation area:ci Continuous integration and checks type:bug Something is broken labels Nov 17, 2026 — with ChatGPT Codex Connector
@wangtiance
wangtiance merged commit d48d33c into ThinkFlowLab:main Nov 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:canvas Canvas, nodes and direct manipulation area:ci Continuous integration and checks area:docs Documentation / 文档 type:bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] nightly: HEIF uploaded into a new image node leaves its saved binding empty

1 participant