Commit Graph
4 Commits
Author SHA1 Message Date
IxMxAMAR e8e673caf6 v0.3.1: collapsed-node stripe bleed + wire render mode dropdown off-by-one
- Skip theme decoration (accent stripe + drawForeground/drawBackground)
  when node.flags.collapsed. LiteGraph keeps node.size[1] at the expanded
  height when collapsed and does NOT clip per-node draws, so the 4px
  left-edge accent stripe was painting a vertical bar past the bottom of
  the collapsed title pill.

- Rewrite wire render mode dropdown with explicit label->value pairs.
  v0.3.0 used indexOf on a label-only array which mapped 1:1 to the
  setting value, but LiteGraph's constants are 0-based and non-contiguous
  (HIDDEN=-1, STRAIGHT=0, LINEAR=1, SPLINE=2). So picking "straight"
  actually set LINEAR, picking "linear" set SPLINE, and the bezier/
  manhattan options sent invalid 3/4 that LiteGraph fell back to default
  for. v0.3.1 maps each label to the correct constant, drops the
  fictional "manhattan (L-shape)" option, and adds "hidden".

All 33 JS tests still pass.
2026-05-21 16:19:57 +05:30
IxMxAMAR 3f9e39bb44 v0.3.0: security hardening, audit fixes, 10 new ops, theme UX (matchMedia perf fix + sandbox + leaks + features)
Critical security fixes
-----------------------
- Sandbox Jinja2 in template_render + prompt_template_render (was RCE via shared workflows)
- Drop user home dir from filesystem allow-list (was arbitrary delete/overwrite)
- Confine save_image_with_manifest + sanitize filename basename
- SSRF block on http_get/http_post/notify_webhook (catches 169.254.169.254 metadata)
- Case-insensitive path confinement on Windows

Critical correctness/perf
-------------------------
- halftone_dots: O(N^2) -> O(cells*36); was freezing worker on 1024+ images
- Preserve latent dict keys (noise_mask, batch_index) in latent_math/noise/upscale
- Preserve alpha channel in invert + threshold_binary on RGBA inputs
- Force odd kernel in mask_erode/mask_dilate to prevent H+1 shape mismatch
- Snap aspect_ratio_pick output to multiples of 8 (was crashing SD UNet)

Theme engine (JS)
-----------------
- Hoist window.matchMedia() out of per-frame hot path -> recovers 200 FPS from 25
- Wrap-once draw method to stop stomping other extensions wrappers
- nodeRemoved hook + WeakMap groups + in-place canvas reuse -> three memory leaks closed
- Wire thickness now uses connections_width (the wrap was a no-op vs LiteGraph)
- onGroupAdded auto-themes new groups; budget change triggers redraw
- Gradient caching in synthwave/glassmorphic

New ops (10)
------------
- json_path (programming): dotted/bracketed path extract
- latent_nan_guard, latent_pad_crop (mask_latent)
- mask_from_depth, mask_invert (mask_latent)
- color_match_histogram, image_composite_over (image_pro/value)
- frequency_separation (image_pro/style)
- pad_to_multiple (image_pro/spatial)
- save_images_zip (io_workflow)
- llm_enhance_prompt via Ollama / LM Studio / llama.cpp (prompt)

Theme UX
--------
- Right-click "Theme..." submenu on every node (including vanilla ComfyUI nodes)
- Auto-contrast title text (WCAG AA-based flip)

Tests: 373 Python + 33 JS = 406 passing (added 33 new tests for security + features).
Full review notes in CHANGELOG.md.
2026-05-17 15:41:19 +05:30
IxMxAMAR 5afe8e7eb1 release(v0.2.0): wires + 4 themes + category accents + group/grid sync + cache
Wire theming:
- per-theme wirePalette mutates app.canvas.default_connection_color_byType
- wire render-mode dropdown (straight/linear/bezier/manhattan)
- wire thickness + opacity settings via one-time renderLink wrap
- preserves ComfyUI's native execution-flow dots

4 new themes (15 total):
- Blueprint (cyanotype schematic, cached grid)
- Nord (frosted arctic)
- Synthwave (80s retro-futurism)
- E-Ink (monochrome with cached noise overlay)

Per-node-category accent stripes:
- themes declare categoryAccents map keyed by node.constructor.category
- 4-px colored bar on left edge of each node, matched by first path segment

Group colors + canvas bg sync:
- themes declare groupColors + bgGridColor; engine applies and restores

Performance:
- OffscreenCanvas pattern cache for static expensive draws (retro scanlines,
  blueprint grid, e-ink noise). O(area) -> O(1) per frame after first render.
- wire-engine fast path: zero overhead when thickness=1.0 and opacity=1.0

Theme schema bumped to v2; v1 themes still load (new fields just unused).

Tests: 340 Python + 33 JS (was 26).
2026-05-13 22:21:20 +05:30
IxMxAMAR 0c9765f75f feat(web): add ThemeEngine with idempotent applyTheme + WeakMap original snapshot 2026-05-06 14:08:46 +05:30