Skip to content

Commit 03113b2

Browse files
Code2Collapseclaude
andcommitted
fix(preview)+refactor(js): native in-node preview, de-vendor Fuse.js (main)
Port from feat: - Remove js/c2c_live_preview.js. The custom overlay drew on the node, over- lapping ComfyUI's own native in-node preview (latent_preview.py) — the "popup that shows nothing". Display is now 100% native. The backend guard (_c2c_preview_guard.py) is kept BUT clarified as backend-only: it just keeps ComfyUI's own previewer running (no draw, no node touch), so native preview survives --preview-method none / bad core updates without overlapping core. - De-vendor Fuse.js: js/vendor/fuse.min.mjs -> js/_fuse.mjs (part of the code tree, Apache-2.0 header intact), import updated, empty js/vendor/ removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0acd8ae commit 03113b2

4 files changed

Lines changed: 8 additions & 198 deletions

File tree

File renamed without changes.

js/c2c_live_preview.js

Lines changed: 0 additions & 195 deletions
This file was deleted.

js/c2c_workflow_find.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import { app } from "../../scripts/app.js";
2727
import { reportFailure as __c2cReport } from "./_c2c_report.js";
2828
import { C } from './_c2c_theme.js';
29-
import Fuse from "./vendor/fuse.min.mjs";
29+
import Fuse from "./_fuse.mjs";
3030
import { capabilityFor } from "./c2c_node_taxonomy.js";
3131

3232
const STYLE_ID = "c2c-workflow-find-style";

nodes/_c2c_preview_guard.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717
nodes should work").
1818
- Opt out with env var C2C_NO_FORCE_PREVIEW=1.
1919
20-
This pairs with js/c2c_live_preview.js, which renders a resilient HUD from the
21-
`b_preview` / `progress` websocket events the server now emits.
20+
No frontend overlap: this is BACKEND ONLY. It does not draw anything and does
21+
not touch any node — it merely ensures ComfyUI's OWN previewer runs, so the
22+
NATIVE in-node latent preview (latent_preview.py) displays during sampling.
23+
There is deliberately no custom JS preview; ComfyUI core renders the preview
24+
on the node. The get_previewer wrapper is purely additive (returns core's own
25+
result untouched whenever core produces one) and fully guarded, so a bad
26+
ComfyUI update can never break or be damaged by it.
2227
"""
2328
from __future__ import annotations
2429

0 commit comments

Comments
 (0)