Commit Graph

26 Commits

Author SHA1 Message Date
Ethanfel 3fb63e44a3 fix: fully hide text gate stored_text widget (widget.hidden)
computeSize alone left the collapsed pill visible in the 1.47 frontend.
Set widget.hidden=true (what getVisibleWidgets filters on), matching the
pool node's hideWidget. Value still serializes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:14:55 +02:00
Ethanfel d0dafa1d39 feat: text gate protected mode — frontend toggle + hidden stored_text
Adds a '🔒 Protected (text node)' toggle. When on, the DOM editor is a free text
box whose value mirrors into the hidden stored_text widget; the node outputs that
text and ignores upstream (no pause, socket events ignored). Persists via the
protected + stored_text widgets; restored on configure. stored_text is single-line
so it hides cleanly (pool_id trick).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:48:33 +02:00
Ethanfel c869ecee2a fix: image gate Run-from-here fires Comfy.QueuePrompt command too
Same latent bug as the text gate: a bare app.queuePrompt(0,1) enqueues but
doesn't kick off execution in the 1.47 frontend. Execute the Comfy.QueuePrompt
command (the Run button's path), with app.queuePrompt as a legacy fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 08:15:19 +02:00
Ethanfel 8d785f5ca2 fix: text gate Run-from-here fires Comfy.QueuePrompt command so it actually runs
A bare app.queuePrompt(0,1) enqueues but skips the command-level run setup in
the 1.47 frontend, so the prompt never kicked off — you had to press Run
manually. Execute the Comfy.QueuePrompt command (same path as the Run button /
Ctrl+Enter) instead, with app.queuePrompt as a legacy fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 11:06:32 +02:00
Ethanfel b90d1befe6 fix: text gate sticky edit by intent, not upstream-text comparison
Run-from-here now preserves the edited text via an explicit _tgKeepEdit flag
set when the button is pressed, instead of comparing incoming vs last text.
A non-deterministic upstream (random/seeded prompt) regenerates text on every
re-queue, which made the old comparison clobber the edit. Normal toolbar Queue
still shows fresh upstream text.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:58:32 +02:00
Ethanfel 99a5ccac82 feat: text gate Run-from-here button + sticky edited text
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:39:51 +02:00
Ethanfel 10c2ea6d60 fix: pool profiles never auto-switch on connect; seed empty profile from current pool
Connecting a Pool Profile no longer overwrites the pool's pool_id. The pool is
switched only when the user actively selects a profile in the dropdown; picking
an empty profile while a pool with images is connected offers to copy those
images into it (new seed_profile op + /grid_pool/profiles/seed route), so the
current pool is never silently lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:14:44 +02:00
Ethanfel 0215bcb8f3 feat: pool grid exposes refresh hook for profile sync
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:03:37 +02:00
Ethanfel accd3230a6 feat: pool profile frontend — dropdown, actions, cross-node propagation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 20:02:59 +02:00
Ethanfel 259a63f8c2 fix: image gate preview fills node + freely resizable (Image Pool sizing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:18:28 +02:00
Ethanfel b46de4b031 fix: text gate editor fills node + freely resizable (Image Pool sizing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 19:11:56 +02:00
Ethanfel ef064db972 feat: text gate frontend — editable textarea + pass
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:49:00 +02:00
Ethanfel 6e27da0dce feat: show painted mask as a translucent red overlay on the gate preview
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:26:33 +02:00
Ethanfel f9f924942e feat: sticky mask + keep preview after routing + width-scaled preview
After a route choice the node now keeps the image and shows a 'Run from here'
re-queue button instead of blanking. The last painted mask is remembered and
auto-re-stashed on each new pause (with a Clear control) so it is not lost
between runs. The preview image area now scales with the node width.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 18:17:37 +02:00
Ethanfel 45e16e1134 fix: hide gate preview element when idle (no stray black box)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:59:04 +02:00
Ethanfel 63647d2488 feat: image gate frontend — preview, dynamic outputs, route/stop/mask
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 17:48:55 +02:00
Ethanfel d589a59fd1 fix: invert mask polarity so white = painted region
MaskEditor alpha comes through as 0 in painted areas; bake 255-a so the
MASK output is white where painted (region of interest).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:20:51 +02:00
Ethanfel 69968ebb20 fix: flex-wrap grid + free resize (drop width floor)
The DOM-widget width doesn't reliably track the node width in frontend
1.45, so force a fixed column count clipped the grid and the width floor
blocked resizing down. Use flex-wrap (cells wrap to fit, never clip),
drop the computeSize width floor (resize freely), and re-sync the widget
width + reflow on manual resize.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:19:00 +02:00
Ethanfel 66452dc1f0 fix: revert thumbnail size to 96px, keep wider 560 min grid width
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:49:24 +02:00
Ethanfel 8ea1a02b78 fix: stable grid width — fixed 4 columns + computeSize width floor
ComfyUI snaps the node to computeSize() on selection, and computeSize's
width ignores DOM widgets, so the grid collapsed/clipped on click.
Override node.computeSize to floor the width at the column-fit width.
Lay the grid out as a fixed 4 columns (128px cells) with the node sized
to fit; base width doubled to 560.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:45:41 +02:00
Ethanfel bc5c50b9a8 feat: grid badges + empty state polish
Index badge, has-mask dot, count, and empty-state message were added in
Phase 1; add drag affordances (grab cursor, cell hover) now that
reorder exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:13:19 +02:00
Ethanfel 25e89ada2b feat: drag-reorder slots
pool.reorder() permutes slots (validated permutation) and keeps the
active selection on its slot; exposed via /grid_pool/reorder. The grid
thumbnails are drag handles; dropping on another cell reorders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:12:53 +02:00
Ethanfel b115a0d449 feat: detach-pool context menu
Right-click 'Detach pool (new id)' assigns a fresh UUID so a cloned
node gets its own independent pool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:10:46 +02:00
Ethanfel a6ed79aabc feat: MaskEditor round-trip — per-slot mask persistence (Phase 2 complete)
Wire the per-slot mask button to ComfyUI's MaskEditor (frontend 1.45):
point the editor at the slot image via node.images + previewMediaType,
open it through the Comfy.MaskEditor.OpenMaskEditor command, poll for
the saved clipspace ref, bake the alpha channel into a grayscale mask
(white = painted) and POST it to /grid_pool/set_mask.

Also fixes DOM-widget sizing for frontend 1.45: size via the getMinHeight
option (the computeLayoutSize path) with NO max, so the grid fills and
grows with the node instead of detaching/locking on click; hide pool_id
via widget.hidden; suppress node.imgs so a registered output never
reserves a preview strip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:03:39 +02:00
Ethanfel cd0b8783dc feat: in-node grid UI — ingest/select/delete/label + Phase 1 complete
Render the pool as an in-node thumbnail grid with paste/drop/upload
ingest, click-to-select (active border), inline label editing, and
delete. Toolbar (upload/refresh/count) sits at the bottom per ComfyUI
convention; the node auto-grows to fit content.

pool_id is a declared STRING input (not a hidden input): ComfyUI only
fills hidden inputs for built-in types, but forwards every serialized
widget value by name. The JS mints a per-node UUID and hides the widget
via widget.hidden=true (frontend 1.45), keeping it serialized.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:59:59 +02:00
Ethanfel d75f73af2d chore: scaffold ComfyUI-Datasete-Gates package
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:51:54 +02:00