Repository navigation
refactor: centralize node preview URL policy - #23329
Conversation
- Downscale preview images to at most 1024px in a Web Worker pool and show the blob copy; the original stays on data-full-src for copy, clipspace, mask editor and open/save - Keep one cache-buster per outputs object so the same output is not downloaded twice and the HTTP cache applies - Skip the legacy full-size canvas preview load in Vue nodes mode - Load preview images with decoding=async and loading=lazy - Add a @Perf test comparing a grid of 4096px and 256px previews
- Render the main preview img while its display copy is pending and drop loading="lazy", so offscreen node previews still load, size and report errors. - Settle pending downscale requests and stop using the pool when a worker fails to load. - Revoke only blob URLs the cache created, never a borrowed source. - Size the Copy Image PNG conversion from the decoded original, not the display copy. - Perf spec loads a premade grid workflow, moves its helpers to a fixture util and deletes its uploads after each test.
…s to the grid fixture
- Leave animated images on their original URL instead of freezing them to a single downscaled frame. - Show in-memory blob: sources (live sampler previews) as they are, skipping the worker round trip on every step. - The Vue node menu's Copy Image draws the full-resolution original, not the displayed copy.
In Vue mode the held example.png request now belongs to the downscale worker, and the preview unmounts before the worker replies, so no img ever takes that src. The image load spy also tracks worker requests by source and marks them handled once their reply has been processed. Also drops JSDoc that only restated the names it documented.
ImageDecoder needs a secure context, so ComfyUI opened over plain http on a LAN address froze animated WebP and APNG previews. The worker now reads the GIF signature, the APNG acTL chunk and the WebP VP8X animation flag. Copy Image in the Vue node menu shows the same warning toast as the canvas menu instead of only logging to the console.
- Treat AVIF files whose ftyp brands include avis as animated, so the worker leaves them on their original URL. - fullResolutionImage returns undefined when the original cannot be decoded, and Copy Image turns that into the copy warning toast.
Keep display blobs in the cache and scope object URLs to mounted previews. Serialize worker pipelines, preserve replacement entries after stale failures, and clean up partial pool startup. Resolve GLSL inputs across subgraph boundaries through the existing stored-image fallback. Add regressions for original-image actions and asynchronous previews, and make the large-image benchmark assert decoded sizes without tracing or an extended timeout.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
📦 Bundle: 12.3 MB gzip 🔴 +71 BDetailsSummary
Category Glance App Entry Points — 7.1 kB (baseline 7.1 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 3.68 MB (baseline 3.68 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 3 unchanged Views & Navigation — 150 kB (baseline 150 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 10 added / 10 removed / 8 unchanged Panels & Settings — 899 kB (baseline 899 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed / 29 unchanged User & Accounts — 108 kB (baseline 108 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 13 unchanged Editors & Dialogs — 502 kB (baseline 502 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 9 added / 9 removed / 10 unchanged UI Components — 369 kB (baseline 369 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 28 unchanged Data & Services — 2.02 MB (baseline 2.02 MB) • 🔴 +16 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 33 unchanged Utilities & Hooks — 1.41 MB (baseline 1.41 MB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 67 unchanged Vendor & Third-Party — 9.7 MB (baseline 9.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 35.8 MB (baseline 35.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 62 added / 62 removed / 704 unchanged ⚡ Performance: ⏳ Performance tests in progress…🔬 E2E Coverage: 🟡 58.9% of linesCoverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 3293 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Full docs: scripts/registry-census/README.md Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
🌾 Fallow: ✅ PassedFindings and check detailsFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since e2d14ae037541d566fc93150b1b044ce2ea84d3e
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (509)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #23329 +/- ##
==========================================
- Coverage 87.91% 87.82% -0.09%
==========================================
Files 3156 3042 -114
Lines 169011 165406 -3605
Branches 45535 42264 -3271
==========================================
- Hits 148584 145270 -3314
+ Misses 19456 19332 -124
+ Partials 971 804 -167
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 128 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Summary
Follow-up to merged PR #23317, now targeting
main. Move preview format and cache-revision handling intoresultItemPreviewUrl, removing the node output store's duplicate URL policy.Supplied original URLs now remain authoritative for every shared-helper caller, matching the store's existing behavior. Generated URLs alone receive preview parameters. Full-resolution and stored HDR previews retain their precedence.
Verification
Merge Danger
Two-way door. Shared preview-URL callers are affected, particularly image items with supplied original URLs. Grid-thumbnail restructuring stays separate in FRONT-4020.