A template or negative box wired to a subgraph input showed an empty row on the subgraph node. The subgraph node now gets the full editor, reading and writing the value ComfyUI keeps for the promoted input.
A new eye button beside Load, Save and Clear marks every upstream variable that neither the template nor the negative template reads as internal. Assemblers below each writer are checked first and keep what they read; a Context module is flipped only when none of its variables is in use. Undo in the toast puts every widget back unless it was edited since.
Widgets marked data-wp-reveal get a wp-reveal event with the target before the blink looks: Context unfolds the bundles around the module, Toggles its label groups, the Injector its folded row list. Subgraphs are entered, never unpacked. The trace link underlines only its word.
The WP Debug variables view squeezed the kit Chip to 17px. Inside its 1px border that left 15px for a 10px line, so the icon and text sat on half pixels and Firefox rounded the icon up and the text down. 18px leaves an even 16px.
WP Context uses the kit's row-drag gap and line (bundle-coloured inside a bundle); a dragged bundle dims; a closed bundle takes drops on the middle of its header and opens.
Bump @dumiflex/wp-kit to 0.19.0. Toggles and the Context Injector drag on the kit's useRowDrag; Toggles groups reorder and toggles can drop below a group; grid tiles size to their content.
- Group layout is a grid button beside the icon and colour buttons.
- Control and output dots' tooltips say the toggle's name.
- A merged socket line says how many go in and out, names on hover.
- A Buttons toggle takes two tiles once two fit.
- A folded group keeps its toggles' input dots on its title.
- Socket carets line up with the group carets; control icons use the
rows' colours.
- Dots are placed from the layout, so a row being dragged doesn't drag
them along.
Folds Dependabot #372-#376 into one change.
- zod 4: z.record takes a key schema, SafeParseReturnType is now
ZodSafeParseResult, and a missing derivation else stays allowed.
- jsdom 31: visibility tests mount attached; FLIP and clip-path tests
accept jsdom's new CSS serialisation.
- Bundle budget raised to 685 KB: zod 4 doubles the lazy shape-check chunk.
Rows or Grid for the node and for each group, in both modes and every style. Grid tiles wrap to the node's width; wired toggles' dots sit on thin socket lines under a group's tiles, control dots packed on the left and outputs on the right, and a group's lines merge into one like the Context Injector's merged wires.
A toggle can say what its variable writes while off, with its own negative. Either a Value or an Off value makes the variable hold text; with neither it writes true/false. $name.bool reads the switch either way.
Wildcard steps list their options with weights and why each was cut, the pool chain, locked seed, separator and matched value; fixed values, combines and node templates show what they read; constraint steps link the steps they re-weighted; Model Info, Toggles, Injector and Context Loop rows carry their own facts.
lookup_var reads $name.bool from the toggles' on/off table; example 2's Var → Bool reads $quick_preview.bool since the Quick toggle's Value (12) now fills $quick_preview. Tests, docs note and release-notes line.
A17 Switches fills name, variable, value and When off in the toggle window (#361) and saves with its Done; the Pick one line says Show in Assembler. Retaken on the PC against dev f30185d3.
Variables grouped into per-node cards with kind squares, module facts, toggle true/false and value + .bool, Injector type chips, Loop frame line; long values fold until Show all; .axis/.bool/tags as kit chips. Trace stays numbered run order. Show node blinks the module or field on the canvas. Grouped right-click menus with a kind header. Loop trace rows, node warning labels and links.
A toggle with a Value writes it to its variable while on and nothing while off; its Negative goes with the variable. $name.bool reads the switch (true/false) across nodes, in text and in conditions, through __wp_toggle_bools__. Payloads reading $name.bool stamp schema 12; bool is reserved as a tag group.
Each toggle's settings open in a kit Modal: name, variable, looks (icon, icon/name/control colours on kit IconPicker and ColorField), Pick one value and negative, style, needs, when off. The header and the row wear the toggle's looks; the icon is a column beside the name and $var. Labels take an icon and colour. Window warnings use the kit Banner. Bundle guide raised to 670 KB.
* feat(note): pick any extension picture, and keep the Pictures panel open after adding
* feat(note): show the extension's pictures only once you search
* feat(note): preview the note as the node draws it, and let the icon picker fill the editor
* fix(ui): show notices and error lines as kit Banners
Hand-drawn red error lines, warning notes and info notes in the manager and a few canvas editors become wp-kit Banners (size sm), so they share the kit's tone, icon and role. Their old class rules keep only their margins.
* fix(ui): turn the remaining settings and chat notes into kit Banners
* refactor(note): open the note's text in the kit Modal instead of a one-off window shell
NodeEditWindow duplicated the kit's Modal (header, body, footer, × with Esc)
and lacked its focus handling. The note text window now uses Modal at size lg
with a ConfirmModal before discarding changes; NodeEditWindow and its kit
page entry are gone.
* chore(docs): regenerate docs index after dropping the NodeEditWindow kit entry
Callout hold rule, dead-pause fix after runs, A17 rewrite (toggle variables first), AI3 ends by rendering with the built pack's top bundle, AI1 line, box lines in A16/T10/T12, N13 at 20x, and three starter-library items (Daydream, Lights on or off, Shot per frame).
The text and a live preview move into a window like the module editors
(NodeEditWindow, shared with the Toggles editor). The node keeps tone,
look, colour, title, pin and the bookmark settings. An open Note or
Bookmark editor now lets presses on its background through, so the node
drags.
Graph walkers marked every WP Toggles variable internal, so the Assembler
showed none. Each toggle now has a globe (internal by default), Pick one
gets a node-wide style, the Value field is a rich input that warns about
inline picks and missing variables, and toggles drag into and out of groups.
Tailwind 4's preflight resets padding, margin and border on every element in @layer base, which ranked above the kit's @layer wp-extension, so the Popover lost its padding (Test Runner picker flush against its edges). layers.css, imported first, ranks wp-extension above base.
AI4 asks the chat for a tag from the local tag list instead of the live Danbooru lookup. Retake fixes: template tooltips left open (A04/A18/A19), A18 convert box timing, N12 grid label, T10 reset line split, T12 callouts held for their lines.
* feat(tutorials): in-depth Context Loop, Context Injector and Image Filter videos
N05 walks the whole Context Loop (frames vs batch size vs Run count, Edit
frame chips, Override Context seed, strategies, the seeds panel, Ctrl/Alt
click, values, a rule on $iteration, Seed List, Hold, Bypass loop). N04
takes the Context Injector apart and N12 the Image Filter (labels, prompt
edits with clip, the mask painter, Compare, Zoom, Send to Loop, the node's
settings). The old Nodes videos move to their new numbers (Debug N03,
Label & Grid N13, Note N14, Bookmark N15); N12 replaces the old N01.
* fix(tutorials): tick both rows in T03's bulk edit
The selection bar slides in after the first tick and moves the rows, so the
second click could land where its row used to be. Tick one row at a time and
check each one took.
* fix(tutorials): scroll T05's rules into view before boxing them
scrollTo now falls back to scrolling the part's own scrolling box when the
wheel doesn't move it, and T05 scrolls each branch (and the second action)
to the upper screen before its callout, so the boxes are on screen.
* fix(tutorials): narrate T06's canvas build so it plays at normal speed
The two builds had no line, so the render squeezed them to 4.5x and the
hand looked rushed. A line over each keeps them at normal speed.
* fix(tutorials): a hand at work plays at most 2x in the render
The Tutor now records when the hand clicks, drags, types or presses a key
(cues.json acts), and render.mjs speeds a silent stretch with hand work up
by at most 2x instead of up to 8x, so builds don't look rushed. The ten
longest silent builds (T04, A04, A05, A06, A09, A10, A12, L03 and two in
N14) get a line, so they play at normal speed.
* fix(tutorials): give N04's Injector room beside the stand-in nodes
The Injector landed on the first text box and covered its output, so the
first wire never connected. The stand-ins sit further right, the Injector
further right still, and the canvas slides left before the Context step.
* fix(tutorials): keep both ends of N12's new wires on screen
The mask wire was dragged from the filter to a node that had scrolled off
the top, so it dropped on empty canvas. The canvas now fits the nodes of
each wire into the free part of the screen first, and the new Set Latent
Noise Mask goes under the refine sampler.
* fix(tutorials): N05 and N04 fixes from the first takes
N05: zoom in on the Seed List while it's talked about (it sat under the
caption), and drop the callout labels that covered the frame chips and the
template. N04: narrate the Context / Assembler / preview build (36 s of
silence) and move the hand off the rows so the globe tooltip closes.
* fix(tutorials): paint N12's mask on the painter's canvas
In paint mode the mask painter replaces the detail image, so the strokes
aimed at an image that was no longer there.
* fix(tutorials): a single click doesn't hold a long wait at 2x
A Run click followed by a long wait counted as hand work, so the wait played
at 2x instead of being squeezed. A stretch now needs two or more hand
actions to be capped.
* fix(tutorials): tuck N12's picker away with its minus button
Escape in Detail goes back to the grid instead of tucking the picker away,
so the waiting pill never showed.
* fix(tutorials): box N12's two extra slots as a pair
The callout took one locator matching both slot dots, which strict mode
refuses.
* fix(image-filter): keep the picker's keys after a view change
Switching mode or leaving the painter removed the focused control and dropped
focus to body, so the picker's keys went to the canvas bookmarks. Focus goes
back to the picker. N12 hands the keys back before Compare and Zoom.
* fix(tutorials): L05 waits for Role's save to store a history entry
* fix(tutorials): a few clicks across a long wait don't cap the squeeze
* fix(tutorials): review 2026-11-11 first half (lines over empty canvas, late boxes, N12 framing)
* fix(tutorials): review 2026-11-11 A09-A19 findings
* fix(tutorials): review 2026-11-11 L03, L05, N14, E4 findings; jumpTo keeps tall notes above the caption
* fix(tutorials): A06 and T05 build their Context before the line
* fix(tutorials): N14 keeps the label's peek open through its line
* fix(tutorials): N12 boxes the extra slot rows; callouts fall back to the raw box
* fix(tutorials): N14 hovers the label before its line
* fix(tutorials): N14 keeps the hover card up while its line plays
Render: squeeze silent stretches over 12 s and cut a silent opening.
Tutor: clear tooltips after each line, close suggestion lists in DOM-widget
fields, deselect(), zoomOn(top), jumpTo() zooms example steps and boxes
their notes; the caption moves up over open lists.
Tests: AI4 fails on a refused lookup, AI3 fixes until clean, Assembler
preview out of frame (A05/A12/A13), actions before their lines, late and
oversized callouts, parts under the caption, Done before the outros.
* feat(tutorials): narrate with Qwen3-TTS, checked takes and a Kokoro stand-in
* fix(tutorials): load faster-whisper with a test transcribe, CPU when CUDA 12 is missing
* feat(tutorials): spoken text apart from captions
* feat(tutorials): voice short lines like statements
* feat(tutorials): render the voice at -19 LUFS
Fixes every recording issue from the tutorial video review; T10 shows ComfyUI palettes; records on Watchwright 0.16 high quality at 60 fps with correct colours.
The manager's Tailwind setup moves into CSS: tailwind.css imports
tailwindcss with source(none) plus @source for the manager files, the wp
colours and fonts are an @theme inline block, and postcss uses
@tailwindcss/postcss. Two compat rules keep v3's default border colour
and the pointer cursor on buttons. tailwind.config.js is gone.
The editor's tools (text toolbar, bookmark zoom box) need about 358 px and
the editor opened at 340, so they spilled past the edge. FORM_WIDTH is
360, the toolbar wraps on a narrower note, and the fitted size goes
through setSize so Nodes 2.0 hears it.
Restores clicks on a note's own buttons and links in Nodes 2.0 (specificity regression from #328), and lets the wheel scroll a long textarea under the wheel shield even when Firefox reports its overflow as visible.
Hidden rows inside a collapsed bundle no longer raise the WP Context width floor, and a collapsed bundle's header shows a dot for the worst conflict and library state among the rows it hides.
While a WP Note is being edited, the frameless pass-through gives the pointer back to the editor (legacy and Nodes 2.0), so Firefox's overlay scrollbars respond on hover. It takes it again when editing ends.
Without a Context the preview said '(template empty or unresolved)' about
text with nothing to resolve. It now reads 'plain text', counts $names
nothing sets as unresolved, and the empty variables row explains itself.
The negative row's line height no longer clips descenders.
The last-execute strip decided 'has run' from a non-empty source text or
a choice note, so Var → Int / Float / Bool reading an unset variable kept
saying 'run workflow to see result' instead of the amber default. The
host now passes an executed flag, and the strip names the unset variable.
In the legacy renderer every DOM widget sits in one layer over the
canvas, and ComfyUI's own clipping only cuts out the selected node, so a
WP panel showed through any node dropped on top of it. On each canvas
draw, each WP widget now gets a clip-path that leaves out the nodes
drawn after its own. Cleared under Nodes 2.0.
* fix(bundles): fill a child's missing payload hash so a new bundle isn't drifted
A bundle child saved without payload_hash (hand-made or imported packs,
like the tutorial library) came onto the canvas with no hash, and the
canvas reads a hashless row whose id is in the library as drifted. GET
now gives such a child the hash of its own payload.
* docs(release-notes): bundle children no longer drifted on insert
Clipped callouts, addNode blur, A04/A15/A16 test fixes, L06 tidy library, example workflows on an installed SDXL checkpoint without the missing-model toast or old tabs.
The Focus button on an unresolved-Assembler warning now opens the graph the node lives in (into a subgraph or back out to the root) before centring, selecting and flashing it, through a shared showGraph helper the Debug viewer's Show node uses too. The pre-run scan starts from the root graph, and the flash re-finds the Nodes 2.0 element once it is drawn.
Reworks the video tutorials from the review notes: a new precise tutorial library, every video moved to it, a new pool video (A03b), pool filter by variable in A05/A12/A15, and presenter fixes.
Import / Export gets a Wildcard files (.zip) button: picks become Dynamic Prompts / Impact Pack .txt files (engine/wildcard_export.py, POST /wp/api/export/plain), with a README listing what has no plain form. The community site vendors the exporter.
* fix(extension): explain an empty wildcard pool when no option has tags
* feat(wildcards): filter a wildcard's pool by a run-time variable
A $name term in a Pool filter or a reference filter reads the variable
when the prompt runs: options tagged with its value stay, options with no
tag in that value's group stay too. An unset variable or a value that is
no tag on the wildcard drops that term and files filter_variable_no_tag.
Constraints still apply on top. Stamps schema 11 (MAX_KNOWN 11).
* test(syntax): cover the filter variable helpers in the syntax suite
Current frontends give nodes text ids ("-10") and the root graph a UUID id, so walkers never crossed a subgraph's edge: variables set outside showed as missing inside. Nodes 2.0 only read the subgraph badge when a node rendered; each SubgraphNode now gets one badge getter up front and a change bumps a revision on ComfyUI's own reactive store. The Context Loop and Seed List chevrons sit at the right edge, level with the label.
* feat(tutorials): smaller straight-moving pointer, callouts follow their target, Flux Klein showcase
- the pointer is smaller and scrolls along a straight line to its target
- a callout follows its target and leaves when the target is hidden or covered
- the showcase loads a UNET + CLIP + VAE (Flux 3 Klein by default) or a checkpoint
- the voice reads LoRA, ComfyUI and $var_names the way they are said
- T01 boxes the whole Import committed toast
* style(tutorials): shorten speak.py docstring
The preview dropped 11 instance keys the engine reads (constraint reach, cell/exception overrides, derivation branch edits, hold seeds), so it could show picks the run never makes. A test now checks the whitelist against the engine handlers.
A06 showed the fallback with the constraint below Setting, where it reached nothing. The video now shows the wrong pick and the badge, drags the constraint into place, then shows the throne room on every seed.
Picking a LoRA inside <lora: inserted only the path, leaving no weight and no closing bracket. Commits now close the reference (or keep an existing weight), absorb a < the user typed, and rewrite <embedding:...> into embedding:name.
Get started opens with the tour (T00), then the library import (T01), then the first prompt (T02), with re-chained narration and a 2.21 version note. AI1 says models can make things up and bigger ones do better.
All 51 video tutorials as Watchwright tests in tutorials/ (T00-T12, A01-A19, L01-L06, N01-N05, E1-E4, AI1-AI4), with the Tutor fixes found while recording them.
The field's editor is an async component, so open() often couldn't find it yet; the empty field then folded shut. Look for the editor for a short while, and don't fold on the add button's own focusout.
The negative box is our own DOM widget, which ComfyUI never fills from the input's default, so a new node's box stayed empty. Fill it in onNodeCreated, before a loaded workflow writes its saved value.
The in-node preview rolled every Context on seed 42, so changing a Context's seed never changed it. It now rolls each Context on its own seed widget (frame 1's seed under a Context Loop that overrides seeds).
Leaving an editor with Discard & leave kept its autosaved draft, so the next
visit offered to restore the edits just thrown away. The unsaved guard now
calls the editor's draft.discard(), which also cancels a draft write still
waiting on its debounce.
* fix(tutorials): cut page loads out of the videos
go() waits for the line being spoken, then the page load and the canvas
clean-up are cut from the video instead of playing under the narration.
* fix(tutorials): open the page before the line that talks about it
A line spoken before go() played over the previous page (at the start of a
take, the last take's canvas). Load first, then speak; a take that opens a
page first starts after that load.
* fix(tutorials): never wheel-scroll on the canvas, where the wheel zooms
* chore(tutorials): T04 hides Hero and Outfit once the combine uses them
* chore(tutorials): show WP Debug while the showcase images land
* chore(tutorials): T07 templates: save, load and edit Prompt Assembler templates
* chore(tutorials): T08 bundles; keep WP Debug above the captions
* chore(tutorials): T09 Context node, A01 tag groups, hide unused variables, WAI checkpoint
- T09: seed after-run modes, item seed lock, row menu, per-node edit, node help
- A01: tag groups (descriptive and accepts), $gear.SHOES; Travel gear in library.json
- T04, T05, T08 hide variables no template prints; T08 opens its bundles before folding them
- Fast-forward waits for the caption so it no longer flashes past
- WP Debug refits after each run; a tall Context folds its rows first
- Default checkpoint waiIllustriousSDXL_v170
* fix(tutorials): render starts a sped-up part after the caption on screen ends
* fix(tutorials): WP Debug sits snug under the Context; node search retries; T09 picks Randomize
* style(tutorials): wrap a long line in speak.py
* fix(tutorials): keep voice in sync, bigger previews, one bundle open at a time
render.mjs makes the recording constant frame rate before cutting it (the
recorder only writes changed frames, so still stretches dropped out at each
cut and the picture ran ahead of the voice), lines the voice up at every
sync mark and paints the marks out. The hand waits until the voice is
partway into a line, and page loads no longer wait for the line to end.
Nodes sit higher and the Assembler further left, so the preview and the
Debug rows fit; T08 opens one bundle at a time; T09 really sets Randomize.
Match the pane by its .graph-canvas-panel class too (no id before 1.55) and find the top menu as the sibling above the pane's column on any layout (no graph-canvas-gutter before 1.54).
Style-neutral people packs (Person, Location, Wardrobe, Light, Camera, Direction, Render), four generated example workflows (One image, Batches and grids, Pick and refine, Sets and stories) laid out left to right with wires on reroutes, and Start here notes with bookmarks and the toolbar help picture.
The job progress panel grew ComfyUI's top menu and pushed the canvas pane, the dock and every jump down; the free area now follows the layout only (menu bars, transient pieces ignored, small edge pieces avoided instead of read as bars). The shortcut probe now carries keyCode/which, so hotkeys-js handlers like ComfyUI-Easy-Use's Alt+0-9 are seen.
Pictures pasted, dropped or picked into a note are re-encoded in the
browser (long side 1280 px, about 400 KB, EXIF dropped) and saved in the
note's config, named in the text as . The extension
also ships a picture of the node toolbar with its ? help button
(wp:asset/toolbar-help). {width=N%} sets a picture's width as a share of
the note, so it never makes the note bigger; the editor's Pictures panel
has a Width slider, Own size and Remove.
Nothing loads from a web address: the chat parser only emits image nodes
when asked ({ images: true }), and the note resolves only its own two
kinds; the chat keeps alt text.
The engine always resolved a @{} ref from the WP Context node's own rows first (switched-off rows and rows in switched-off bundles included), then the library. The wildcard editor's option rows and the derivation editor only asked the library, so refs to node-only wildcards showed red "not in the library". Both now check the node first; RefChip hides Open for node-only wildcards. Engine tests cover switched-off rows, switched-off bundles, two-level nesting and the example workflow.
The theme detector reads the active colour palette first, then the dark-theme class, then html's computed color-scheme; it also watches html's style for palette switches.
Adds the tutorials/ Watchwright pack (T01 "Your first random prompt"), Kokoro voice lines and render.mjs; bench resetLibrary checks the fixture's own module count.
With nothing real wired in, a WP Node Group inside a canvas group stands for that group's nodes, like rgthree's Repeater. Covers picks its smallest group (inner groups included), that group without its inner groups, or every group around it. A wired-in relay doesn't count, and the nodes it watches stay out. When several toggles of one WP Toggles node reach a node, off wins (mute beats bypass), so the result no longer depends on which toggle changed last.
The smoke and library packs no longer limit reset or the Load the bench library task to the fake server. A reset always backs the library up first (pinned), including with putBack off. All six tasks stay in all three packs.
The help window over the canvas shows the docs in a frame with no
assistant chat, so the button set the chat state and nothing showed.
In the frame it now opens the manager on the same page in a new tab
with ?ask=, and AppLayout opens the chat with that question in its box.
Every node page opens with a picture shot from a real run (scripts/docs-shots), with pins on its sockets and controls placed from the page and a legend drawn from the node's field list (DocAnnotated).
The formatting bar set the textarea's value from script, which the browser's
undo never sees, so Ctrl+Z skipped or lost bold, lists, links and icons. The
editor now keeps its own steps (typing grouped until a pause, caret move or
new line; each toolbar edit a step) behind Ctrl+Z, Ctrl+Y, Ctrl+Shift+Z, the
right-click Undo/Redo and new undo/redo arrows at the start of the bar. The
note editor docs picture is retaken with the arrows.
Each WP node's fields live once in src/manager/docs/node-fields.ts. The docs pages draw them with DocFields, and pnpm docs:help writes them into docs/help/WP_*.md. Tests fail when a node socket has no field or a field names a socket that is gone (tests/fixtures/node-sockets.json, written by scripts/dump_node_sockets.py).
The list was only re-checked on input, so moving the caret without typing (Home, Ctrl+Home, arrows, a click elsewhere in the field) left it open for the token the caret had left, and Enter inserted that suggestion at the new caret. A selectionchange listener, live only while the list is open, re-probes whenever the caret moves inside the field.
A wp:library link in a WP Note becomes a button that adds every bundle and module the workflow (or one WP Context) carries that the library is missing, after a review dialog that offers Use mine, Replace or Keep both for rows already there with other content. It goes in as one import commit with the Import tab's checks, the workflow rebound to what went in, and Undo. A wp:community/owner/pack link opens a published pack in the Community tab. The link panel gains Library and Community kinds, and the example workflows' Start here notes carry the button.
Shared lifecycle (bench/lifecycle.ts): setup saves the library and AI settings, teardown restores them live, a stopped run keeps its library for a resume, and tasks are on the pack page. Bench fixes from the 9B run review: delete permission, T1 stand-in, one fix-did-nothing flag per problem. Video on problems, dashboards, and a new bench/library pack (D1-D7).
Serve index.html with Cache-Control: no-cache and hashed assets/ as immutable; a missing assets/ file is a 404, not the shell. A boot watchdog in the shell waits for the server and reloads on a load error (3 tries a minute), then shows a Reload button. After mount, a failed route chunk reloads to that route. Troubleshooting doc entry.
wp-kit 0.14: the switch is ComfyUI's own Nodes 2.0 switch, checkboxes are bigger with a 24 px click, number arrows wider, icon buttons take clicks past their edge, segmented options taller. WP Toggles' Pick one circles 18 px with a 24 px click; the frames fold is 20 px tall. Bundle budget 614 KB.
Select a WP node and the selection toolbar shows an indigo "?" that opens the node's docs page in a dialog over the canvas. WP Toggles, WP Note and WP Bookmark also get an indigo pencil there that opens or closes their editor, in place of the pencil they had on the node. Works in classic LiteGraph and Nodes 2.0.
The browser's own line break split the caret's text span and wrapped the copy in a <div>, data-atom-index included. Two spans then claimed one atom, so every later edit wrote the whole text into both and the value doubled: Backspace looked dead and Space copied the template over and over. The line break never reached the value either.
Enter and Shift+Enter now splice a \n into the raw text like a paste, a trailing newline gets a ZWSP pad so its line shows, and a host where two elements claim one atom counts as stale and is rebuilt.
Restore copied the backup file over the library at the next start because swapping a SQLite file under open connections corrupts it. It now copies the backup into the open library through SQLite's online backup API, after checking it and saving the library as a pre-restore backup, then migrates it. The Backups panel refreshes the library and offers Undo.
ComfyUI's selection toolbox and its toasts were read as fixed chrome when a
jump measured the free canvas. The toolbox moves with the selected node, so
each press pushed a selected bookmark further down; a toast moved the dock
and the jump spot while it showed. Both are now skipped.
The dock's edit mode gains Land clear of the dock (on by default). Off, a
jump lands where it would without the dock, behind it.
Firefox draws a bordered element with a full-pill radius in pieces that seam at fractional canvas zooms. Note buttons, Bookmark pill, Node Group chips and Debug codenames now use a finite radius just under half their height, with a guard test.
Identity sections, injector rows and modal, toggles, label grid, model info, context loop, bookmark, runtime match, value row and note fields use the kit's size/mono/tone/prefix props; var-binding-input.css is gone.
RichTextInput's suggestion list follows the caret, its filter picker and remap popup, the var and chat autocompletes, the AI selection chip and the ref chip / pair badge hover cards are kit Popovers; canvas modal fields drop their look-alike styles; kit-guard gains raw-teleport and every rule is at 0.
The injector insert menu, TagPickerMenu, the selection toolbar's menus and the sub-category pill menus move onto the kit's Popover and DropdownMenu; Add child to bundle is the kit Modal. Kit 0.11.0.
BREAKING CHANGE: the canvas confirm dialogs are the manager's dialog now (ConfirmModal on Modal + ModalShell): 32px buttons, and they close on Escape, the x, Cancel or a backdrop click that starts on the backdrop.
requires-comfyui was >=0.3.36, but comfy_api.latest only exists from
ComfyUI 0.3.48 and WP Context Injector uses io.Schema(accept_all_inputs),
added in 0.11.0. Raise the floor to >=0.11.0 so the Manager warns before
installing on an older ComfyUI.
The Manager card shows the banner about 275 px wide, where the old
banner's text is unreadable. Add comfy-card-banner.svg (logo plus a small
node graph, no text) and point Banner at it.
Kit 0.5.0. Places that wait for data show kit Skeleton shapes: list rows and tag filters, the Dashboard's counts and lists, the editors (EditorFrame loading), the canvas pickers (first load only), Categories, Tags, the Test Runner rail, Library health, What's new, saved chats, Export, AI settings, Database and Backups. The hand-made picker skeleton CSS is gone. The js/ budget is 596 KB.
moduleStore.fetchAll clears items when the kind changes (Wildcards -> Constraints showed wildcard rows under the Constraints columns), keeps them for a search on the same kind, and drops a response that is no longer the newest. The Dashboard decides on the New here? card only once the counts have loaded.
The library pages' tag filters, ModuleListView's Syntax and Content filters and bulk tag pickers and the Test Runner's kind filters are <Chip :pressed size="sm">; the Syntax tints are Chip's color. The Test Runner's module picker is a kit Popover. The topbar Discord hover reads --wp-brand-discord. kit-guard: raw-hex 1 -> 0, hand-dialog 4 -> 3, manager-raw-button 238 -> 224.
Load/Save template, the bundle picker and both Push to library dialogs, the injector binding editor and the Seed list modal open in ModalShell instead of their own overlay and Escape handling; the AI debug log is a Popover on its top-bar button. Seed list's buttons are WpButton and its inline SVGs PrimeIcons. kit-guard: hand-dialog 13 -> 4, inline-svg 21 -> 16.
Animate registered custom properties instead of transform/opacity in the AI working line, streamed reply fade-in, Explain chip, chat reactions and the pack builder's web search ask, so they repaint each frame instead of being lifted onto compositor layers (rasterised once, snapped to whole pixels).
AiWorking draws the logo from the kit's logo-paths and BRAND_COLOURS, the colour pickers use COLOUR_PRESETS / DEFAULT_COLOUR, the bundle frame colour popover is the kit Popover, and fixed text colours read --wp-on-accent / --wp-on-media / --wp-scrim. Raw hex 93 -> 1.
Jumps and the Bookmarks dock measure ComfyUI's canvas pane, so they keep
out of the open side panel and bottom panel and follow them, and step
around the minimap and zoom controls together. The dock snaps to a 3x3
spot when dragged, is more see-through (more when folded) and spaces its
rows. Recording or suggesting a shortcut sends a synthetic key press that
finds a key another extension claims without running it, and a key
stopped before it reaches the bookmark is remembered. Bookmark pills are
no longer resizable.
The note renderer dropped what the shared parser already reads: column
alignment, task boxes, heading levels and GitHub alert quotes, and tables
had no styles (centred headers, no lines). Tables now sit in a rounded box
with row lines and a header faintly tinted with the note's colour.
The manager and canvas import the kit from the @dumiflex/wp-kit package through the @/kit alias instead of a copied src/kit; kit-pull and the kit:check CI step are gone.
Adds ListRow, ChipToggle, a pressable Chip, a flush Disclosure, ConfirmModal gates, DragHandle, the ModalShell label, checkable menu items, a swatch RadioGroup, COLOUR_PRESETS and the on-accent / on-media / scrim tokens (now defined in the canvas theme.css too).
Every var(--token, #hex) fallback goes (shared tokens are defined on both sides; the canvas gains --wp-axis; old names map to current ones; --wp-bg-deep falls back to --wp-bg). The kit guard skips src/kit/, stops counting HTML entities as colours and allows the prompt-writing guide's quoted hex. raw-hex 835 → 94, inline-svg 25 → 21.
Adds example_workflows/ (One image, Batches and grids, Pick and refine),
listed by ComfyUI under Browse Templates. Every list sits on its WP Context
as bundles and sub-bundles, so they run on an empty library. Start here
notes, step notes that double as view bookmarks, links to the docs and to
outside guides, and WP Toggles driving LoRAs, a Node Group via a Mode Relay
and a Pick one steps choice.
Rows and bundles flagged example show a neutral EXAMPLE chip instead of
MISSING until saved to the library. A pytest runs every example on an empty
library and fails on rejected payloads, warnings or empty prompts.
Nodes 2.0 attaches a DOM widget's element to its slot only when the slot
mounts. Undo/redo rebuilds the nodes with the same ids but keeps the slots,
so they kept showing the old, unmounted host. A new host still off the page
now takes the place of the stale host for the same node and widget.
A relay heard its watched nodes' modes only on the 400 ms poll (slower
on a still canvas), so a chain of toggles, groups and relays lagged hop
by hop. watchModes (reactive.ts) subscribes to a changing set of nodes
through the mode intercept: the relay listens to what it watches and a
group to its members, and both pass changes on in the same tick.
Changing a relay's choice now applies it to the watched nodes' current
state instead of waiting for their next change.
WP Bookmark loses its node frame like WP Note (shared _frameless.ts and
frameless-node.css): read, it is a pill with its icon, name and shortcut,
a pencil when selected, and a double-click opens the editor card, which
now holds Go, Pinned (ComfyUI's pin) and Use this view: land on the view
on screen, at its zoom, besides the 3x3 grid. Show on canvas applies on
Done. The icon is picked from the note's inline grid.
Jumps measure the free part of the canvas (walking in from each edge with
elementsFromPoint past the sidebar, breadcrumb, toolbar and zoom bar) and
only move off the dock when they would land under it. The dock sits in
that free area, can be dragged in edit mode (position saved), and is
see-through until hovered. The top-bar button wears our button style.
Suggest skips the key a bookmark already has and keys another extension
was seen taking (remembered once a press is stolen). A Step note shows its
number in the dock, a pinned note a pin mark. Frameless nodes no longer
sit a title bar higher in Nodes 2.0 than in Classic.
WP Bookmark is a frontend-only node that marks a spot on the canvas to jump back to: where it lands on screen (a 3x3 grid), a set or kept zoom, and a recorded shortcut with a clash check against ComfyUI, user rebinds, other extensions, other bookmarks and rgthree bookmarks. Jumps glide, open subgraphs, land beside the dock and go on a Back stack. A bookmark can be hidden from the canvas; muting turns its shortcut off. It has a one-line read view and an editor.
The Bookmarks dock (top-bar button) has a view mode to jump from (Back, Previous, Next) and an edit mode to reorder, show or hide, switch side and bookmark the current view. A WP Note can also be a bookmark through its Also a bookmark switch. Keyless commands and a canvas menu entry come with it, plus docs, screenshots and release notes.
A link's attribute block takes a colour: {button pi-play #22c55e} for a
button, {#22c55e} for a text link; without one it keeps the note's tone.
The link panel has a Colour row for it.
Links and icons went where the caret was when their panel opened, so
clicking in the text after opening the panel put them at the old spot
(usually the end). The editor now tracks the textarea's selection while
a panel is open and inserts at the latest one.
Canvas only (no ComfyUI sidebar, tabs or Run bar over the preview), the
three nodes framed with room around them, and the XY plot large enough
to read its title, headers and cell labels.
WP Note no longer shows a node frame in either renderer, its selection outline hugs the panel, and it drags and resizes (an unpinned note no longer comes back pinned). A Label shows its text and links in a hover card, and double-click edits a note in Nodes 2.0 too. The editor gets a formatting bar, links to a web page or any docs page and section (as a text link or a button with an icon, anywhere in the text), icons from the full PrimeIcons set, Step / Icon / Plain tones and theme colour presets. Keys typed in the editor never reach ComfyUI's shortcuts.
WP Toggles rows can mute or bypass the nodes wired into a dot in front of them (or canvas groups), with invert and a status icon. New frontend-only WP Node Group and WP Mode Relay. Clean and edit views, upstream overrides, Pick one values and priority, and fixes for dot placement, grips, labels and variable fields.
A new node for many on/off switches: each toggle writes $its_variable as true/false (always internal) and can show a BOOLEAN output level with its row. Needs links, Pick one, label groups and four styles. Merge into WP Toggles turns selected Boolean nodes into one node with their wires kept.
A short note (up to 600 characters) in Settings > AI assistant > About my
library. The chat, every Draft with AI panel and the pack builder read it
after their own instructions, and it wins over how existing items are
written. A chat keeps the note it opened with, so an edit never changes an
open chat's prompt. Suggest drafts a note from the library summary and
sample option text for the user to edit; nothing is saved until Save.
The note is stored with the shared AI settings (ai.json), not per model,
and a note that asks for a minor or non-consent in a sexual context is
refused like a pack request.
One page that checks the whole library for broken references, constraint
rules for options that are gone, variables nothing sets, duplicates, unused
items and other clutter, with Open, Delete and Ignore on each row, plus a
variety check that runs a bundle over 200 random seeds. An open canvas tab
reports which library items and variables it uses, so canvas-only items
don't read as unused. The sidebar shows a problem/warning count and the
Dashboard health card uses the same checks.
Manual backups were never pruned, so the list filled up. Pruning now keeps the newest unpinned backups of every reason, and Back up now prunes too. A pin (a .pin marker file beside the backup) exempts a backup from pruning and from the count; the backup staged for restore is never pruned either. Existing manual backups are pinned once so none vanish on update.
Back up now takes an optional short note, kept in a .note file beside the backup and shown in the list instead of Manual.
The manager's controls, theme sheets and the canvas ConfirmDialog come from wp-kit (src/kit/, pulled at f3841a3); the old copies are gone and every import points at src/kit/. No visual change (theme audit on all 398 screens).
Replace semantic-release with the Watchwright flow. A push to main opens a release PR that bumps package.json, pyproject.toml and the manifest; it merges itself once CI passes and docs/release-notes/next.md has notes. Merging tags a draft release, which the publish job fills with the zip and the curated body before publishing it, so the Registry and Discord workflows still run on release: published.
After a release, main is synced back into dev, and a PR into dev drops the shipped lines from next.md and puts the body on top of CHANGELOG.md. Pushing to beta still cuts x.y.z-beta.N prereleases. Adds a pr-title check and fixes the zip's ship list (fonts/ ships; bench/, SECURITY.md, eslint-baseline.json are dev-only).
The shared pieces moved to DumiFlex/wp-kit so the community site can use them too. src/kit/ is a copy of wp-kit's src/ at one commit, brought in by scripts/kit-pull.mjs (pnpm kit:pull <ref>), which records the ref, commit and file hashes in src/kit/kit.lock.json; pnpm kit:check in CI fails on a hand edit. Imports, registry, baselines, scans and docs point at src/kit/. Nothing changes on screen.
Step titles in the bench and smoke packs now say what each step does (the request, the panel and mode, which card is applied), so the video timeline reads as the test's story. The bench flags answers from the fake model as info, keeps that across pack reloads, and flags a greyed-out Install as not-installed.
Every smoke test now runs its phases as steps (send, apply, undo, ask,
plan, build, install, ...), so its video gets a timeline in Watchwright.
On bench/dev/serve.py the fake's made-up answers rarely make a card, so
a turn or panel with nothing to apply flags fake-answer (info) there
instead of the no-card / not-saved robot flags. P11 flags not-installed
when Install stays greyed out after the build instead of breaking on the
click.
Nodes 2.0 rewrites a slot row's class list while a link is dragged, which wiped our markers and dropped every moved dot back to the top. Rows are now marked with data attributes, which Vue leaves alone.
Settings gets an About section: version, license and repository (moved from General), the author, and support cards for GitHub Sponsors, Buy Me a Coffee and PayPal, plus links to star the repo, join the Discord and share modules. The README gets a Support section.
A switch knob, slider thumb, step mark and round x button stayed a circle inside a squared Terminal / TUI / Crisp box. They now take min(50%, var(--wp-radius-cap, 999px)), so they square with the look and stay round on the canvas. Terminal draws an on switch outlined like its buttons; TUI radios read ( ) / (*) like its [x] checkboxes.
The theme audit now fails on a circle inside a squared control and on a TUI radio that misreads its state, and the static test makes every 50% corner either follow the cap or say why it stays round.
A Watchwright pack (bench/smoke) that runs every AI entry point once and
checks it pass or fail: Test connection, chat cards with Apply and Undo,
deleting on and off, mentions, questions, open, every editor panel, the
pack builder from plan to Undo, and the safety guard.
bench/dev/serve.py's fake model now takes a script (POST /fake/script)
of exact tool calls, replies and JSON answers, and logs the calls it got,
so a test knows which card it should get. The bench's collectors and
library reset move to bench/shared.ts for both packs.
* fix(canvas): wire dot hover reads the real hover state; loop dot centred on its box
* fix(canvas): negative dot centred on the box, not the whole widget
Optional text inputs (Label & Grid, Model Info, Prompt Cleaner, Context
Loop) no longer add labelled rows at the top of the node. A shared helper
(extension/field-sockets.ts) puts each dot at the left edge beside the
field marked data-wp-socket, hidden until the field is hovered or the
input is wired, like a built-in widget's dot. The Assembler's prompt and
negative dots use it too, and the negative's dot follows it when folded.
Works in Nodes 2.0 and the legacy canvas.
One frame per line (or list entry), each writing $iteration_value; with a sweep on, every value runs every combination. The node takes its inputs as lists so a wired list runs one loop, and count follows the last run.
Optional label_text, title, row_headers and column_headers inputs beat the panel's fields. A single one-line label covers every image of every item. The panel has bottom spacing above the preview, and the label tokens explain themselves on hover.
Labels images and lays them out in one labelled grid or an XY plot, from one image up to a loop's frames of batches. One DOM widget with kit controls, grid presets that follow the run's shape, and a new shared ColorField kit control.
The node reads a $variable and sends it into a dropdown input such as
ckpt_name, sampler_name or scheduler. ComfyUI never checks a linked
dropdown value against its options, so it reads the option list of
whatever its output feeds (from the hidden prompt) and matches the text
exactly, loosely (case, folders, extension and separators ignored, then
the shortest prefix or substring) or closest (typos). On a miss it uses
the fallback and warns, or stops the run.
The fallback is a dropdown the canvas fills with the options of the
input the output feeds, "(first option)" by default; validate_inputs
lets a picked value through ComfyUI's list check and the run checks it
against the real options.
The output is * because V1 nodes declare dropdowns as a Python list,
which a COMBO output fails type validation against. The var picker
widget names what the output feeds and how the last run matched.
The painter gets Lasso (fill what you drag around) and Fill (the area under
a click, up to the lines you painted) next to the brush, Paint / Erase for
every tool (X swaps), Hardness for a soft edge, Strength to mask part-way
(one stroke stays at its strength where it crosses itself), [ ] for the
size and Undo / Redo. The mask maths lives in mask-ops.ts on plain alpha
buffers; the sliders are the kit Slider, and arrow keys on one no longer
step the picker to the next image.
Every image gets a label ("#3 · red · pencil · 2" by default) that the
picker can rename under its Grid tile or its Detail title. The new labels
output sends them in step with images, one line per image of an item, and
sits last so saved workflows keep their links. The Mask tab previews a
painted mask over the image or on its own.
A stopped embedding server printed "embedding the library stopped" every few seconds. Failures now pause the background fill per server+model (30 s doubling to 10 min), log once per new message and once on recovery, and the Library index row says why. Errors that repeat on every queue or keystroke print once per distinct error (engine/log_once.py).
Search (Ctrl K) lists Recent first, then Go to, Create, Actions, Library and Categories. The empty row checkbox gets a visible edge. Tweaks and Settings > Appearance name each accent. The assistant header lays out in two rows on a narrow drawer.
Tweaks panel on the shared Drawer, Version history on Modal with a CodeBlock snapshot, Database card details on DescriptionList, inline Logo in the top bar and Dashboard, and the AI pointer live region on VisuallyHidden.
The mode watcher that lets our widgets react to mute/bypass replaced
node.mode with a plain value slot. The frontend instruments mode itself
and its setter is how Nodes 2.0 learns a node changed, so our nodes never
got the purple tint, the dimming or the Bypassed tag there. Wrap the host
accessor instead of replacing it.
Hand-written <kbd> chips in the canvas editor footers, pickers, seed list,
command palette, shortcut sheet, topbar and search boxes now use the kit
Kbd (Mod reads as Cmd on a Mac). The shortcut sheet shows alternative keys
as 'up or down' instead of a chord. Error details, maintenance reports, the
Test Runner template, saved Context data and the push/save previews use the
kit CodeBlock with copy and wrap.
TUI checkboxes no longer draw [x] and the tick, the Favorites only filter is the kit Checkbox, the bulk bar wraps, and the Theme's own swatch is a clean circle. A new --wp-radius-cap token squares every corner in Crisp, Terminal and TUI; dashboard tabs and the reach picker use WpSegmented; settings nav, test runner list and pack steps follow the look. New CI job theme-audit (Playwright over every screen, look and palette) plus a raw-radius guard test.
- Autocomplete: Write tags with spaces and Escape brackets in tags, canvas
settings plus manager copies (Settings > Autocomplete, Manager and Canvas
columns), applied in the prompt editor and the AI chat box. Short
emoticon tags keep their underscores. Both off by default.
- Row buttons (always / on hover) for Context rows and bundle headers; a
pressed lock or internal button always shows.
- Display playground: sample toasts, an autocomplete box over sample tags
and a validation conflict list under the module preview.
- Subgraph badges now follow Validation strictness (filterByValidation is
shared with the node rows).
Detail's side panel keeps Pick, Compare and Pick frame at the top and
puts Values, Prompt and Mask in tabs. Each prompt value is marked in its
own colour (the same in Values) and hovering a mark names the variable;
Prompt and Negative get copy buttons and a text only tag replaces the
no-CLIP note. The Zoom button in Detail is gone. The strip groups a
loop's images by frame, and Grid's frame head counts its picks with a
Pick frame button.
WpImageZoom gains minimap, autohide, a synced second picture and a
fullscreen slot; the picker uses them for a mini-map, a fading bar, a
fullscreen strip with Keep picked, a Picked badge and side-by-side
compare (C) in Zoom.
The docs search box searches the text of every page (the docs index the
AI chat reads, loaded on the first search) and lists matching sections
with the words marked; a result opens the page at that section. / focuses
the box, Enter opens the first result. Sections get anchor ids and a copy
link button, wide windows show an On this page list that follows the
scroll, and every page ends with Previous / Next in nav order.
A canvas tab now announces every change to its settings (ComfyUI's
panel, the playground) on the wp-canvas-settings channel, and the
manager's useCanvasSettings applies it at once instead of waiting for
focus. Messages carry a source so a canvas ignores canvas echoes.
Settings > Autocomplete shows Manager and Canvas columns; the canvas
copies (CANVAS_AUTOCOMPLETE_SETTINGS) go through useCanvasSettings.
The three autocomplete source settings now notify editors on any change,
not only from their own switch.
Screenshots open the page's Lightbox (zoom, arrows step through the page's
other screenshots), callouts are Banners (role note), How it works boxes are
Disclosures, shortcuts are Kbd, the Modelfile and pack templates are
CodeBlocks with copy, and warning severities are Badges. The docs index
keeps Kbd, CodeBlock and Disclosure heading text.
ComfyUI's reka Settings dialog sets body pointer-events to none, traps
focus and closes on outside clicks or Escape, so the Display playground
opened from it could not be clicked. useHostDialogGuard re-enables
pointer events on the overlay, cancels reka's outside events and keeps
its focus trap and Escape away from the playground, which now uses
useDialogFocus.
The autocomplete switches copy the frontend's Switch geometry and theme
tokens (--border-default, --primary-background, --base-background) with
PrimeVue token fallbacks, keeping the count beside them.
The mask painter shows a ring under the pointer at the brush's real size
(dashed for the eraser) instead of a crosshair. WpImageZoom gains an
optional fullscreen button (key F) that fills the screen with the viewer,
bar included; the picker's Zoom mode turns it on.
DataTable gains `row-clickable` (rows take focus and emit `row-click` on
click or Enter; a row's select box doesn't open it) and `active-key`. The
Samples tab and the inspector's option table use it, so their columns sort
and the open seed is the table's active row.
- The constraint matrix cell editor (node and library grid) opens in the
shared Popover, anchored to the clicked cell (new `anchor` prop), instead
of its own Teleport, placement maths and outside-click handlers. Its
state buttons are WpButton toggles.
- Derivation rule cards and the import / export picker sections fold with
Disclosure; the rule switch and drag grip sit in `#actions`, the picker's
select-all box in the new `#lead` slot, so no control nests inside the
heading button any more.
- The exceptions mode chip and the Context toolbar's drift refresh are
WpButton; the Cleaner's rule toggles are WpCheck boxes.
Tweaks density and the Test Runner seed mode are WpSegmented, the AI
provider list is RadioGroup (cards, with a new label slot and
test-prefix for the Local/Cloud badge and the key mark), and the
import conflict actions are an attached Toolbar of Buttons instead of
buttons in a radiogroup that never acted as one.
The Debug rule cards and the constraint matrix legend fold with
Disclosure, the blocklist mode is WpSegmented, the Debug seed/id chips
and InstanceIdChip are inline CopyButtons, and the Sweep panel, tag
pool, Cleaner blocklist and frame revert buttons are WpButton or
WpIconButton.
The Image Filter change gave WpButton hint and kbd; WpIconButton and
every button this sweep moved now use hint too, so one prop name
means the tooltip on both.
Module, bundle, injector and Model Info rows, the Context toolbar and
the Settings live preview use WpIconButton (.wp-btn--icon-sm is gone).
Every canvas dialog closes with CloseButton. Push to library, the
pickers' toggles and Retry, the editors' reset buttons, Reattach, the
Assembler template buttons, seed rolls, the Loop and Seed List
launchers and the add-a-row buttons are WpButton. At its cap the
Injector's add button says why instead of a hover hint.
WpIconButton is the 20 px icon button inside a canvas row: tone tints
the icon on hover and the box while pressed, pressed "mixed" is a
bundle's some-children state and variant bare is the fold caret.
Button and WpButton gain variant add (the dashed add-a-row button),
block (full width) and pressed (a toggle); WpButton gains tip so a
hint never fights its own tooltip. Kit entry and demos updated.
Six colour themes (Orbit, Native, Nebula, Tide, Ember, High contrast) and
seven looks (Orbit, Crisp, Soft, Terminal, Editorial, Compact, TUI) that mix
freely, in Settings > Appearance and the Tweaks panel. Accent starts on the
theme's own; High contrast locks it. New kit piece ChoiceCards, a docs page,
Manrope + Fraunces (OFL) for the Soft and Editorial looks.
Seventeen shared pieces in src/components/shared/, each on the kit page with a demo: ProgressBar, Skeleton, Badge, Stepper, Pagination, Slider, TagInput, InlineEdit, DropZone, SortableList, ResizeHandle, SplitPane, DescriptionList, CodeBlock, Kbd, Separator and Toolbar. They read only shared tokens and sit on the 24/32/40 scale. New kit groups Navigation and Layout; docs, built-in docs and release notes updated.
One switch at the top (G / D / Z) in a window that keeps its size, with
the pick count and Keep buttons always in the footer. Grid picks with a
click or Space and sizes tiles S / M / L / Fit; Detail shows one image
with its size, seed, values, wired prompt fields and mask, a Pick button
(P), arrows beside the picture and a strip of every image; Zoom shows only
the picture on WpImageZoom and keeps the level and spot across images.
Escape steps back a mode. Mode and tile size are remembered; the old zoom
and fit flags read as Detail and Fit.
Fit / 100% / 200% / - / +, wheel zoom toward the pointer, drag to move,
double-click for 100% at the spot, keys + - 0 1 2. v-model:zoom keeps the
level and the spot carries over when src changes. WpButton gains hint and
kbd for its tooltip, WpSegmented options a kbd.
* feat(ui): Orbit tokens, one indigo accent and no decorative gradients
The manager's accent ramp moves from violet to the logo's indigo, the
same one the canvas widgets use. A saved violet the user never picked
reads as the new default; a picked one stays.
Primary buttons are flat accent-600, the dashboard and What's new hero
is a plain card, the wordmark is plain text and the sidebar marker,
starter and found cards drop their gradient washes. Hard-coded violet
fallbacks and tints point at indigo.
* fix(ui): keep the var picker's active row free of a new hex fallback
WpButton is the canvas twin of Button: same variants, sizes and button.css
(pulled in scoped, so the row icon buttons' tone classes are untouched),
with a PrimeIcons icon and the canvas size by default. The add buttons,
every canvas dialog footer (instance editors, pickers, confirm, blocklist,
binding, save template, sweep, image picker, recovery panel), the Debug
viewer actions, the seed rows' Prev and the Settings live preview's footer
move onto it; the Debug copy is the shared CopyButton and the preview's
close is CloseButton.
Module rows, bundle headers and injector rows (and the Settings live
preview's module card) draw their on/off box with WpCheck at its new 12px
size, instead of three hand-made hidden-input copies. The box gets a focus
ring, and a bundle header still fills it with the bundle colour.
The manager never loads the canvas sheet, so the kit shows each side's size
in the manager's colours. A disabled switch keeps its tab stop so its
tooltip still says why, and its tests read the switch element itself.
The canvas now draws its tab strips with WpTabs (Debug viewer, module
picker) and its value pickers with WpSegmented (Cleaner mode and
intensity, Image Filter mode, picker layout and paint tool, constraint
target reach, Context Loop and Seed List strategy), so arrow keys,
Home/End and the one look come for free. Hints move from title= to the
segmented hint tooltip.
The Seed List, Context Loop and sweep on/off switches join the runtime
switches on WpSwitch. The target reach count uses WpNumber instead of its
own number field and arrows.
WpSwitch (components/shared) is the on/off switch for both surfaces: a
track look (sliding knob) and a chip look (labelled chip that lights up),
sm/md/lg on the control scale, mixed, disabled and invalid states, Space
and Enter. It reads only shared tokens, so it wears each side's colours.
Toggle.vue becomes WpSwitch at the manager size, which also fixes the
nearly invisible off track in light mode. The seven hand-made canvas
switches (five Runtime rows, the derivation rule and branch switches, the
seed lock controls and the seed list rows) now use it. The kit shows it in
both looks through a new KitLooks helper.
Self-review: with a value that is no enabled tab, no tab had tabindex 0, so
the row could not be reached from the keyboard. The first enabled tab now
takes Tab focus, and Left from no current tab or option goes to the last.
The manager never loads theme.css now (it loads once from the canvas boot
chunk), so the new demos drop their import and show the canvas size on a
node-like panel in the manager's colours.
The Tags page is the first DataTable user: sortable columns with
aria-sort, and the AI pointer anchors kept on the table and the actions
header. WpSegmented takes block to fill a narrow row.
Dialogs, drawers, panels and dismissable notes use CloseButton (Modal no
longer borrows the topbar class). Library ids copy through CopyButton,
and every remaining copy goes through copyText so it also works over
plain http.
SegControl is gone: settings, AI panels, the conflict dialog and the
condition refinement switch use WpSegmented. Import/Export, the test
runner results and the bundle picker use WpTabs, so the arrow keys work
there too.
Seven Priority A pieces of the component kit, each with a kit entry and
demo. Tabs, Segmented, Disclosure, Banner, CopyButton and CloseButton live
in components/shared and read only SHARED_TOKENS, so they work on the
canvas (size sm) and in the manager. DataTable is manager-only and builds
on the .wp-table classes. clipboard.ts moves to components/shared so the
copy button works on both sides.
Labels sat 1.5-2 px above the middle of the button, next to centred icons.
The label now sits in its own span, trimmed to the cap height where the
browser supports text-box, and buttons use the normal line height, so a
short line box no longer rounds its negative leading upwards.
One SearchInput replaces ListFilter's own box, PickerSearch and the
hand-built search boxes on the canvas and in the manager. Every number
field is WpNumber (new size and nullable props; Input loses its number
mode). CategoryChip folds into Chip (color + icon). Both toast stacks
draw ToastCard. Manager confirms use the new ConfirmModal on Modal, so
they trap focus and return it; ConfirmDialog stays canvas only.
Kit registry, demos, kit-guard baseline, component standard, built-in
docs and release notes updated.
- Control heights round to whole pixels; sm stays at 24 on Compact.
- Disabled link and aria-disabled buttons ignore hover too.
- Canvas number fields in Image Filter and Sweep keep their 20px rows and
the deep field colour.
- ColorPicker gets compact (swatch + chevron) for the bundle name row.
- Library search uses the inline icon; the boxed addon CSS is gone.
- RefChip card closes when its chip leaves the view sideways too.
- Stale density and height comments.
theme.css was @imported by 25 SFC style blocks, so the whole sheet was
inlined into 15 lazy canvas chunks (and inside <style scoped> its :root
blocks were scoped and matched nothing). Import it once from
extension/settings.ts (boot chunk), drop every SFC import, and add a test
that fails on a new one. The manager no longer loads it at all: since
ModalShell and ContextMenu read shared token names, the kit page doesn't
need it.
Canvas js/ total: 510,879 -> 472,442 bytes gzipped (-37.5 KB); boot
chunk +2.3 KB, main.js unchanged.
ContextMenu (and DropdownMenu through it) never listened to scroll, so
an open dropdown stayed put while the page moved. Anchored menus now
re-place on scroll and resize; menus opened at the pointer close.
ModalShell put wp-canvas-scope on its overlay, which painted canvas
colours into manager dialogs (kit demo, RichTextInput). It reads only
shared names now, as does ConfirmDialog; the shared-tokens test covers
both.
Menus, popovers, tooltips and dropdown lists used the dialog shadow
(0 12px 40px). One scale on both sides now: sm resting, md menus and
popovers, lg dialogs, xl drawers. Small dropdowns move from lg to md.
Both theme.css and the manager's tokens.css now define one list of names
(SHARED_TOKENS, components/shared/shared-tokens.test.ts): the canvas gains
the focus ring, border-focus, error and danger-text, radius-md/xl,
shadow/shadow-xl, text-xl and the 24/32/40 control heights; the manager
gains the motion names and border-soft. A shared component that reads only
these wears the colours of whichever side it is on; the test fails when
either side drops one or a shared overlay reads a name outside the list.
ContextMenu (and DropdownMenu) drop the canvas colour scope and read token
names both sides define, so in the manager they use the manager's colours.
The tooltip becomes a raised panel with an optional shortcut chip
(v-tooltip="{ text, kbd }").
- docs/component-standard.md: where components live, prop names, the
24/32/40 height scale, shared tokens, keyboard and focus rules, reuse first.
- Kit demos move to src/manager/kit/demos/<id>.vue (globbed), so PRs adding
components stop colliding in Kit.vue; a test refuses a demo with no entry.
- Overlays: Popover, DropdownMenu and the v-tooltip directive (shared),
Drawer (manager), placed by components/shared/floating.ts; Modal and
Drawer share useDialogFocus. ContextMenu now stays on screen and can open
from an anchor.
- The canvas colour sets in theme.css skip html.wp-manager, and ModalShell /
ContextMenu carry wp-canvas-scope, so both are shown live in the kit.
- Bundle guide raised to 512 KB with a note.
The test run after a build had only per-row Fix with AI, so problems left
after the build's own repair rounds had to be fixed one at a time. Fix all
with AI (data-test pack-problems-fix-all) rebuilds every flagged item with
its problems as the note, wildcards first and the constraints on them
after, then checks once. Library and wired items stay with Change the plan.
When extending a bundle, the install check counted the bundle's own
(existing) items as built, so Add to the bundle was enabled when only the
template built and the server refused it with "nothing is built yet". The
check now matches the server's, and the Install card says only the
template built.
The bench robot as a Watchwright test pack in bench/: the bench page's tests, prompts and attempts per model, clicked through in a browser, with the AI debug log, console errors and refused requests saved per attempt, and a fake model server (bench/dev/serve.py) for checking the clicks without ComfyUI.
/wp/kit (Settings > Advanced > Component kit) shows every shared control
live with when to use it, what it replaces and how to write it, plus the
colour, type and spacing tokens. Entries and their text live in
src/manager/kit/registry.ts.
kit-coverage.test.ts fails when a component in a kit folder has no entry
or an entry has no demo. scripts/kit-guard.test.mjs counts hand-rolled
controls per file (native select, number, checkbox and range inputs,
inline svg, own role=dialog, raw buttons in the manager, raw hex colours)
against a baseline that may only shrink (pnpm kit:baseline).
Fixes from the 2026-10-26 bench critiques (chat side):
- Claim checks: "No <kind> card came" notes count the kinds a card
changes or deletes, request gaps skip delete and tidy answers, and new
notes mark a weight or factor no card sets, a bundle move the card
doesn't make and "created successfully" before Apply
(engine/ai/claims.py). Tool names in replies are said in plain words.
- Deletes only target items the user named (a bulk ask still covers
more), a category or tag delete never deletes an item of that name,
and with deleting off the reply says where to turn it on.
- edit_bundle: "switch off" switches off instead of removing; new move
op (after/before).
- A new item or rename onto a taken name warns; a rewritten derivation
rule keeps its ELSE; a typo tag fix adds the tag it meant.
- run_test runs a stack item with this answer's pending card and adds
the items that set what a combine or derivation reads.
- Only is described as a guest list (chat guide, docs, matrix legend).
- read_page names the settings section the way open takes it, section
aliases, more_tools hints carry the group's contents, library tags
merge case, and Explain on a selection is read-only.
A message the English gate doesn't read as English gets one typed
request-frame call (an English restatement plus kind, count, weight
direction and the features asked for). The code checks read it; the
model still reads the user's own words. Settings › AI assistant ›
Chat › Language you write in overrides the guess.
A name the model puts in backticks (`Hair Color` or `[[Hair Color]]`)
is now a chip like any other mention. Variables read the way the editors
draw them: accessors in amber, .neg in red, and the variables the run
sets ($iteration, $model_family and the other WP Model Info ones)
marked read-only. A list of three or more items shows as an item list
with each item's kind, name and category chip.
Fixed values show ticked rows (new / changed, old text struck, negative apart); combine and template show prompt and negative apart with their own tick boxes, the variables read and example renders; a derivation request can edit an existing rule (Changes rule N). Draft answers are held to the request in code (counts, per-group trim, untagged re-ask, Remove / Danbooru checks, fixed value and template cleanups, joined if/elif/else rules).
A change that sends only some fields (no negative, say) drew the missing
text as deleted, though Apply keeps it. Only fields the change sends are
compared now.
Checks rules on the rendered prompt text, joins appended rule words with a comma, flags 0-rule constraints and second picks, keeps loop/model variables out of the template, tidies negatives and rating tags, reuses library wildcards only when they fit, holds Change with AI to its ask, retries cut-off items and reviews, and shows Change the plan, still reasons, (none) and +N more in the manager.
An aria-label on each row replaced the row's own text, so a screen
reader heard only "Added". The change now goes in visually hidden text
before the row's content.
Fixed values changes show the Variable / Value / Negative table with the
changed cells old -> new; template and combine changes mark the words
they add and drop and the variables they start or stop reading; delete
cards list what goes with category and rating and what a dropped
category or tag leaves.
A compared test card now keeps 1000 values in its before run, so an old
value outside the top five gets its real share instead of 0%, and the
test step names items instead of ids.
A rule change card now shows what Apply does, from the op's own before
and after, instead of one-line summaries:
- Derivation: the IF / ELIF / ELSE blocks with changed branches marked,
old test → new, actions kept / added / removed, a dropped ELSE struck
through; rules the change leaves alone fold into a count.
- Constraint: the rule grid with changed cells marked (old effect → new
in the cell and its tooltip), changed exception rows, and a new reach
or source / target as old → new.
- Bundle: the ordered item list with + added, − removed, ↕ moved (the
fewest moves that explain the new order), on → off and use settings
old → new.
The constraint and derivation views move out of AiCardView into
views/AiConstraintGrid and views/AiDerivationBlocks; create cards use
the same components.
The minor guard cut "adult woman, no children, no minors" and let
non-consent wording through. It now masks negated phrases (NegEx-style,
comparatives excluded, sexual words still read raw), adds a non-consent
line, knows minor words in nine more languages, and leaves adult body
words like "petite" alone. Ratings: chat-made items tagged #nsfw are
rated NSFW, chat and Organize no longer lower NSFW or drop #nsfw unasked,
chat search filters by rating, packs spell rating tags one way and flag
a prompt with two. A template draft asked for a youth negative gets one.
Bench critiques #30 and #38.
Change cards were server text lines ("light rain ×3 → ×1"). The client now
draws them from the op's own before/after data through a per-kind view
registry (composables/card-views), with the server lines kept as the
fallback for anything a builder can't read.
- Wildcard edits: an option diff like the editor's list, + new, removed
struck through, old → new for text, share of the draw, tags, negative
and fallback; untouched options fold into "N unchanged" (the magnifier
lists them). Add-only cards keep their tick list and say how many
existing options stay.
- Name, description, tags, category and rating changes: old → new, the
category as its CategoryChip (new ones marked).
- Categories, tag renames/merges and bulk changes as library chips.
- A merged card draws its op and names the changes it holds; it keeps
the numbered steps only when nothing can be drawn.
- Shared old → new colours in components/ai/views/card-diff.css.
Put LICENSE back to the verbatim GNU GPL v3 text (the How to Apply sample keeps its placeholders) and state Copyright (C) 2026 DumiFlex in the README and package metadata instead.
Fixes from the 9B manual bench: How many follows the request (panel and chat draft_options); drafts see existing tags and drop every-option, label and name tags plus unasked negatives; "half as likely" halves the current weight and wrong-way weights are refused; retag that adds keeps tags (chat add_tags, constraint tag warning); partial "every" edits are asked once more.
Both used to add to one 'Answer n of m' pager. The answers now form a
tree: each request is a step listed above the answer, Try again adds a
try to the shown step (try k of t), different refines of one answer are
sibling steps (refine k of n), and refining any try branches from it.
Flipping a step shows that answer and the steps under it follow its
branch; clicking an earlier step shows its answer. What Try again sends
is unchanged.
New WpSelect (a native <select> drawn with our field look and chevron,
typed by its options) and WpNumber (number field with our arrows,
ArrowUp/Down and wheel stepping, min/max clamp) in components/shared.
They replace the browser dropdowns in the Display playground, the
template load/save modals, the module picker's category filter, Image
Filter and its sweep grid, the Context Loop sweep panel, and the three
hand-copied steppers (seed rows, sweep limit, Image Filter timeout).
The Display playground's last four browser checkboxes and the internal
flag toggle use WpCheck.
The AI panels, chat cards and Pack builder drew browser checkboxes
(tinted with accent-color, or plain blue on the Pack builder slot
editor). They now use ui/Checkbox, with a new .wp-checkbox--inline for a
box sitting in a row or a wrapping <label>; eslint's label-has-for
counts Checkbox as a control. The test runner's seed fields had their
native spinner hidden and no arrows: they use the number Input now, and
its sort is the shared Select (the picker ignores the dropdown's own
clicks and keys). AiDebugList, AiChatList and PackFindings use
ui/Button. Settings > Location's radios get a shared .wp-radio look.
The pack converter, the Import tab and the import-as-new rename row drew
their own buttons and inputs and used the browser's checkboxes and
selects (blue in Chrome). They now use the manager's Button, Checkbox,
Select, Field, Input and PickerSearch, and the global .wp-input /
.wp-textarea looks, so they match the rest of the manager in both
themes. The role cards use a wrapping flex row, so the fidelity card
no longer drops to its own row once the Stack card shows.
The working line clipped the end of its words ("Writing · 3 token", "Reading the promp", "Rolling the d…"). Its words box animated its width, so after every change it was narrower than the word for 0.4s, and its width was rounded down, so a box up to a pixel short stayed that way. One pixel short is enough for the browser to drop the last letter and the "…" for its own ellipsis, which Firefox draws invisibly on the gradient text.
The box now widens at once and narrows only after the old word has faded, is rounded up with a pixel to spare, refits when the font loads late, and a number ticking up in the chat's status no longer crossfades.
Thinking, Model size, Most context to use, Tool format, Sampling, Choose
the tool first and Short tool list now live in the provider's slot, and
each model keeps its own copy, restored on switch. A model with nothing
saved starts Thinking and Model size at auto. Unload after is kept per
provider. Old files keep their values for the provider in use; other
providers inherit them except Thinking.
Settings › AI assistant › Advanced › Debug log (off by default) gives every AI request an X-WP-Debug id. The server records each model call it makes (prompt as sent, reply, thinking, tool calls, tokens, errors), keeps the last 30 in memory and writes one file per request to ai-debug/ in the data folder (newest 300). Images, embedding vectors and keys are left out. A Debug button in the top bar lists the requests with Copy debug (Markdown) and JSON. WP_AI_DEBUG=1 records every request, for evals.
- The chat's plan card fills the Describe step and waits, so images and settings can be set first.
- Recommended pack settings (no model call) with a Use recommended button on the Settings step.
- Pack 11: model-rolling slots, family-named fixed values, writing-style slots and Pony tags on non-Pony packs are dropped; quality rules join into one; strip_repeats keeps rules on $model_*.
- Pack 15: folded slots are never a self axis; rule words become options after a fill.
- Fixed values panel sends fewer library variables (12-19 s on the 9B, was up to 113 s).
Pack 7's 25 Hat.type rules fired but the check read ctx['hat.type'], which
is never set (the engine keeps rolled axes in __wp_axes__), and a rule
appending a hat's own type to $hat printed 'capcap'. Pack 15 split Outfit
into Casual Outfit and Formal Outfit: both printed and their only-rows on
Footwear left no shoe, so the fallback was taken every run. A rule text
reading a variable is checked with its value filled in, and 'a hat 30% of
the time' lands on the hat only, flips an inverted share and drops a
multi-pick.
Co-authored-by: Claude <noreply@anthropic.com>
The Template panel on an empty library and the pack planner could write one
string on to the output limit; every string in their schemas is capped now.
A slot axis of up to 10 values is grouped, with at least one option per
value kept, so a rule on a value never misses its options. A draw puts no
pick in front of a drawer whose options already name the list's values,
and a drawn or internal list is no longer reported missing from prompts.
The pack eval counts a rule that never fired apart instead of as a break.
Co-authored-by: Claude <noreply@anthropic.com>
Plan drafts gets When needed (auto, the new default): after the first
draft, one more is asked only when score_plan finds a serious problem
(a relation that named nothing, a review fix other than request words,
a stated rule with no relation, too few prompt slots), and the better
draft is kept. Request gaps also match -ves plurals (elves → elf).
A slot's content call asks its options grouped by one axis (group_axis:
the one a rule narrows on, else one the slot offers, else the first),
at least two per value when the count allows, so every value is covered
by the first call. compile_slot flattens the groups; fill calls stay flat.
Co-authored-by: Claude <noreply@anthropic.com>
The code lands a share, hold and shown subject itself; a missing rule goes back to the planner once; a cut-off plan is asked again shorter; draw relations are never constraint cells; rules written as text, $$ leads and unasked multi-picks between rules are fixed at compile; the check catches a $name printed as written.
Graph planner settings lines, an accepts-aware dead-end tidy, constraints on drawn lists before their drawers (checked on drawn picks), a repair loop that skips unchanged problems, slot calls with style examples, and a pack eval smoke set. 9B smoke run: 12/15 clean packs vs 6/15 on dev, 15/15 plans compile.
Panels send the thinking off switch on Auto with sized output limits and a thinking watchdog. They list only the variables a request is about. They name wildcard names that two items share, recheck Add for a second concept, stop looping text answers early and ask again for a variable the request names. New scripts/ai_panel_evals.py; the 9B goes from 31/36 to 35/36 checks at 2.4x the speed.
- The check nudge ends with the exact run_test call for the cards (nudge → run_test 90% → 97% on the 9B).
- The clash warning keeps a variable the user's message names, instead of "pick another name".
- A guided change ask whose step only repeated a look-up, before any card, gets one more step with that tool closed instead of a forced answer.
- The unknown-name check counts the user's bare word.
9B smoke: full s42 18/20 with 0 false claims, full s7 20/20, empty 18/20; s-rename-var t2 6/6.
Short tool list (Settings › AI assistant › Advanced, off by default): a small model in typed JSON steps gets one line per tool in its instructions, and each tool's arguments and example in the tail of the step that first offers it, once while visible. It is fixed per chat (meta tool_index), so the prompt prefix stays stable. The eval takes --lean.
9B A/B: content tied (55 vs 55 over three pairs) with about 14% fewer prompt tokens per step, so the switch stays off by default for now.
Also drop "{1$$@{…}}" around a lone ref, like the bare braces.
On the full library the 9B answered the tag-filter note with the same
Sky card, byte for byte, in three runs of three; the note sat beside
"don't propose these again" (smoke s-tag-filter). That line now stays
out of the note's tail. A card sent again (exactly, or with only its
category or tags changed) runs the request check on the cards as they
are and is told what they still lack, counting as the note when none
came yet; a card that drops a feature the one it replaces had is told
so; a duplicate option holding a ref says one is enough; a rewrite of
every option counted from 0 is read as 1 to k; and braces around a
lone ref are dropped instead of refused.
On an empty library the 9B read the item twice, wrote "I've proposed
adding negatives…" with no call, and met the claim nudge with the same
text again (smoke s-negatives, both builds). The step after the nudge
now offers only the change tools it had plus the test tools, and the
repeat-read refusal points at the next call.
The 9B spent 2-4 steps after its card on more_tools and opening the card
it had just proposed, and only got the request check's note once it
answered (smoke on #108); on the full library it answered on the last
step, which skipped the note (no step left for the fix). A step after
the cards that changes nothing now carries the note, the note gives
itself the fix step and the answer even past the step cap, and opening
its own card (which can't open until the answer ends) closes open for
the rest of the answer. The smoke set's s-where check also accepts the
switch's own label.
On an empty library the 9B met the request check's note with more_tools,
opened its own card twice and then claimed the fallback or the
@{Palette:warm} options it never proposed (13 of 20 smoke checks, 17 on
a full library). The step after the note now offers only the cards' own
tools and the ones that add what is missing (request_check.fix_tools),
and a reply that talks about a missing feature anyway says no card has
it yet (request_check.claimed; "no fallback is needed" doesn't count).
A repeated refusal that forces the answer no longer skips the note.
The chat eval's --empty runs every scenario on a migrated empty
library, a new user's first chat.
"{@{Palette:warm}} sky" is now refused with the text to write ('@{Palette:warm} sky') instead of "drop the braces", after which the 9B gave up on refs. "Rename its variable" no longer loads the six list tools or the page's create tools.
A cascade delete already removes the row on the server, but the Categories page and the six module/bundle editors then called store.remove(), which sent a second DELETE that 404'd before the row left the list. Stores gain removeLocal(); a cascade apply or undo bumps libraryVersion; AppLayout refetches every loaded library list when it moves; the Dashboard refreshes; Recently opened drops deleted rows and is pruned against each fresh catalog.
Settings › AI › Advanced › Sampling sets top_p, top_k, min_p and repeat/presence penalties per provider slot (empty keeps the server's default). They go only to local and OpenAI-compatible servers. The chat eval gains --seed for a fixed sampling seed per scenario and run.
The request check (engine/ai/request_check.py) nudges once when the answer's cards lack a constraint, only rule, fallback, negatives or tag-filtered ref the request names. A tool repeated MAX_LOOPS times leaves the grammar for the rest of the answer. Page tools come to a task only on page words, and option tags in a wildcard ask no longer load the list tools.
- Typed JSON step grammars name only real items: ids limited to what the edit guard allows, read/run_test/open to what exists, and the tools that usually come next join the shortlist; a server that refuses the enums gets the plain grammar.
- A question or chat gets the reading, page and docs tools but nothing that changes or drafts; a follow-up in a chat that already proposed cards counts as a task.
- The shortlist core is search, read, ask and more_tools; docs, react, variables and run_test join only when the message or the answer calls for them, so first steps offer about ten tools.
- Traces record the message kind; eval runs keep each run's library and card ops, and the smoke checks read compiled refs.
- Send small and medium models feature cards with the message that needs them, and offer the tools a card names.
- Suggest local models by name only.
- Optional Type out replies (off by default), JSON steps included; the Thinking box streams live and the drawer says when the model sends nothing.
- Let the chat change an item its own card made.
- Evals start from a fresh library; traces record step time, thinking tokens and timeouts.
Each answer stores what its steps offered the model and what it did, summed by scripts/ai_trace_report.py. scripts/ai_chat_evals.py --set smoke runs ten asks with content checks. A new test fails if a request stops starting with the one before.
Settings and the chat header read the model's thinking choices from a
10-minute cache, so a model reloaded with other options (an LM Studio
model.yaml that gained or lost its off switch) kept showing the old
list. The thinking route now asks the server fresh; chat steps keep
the cache.
The LM Studio levels recipe in AI > Setup now says both model.yaml
fields are needed: without the enable_thinking boolean LM Studio lists
only the levels and can't turn thinking off. A level only counts while
thinking is on, so LM Studio's own chat needs its Thinking switch on.
Each provider and model takes different thinking values: LM Studio's
Qwen 3.x take only off and on (and LM Studio never hands a level to the
chat template, so Qwen 3.8 always ran at its xhigh default), Claude,
OpenAI and OpenRouter models each have their own effort levels, and
some can't turn thinking off.
- wp_api/_ai_thinking.py asks the server what the chosen model takes
(LM Studio /api/v1/models, Claude's Models API, OpenRouter /models,
Ollama /api/show, llama.cpp's chat template), else goes by the model's
name, and fits the saved setting before it is sent: a level on an
on/off model is On, Off on a model that must think is its lowest
level, a missing level is the nearest one.
- A refused value is asked again without it and remembered for the
model; a 4xx about thinking no longer marks the server as refusing
streams.
- A reply cut off with nothing but thinking is asked once more with
thinking off, and the model stays off until Thinking changes.
- llama.cpp gets the level as the template's reasoning_effort.
- New choices On, Extra high and Max; POST /wp/api/ai/thinking; Settings
and the chat header list only the model's choices with a line saying
what it takes.
- A JSON-mode reply that writes the rest of its step into the message
("calls: []", "**calls**: []", '"calls": []}', the calls list itself)
no longer shows it: engine/ai/step_fields.py cleans new answers and
utils/chat-step-fields.ts cleans stored chats and live text, kept in step
by tests/fixtures/step-fields-corpus.json.
- Items picked from the @ menu show as chips in the box while typing
(ChatInputMarks overlays tinted pills on the textarea text), in the chat,
the Draft with AI panels and the Pack builder.
- A picked wildcard's note tells the model to write @{Name} in options,
and a new wildcard that leaves out a reference the user asked for gets a
warning back so the model fixes it in the same answer.
- @{...} references in a chat reply stay coloured text; chips are for cards.
- Each reply shows how long it took beside Copy (elapsed_ms, kept with the
chat; time paused on the user is left out). Reopened chats keep their
format and tool-use badges too.
- The chat's model menu reloads when the provider or server changes.
- Docs: Ask about this page is pinned to the top right of the page, and it
and the docs starters name the page, so a question sent after moving on
still asks about it. The pipeline diagram stacks when narrow (docs beside
an open chat) instead of running off the side.
- Docs: AI chat page.
Dynamic Prompts and PPP variables, template arguments and PPP if blocks become stacks: setter wildcards, derivations for defaults, constraints from conditions and a Combine that renders the line. Model checks (_is_sdxl, _is_pony, ...) become a stack that reads WP Model Info. PPP stn and Umi negatives go to the option negative; PPP LoRA commands become <lora:...> text.
Umi AI YAML packs keep their tags, tag queries become weighted filtered references and Yaml Tags.txt names the tag groups. Subfolders that repeat list names become one table wildcard per name; template copies that differ by one tag fold into one steered wildcard.
The review lists installed extensions' wildcard folders, has a Bundles mode (stacks only by default), tag group renames, stack details and sample rolls from the real engine. Lists a condition reads stay out of merges, and folder reads skip symlinked files.
Retakes the quick start, wildcard import, loop grid and Image Filter screenshots at 1720 wide with landscape placeholder images, adds four Image Filter shots to its page, and updates the figure text the AI reads.
Every built-in docs page, node help panel and the README is shorter and
plainer, with new screenshots of the current nodes. The AI assistant page
is split into short pages, a new How to group covers variations, making
picks agree, keeping something steady, sharing and troubleshooting, and
wildcard import has its own page. The warnings reference uses WP Debug's
labels, the AI image descriptions match the new screenshots, and the
release notes are rewritten in plain words. Local models need at least
16k of context; 32k is recommended.
Shorter release notes, SeedList help, small-model docs; _chat_turn split and pyright in CI; ESLint a11y ratchet and Modal focus trap; tags/models/Image Filter tests; AI LAN warning, web allow expiry, one thinking setting per answer on local models, recommended hints and Reset to recommended (16k context minimum, 32k recommended); Assembler Clear template clears the negative; Vue 3.5.44, SECURITY and Dependabot.
Applied cards become (request, call) examples for small and medium models; common asks carry short steps; later steps say what the answer did; act asks run with thinking off; small chats compact sooner; a one-call explain docs tool; Test connection tries a small-model tool step; a struggling local answer offers the cloud provider already set up, once per chat; Advanced "Choose the tool first" names the tool before filling its arguments.
A multi-item ask on a split JSON chat is planned once (plan_items) and made one item per step with code keeping count; each step's grammar offers a shortlist of the chat's tools (more_tools widens it); confusable tools carry use-when lines and a sample call in the prompt and native descriptions.
* fix(chat): fixes from the Sonnet probe
- An empty answer after a failed page step, or on the last step, gets one
more step in words only; if still empty, the reply says the page step
didn't work.
- A change call sent again unchanged in one answer is answered "already
proposed, go on" instead of being made again, so five asked are five made.
- Keys and $variables that the docs, the library and the chat never mention
are sent back once to check or drop.
- Prompt: steps to do are a checklist, a risk is a Warning.
- A stray pipe on a note under a table is dropped.
* fix(chat): a link asked for is written in the answer, not pointed at
Sonnet probe: "link the guide back to me" made the model highlight the
guide, which failed.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Three or more cards of one kind in an answer show as one group card. A row opens its card in place, one at a time; Apply takes the ticked rows and "Dismiss the other N" the rest. The model hears one line per status for many cards.
An ask sent with open / read_page in one step runs and the page calls wait; a repeated read_page or an open of a card already on screen counts as a repeat; "Remove clothing words" trims inside a phrase instead of dropping the option.
Pack builder: Fix all and updates say why nothing went out while the web search card waits; page follow-up lines are not request words; Only rows narrow only the tag groups they rule on; answers are not request gaps; code-wired story beats skip the lookup lint; left-out rules read plainly and get Fix with AI; a rule overwriting a pick becomes an append; model labels read "For Illustrious"; roomier plan head.
Chat: same-name edits refused with the shown item named; search by category for organizing; empty edit answers carry a note; prompt syntax coloured inside cards; every chat format named in the prompt; pointer captions avoid each other; one shared working line.
Search: what an allowed search found shows as a card in the Pack builder and the Draft with AI panels; Use what fits sends all results for the model to keep what fits, ticking sends only those, None of these sends nothing.
The pack-sheet round on the graph planner: agree/only sources roll an
accepts axis, fallback counting and tight-rule tips, the draw relation,
picks and model families read off the request, Quality and Negative
slots wired as fixed values and the template negative, Plan drafts best
of three, Danbooru respelling, thinking-off retry for all-reasoning JSON
answers, Reuse what fits on a graph plan, negative-ish names out of the
order, numeric derive text as weights, fills for missing axis values,
one derivation rule per axis, multi-pick rules dropped, request gaps
asked once, overlaps filed on the borrowing pick, the chat claim / defer
nudges, the empty-retag re-ask, and the adult-pack safety pass on every
wired item (request refusal, young-person words, tags and keyed rules
dropped, "mature" out of every negative).
A new Planner setting, Pack graph (the default), has the model write a
small typed graph (slots, axes, relations, template order) and the code
compiles every constraint, derivation, fixed value and the template from
it. Run and settings needs are wired by the code (story beats, sweep axes,
per-family quality, caps, style, rating, one bundle), hand edits are
locked, the plan review stops looping (typed findings, code questions,
narrow per-item Change with AI calls), and the chat gets the 9B fixes
(Tool format Automatic picks JSON steps for small models, XML calls run,
frame tests take numbers, written-out calls still run).
One card per idea, run_test finds items however the model names them, small-model rule and constraint shapes are cleaned up, Draft with AI panels use integer-enum ids with a catch-all repair call, Pack builder Fix all no longer loops, and scripts/ai_chat_evals.py runs scripted chats against a real model.
wp_api/ai.py keeps settings, Test connection, the library index and route registration; handlers move unchanged into _ai_drafts, _ai_turn, _ai_context, _ai_chats, _ai_pack and _ai_common.
Small and medium models answer each step in two parts (act, then answer). Web and Danbooru tools load by group via more_tools, appended at the end of the list. Test connection shows the fixed prefix split into instructions, tools and library summary. open takes a docs page id. A highlight before read_page is refused at once.
Every install path parses with parseCheckedPayload, which checks module payloads and bundle children against the strict validators (loaded lazily) before /import/commit. Validators accept the engine's defaults. CI now evaluates the pytest coverage floor (88) and css-isolation; vitest thresholds ratcheted to 80/66/77/80; js budget 496 KB.
Community.vue frames the community site's /embed-frame.html in a sandboxed iframe. frameBridge.ts serves install and markPublished over postMessage (only from the frame and community origin, every field checked) via hostRuntime.ts, and forwards route changes, theme and the publish hash. Old wpc.embed.* tokens move to the frame once and are wiped. The remote import and window.__wpcRuntime are gone.
Chat round (explain on selection, page starters, reactions, streamed notes, thinking), negatives on node fixed values and combines, Pack builder quality fixes from 31 real-model eval rounds, and small-model support (scoped tools, checked tool arguments on local servers, two-phase steps, fixed prefix shown in Test connection).
Derivation and fixed values modules roll on their own rng stream (seeds through their alternations can resolve differently). DOM widgets tear down when their node is removed (effect scope, cleanups, shared onConnectionsChange wrapper, seed state in WeakMaps, capped topbar rAF loop). /import/commit validates module and bundle child payloads. WP_Context and preview close their library connection; the node path migrates once. Pinned option missing warns. CLAUDE.md says which parts of the schema machine are wired; js budget 473 KB.
Node knowledge and canvas variables for every AI feature, local tag/LoRA/embedding lookup, read_result page reading (built in, Crawl4AI or Firecrawl), opt-in Danbooru lookup, dismissable web warnings and "don't ask before web calls". Pack builder reads run style, subject and LoRA inputs from the request into the plan (Runs as), settings keep only pack-wide preferences plus Model; plan review checks stories, LoRA inputs and the model setting; anchor finding fixed; Fix with AI / Explain buttons; docs figure descriptions.
Variables are coloured text with hover cards instead of green chips on every surface (canvas included); nested @ refs keep their chips, and $name in a wildcard option is plain text. The derivation any / is empty / has value switch has room and is hidden under NOT exists. Tags use the accent colour. The AI pointer caption has a gap. Every AI box completes @ items, $ variables, tags, LoRAs and embeddings, and picked items reach the model with the message.
The logo rings slide apart and back while the star dips and turns. Used for busy buttons, the database and maintenance panels, pack builder rows, template, tags and impact loading text, the Community tab while the embed opens, the canvas Load template and Push to library modals, and a boot splash in manager.html. js/ budget raised 468 -> 472 KB.
- LM Studio gets reasoning_effort "none"; OpenAI-compatible panel requests send thinking off too
- every AI request shows a one-line working status (random sparkle mark, changing word mixed with the real phase, timer), also in the top bar
- Ask to fix only on fixable card warnings
- per-provider model suggestions; OpenRouter picks link to their page
- pack builder: Settings step (remembered), web search ask on top and blocking, image and change marks, context meter, branch labels, reopened decisions stay listed, growing own answer, numbered images, images resent only when needed, Start over button
A chat's instructions plus all 37 native tool declarations come to about 17k tokens, so a model loaded with 16k in LM Studio or llama.cpp refused the first question. New chats now pick the leanest level that fits the window the server reports, cap re-sent history and tool results to the room left, retry leaner when the server still counts too many tokens, and otherwise say how much context to load. Compaction and the meter now count the tool declarations too.
Plan v2 (multi-answer questions, decisions, settings, sections, reserved ids, 60 items), Extend with AI and Make sub-bundles in the bundle editor, reference images on every Draft with AI panel, and opt-in web search in the wildcard and text panels.
Phases 2 to 8 of the AI assistant overhaul plus fixes from real-model chats: one tool registry with native tool calls, server-kept chat logs with prompt caching, an FTS5 library index with opt-in meaning search, keys bound to their address and a guard on every AI route, page tools and opt-in web search, saved chats with streaming, Try again, a context meter and compaction, chat images, delete/category/tag permissions with Undo, constraint and test cards, card fixes and previews, questions with answers to click, the derivation NOT toggle (schema v10, community catalog 0021), request fixes for the newest Claude models, and OpenAI's Responses API. Review fixes: Try again clears the old turn's fixes and answers, category Undo removes only what it made, a failed delete rolls back in order, not_matches patterns are checked, busy chats refuse a second request, and chat search ignores stored JSON.
- Chat acts instead of asking "should I proceed?" (one nudge), and a plan_pack tool hands a pack to the Pack builder.
- Chat keeps the user's question after a search, refuses repeated calls and must answer on its last step (it used to greet and re-run one search until it ran out).
- Search ranks items over name, variable, tags, description and content, folds plurals and widens broad subjects.
- Replies render Markdown without v-html, item mentions become chips, prompt syntax is coloured like the editors, Tip/Warning lines become callouts.
- Settings > AI assistant uses the full width: provider buttons marked Local/Cloud, compact fields, side cards; context and unload presets; Test connection warns below 16k and long results wrap.
- Ollama gets num_ctx sized to each request (Settings: Most context to use);
Test connection warns when LM Studio or llama.cpp loaded too little context.
- Model size profiles (auto from the name): small models get a slim prompt,
smaller tool results and a lower temperature; history is fitted to budget.
- Chat: a plan field before calls, one retry on an unusable step, a check
nudge when module changes were proposed without a test run, proposed
creates get ids so later calls in the same answer can use them.
- Pack builder: reads the library's conventions, reuses library wildcards,
takes a sample prompt, style/model/anchor on the plan, a plan review
(rules + optional model review) with "Fix these in the plan", rules
ordered after what they read, consumer briefs for wildcards, retry with
the error, one repair rebuild, variety notes from the check run.
- Import / Export: "Tag and connect with AI" after a wildcard pack import.
- Suggested local models updated (heretic builds, Artemis v1.2).
- Docs, README, release notes and docs index updated.
- AI panels in the fixed values, combine and template editors (/wp/api/ai/text/draft)
- chat creates and edits fixed values, combines, templates, bundles, rules and constraints, and runs test stacks
- Test Runner bar: explain the run, fix its warnings, why an option never comes up
- shared authoring guide (syntax, which feature for which job, coherence) for chat and pack builder
- pack builder plans fixed values, vocabularies, per-use settings and inputs; evals score features
- docs, README and release notes updated
The chat can search and read the built-in docs (engine/ai/docs_index.json,
rendered from the docs pages by pnpm docs:index) and open a docs page or a
manager page. It can remove, rewrite, retag and re-weight a wildcard's
options. Each message carries what the page shows: the open editor's item
with its unsaved changes, a list's filters and selection, the Test Runner's
last run, the Pack builder's plan. A change to the item open in an editor
goes into that editor's draft instead of the saved row. Docs pages get an
Ask the assistant button that explains the page or the selected text.
The Pack builder page plans a whole pack from one description (wildcards,
derivations, combines, constraints, a template), builds each item in its
own request, runs the pack on the engine, rebuilds items the run flags,
and installs everything as one tagged collection plus a bundle with one
undo. scripts/ai_pack_evals.py scores packs against a real model.
Test Runner warnings now keep their detail as data instead of a repr.
A top bar AI button opens a chat drawer. POST /wp/api/ai/chat runs up to
six model steps: read tools (search, read, variables) run on the server,
change tools (create wildcard/derivation/constraint, add options or rules,
update info, open) are compiled and validated into proposal cards. Apply
saves through the stores, Undo restores, and later changes to the same
item build on earlier ones.
Library lists get an Organize with AI action in the selection bar. The model
reads each selected module or bundle with the library's categories and tags
and suggests a category, tags to add or remove and a Safe/NSFW rating, with
a reason. Only real changes are listed; each is a chip the user can turn off.
Apply creates new categories, saves the ticked changes and offers Undo.
Follow-ups refine the answer like the other AI panels.
Every AI panel now keeps the conversation. After an answer, the request box
takes a follow-up; Refine sends it with the earlier requests, the model's own
answers and what the user unticked, and the model returns a revised answer in
full. Try again re-asks, the arrows flip between kept answers, and Start over
drops the conversation. Follow-ups reuse the context the first request saw.
The routes take an optional history and return the model's raw answer; the
client replays it as real turns for Claude (tool calls), OpenAI-compatible
servers and Ollama.
Every editor's Identity card gets a Describe button that writes a
description and suggests tags, reusing the library's tags. Every AI
request now carries the item's description and library tags (and the
variable catalog shows each module's description). The constraint editor
gets a Preview card with each target option's chance per source option,
and the AI constraint review can preview its rules with before/after
arrows.
The derivation and constraint editors get an AI button. Derivation rules
are written against a catalog of the library's variables and wildcard
options, checked by the engine, and come back with warnings for unknown
variables or options. Constraint rules map tag pairs to matrix cells and
option pairs to exceptions, expanding a tag paired with one option.
Adds Settings > AI assistant (off by default) to connect a model the user
supplies: Ollama, LM Studio, llama.cpp or any OpenAI-compatible server, or
the Claude or OpenAI API with their own key. Calls run on ComfyUI's Python
side; the key is write-only and never returned to the browser.
The wildcard editor gets Draft with AI: the model writes options in the
style of the existing ones, a compiler drops duplicates and reserved
syntax and validates against the wildcard handler, and the user reviews
the list before it is added. Nothing is saved until Save.
Docs: built-in AI assistant page, README, network-access, release notes.
The Details value list used grid rows whose overflow-hidden cells could
shrink to nothing in a capped box (seen in the wild); it now uses plain
flex rows, and the zoom aside never shrinks its sections. Values only
mark whole words in the prompt. The Context Loop's edit-frame cursor
goes back to base when the count drops below it or the sweep changes.
I (or Details) adds the frame's variable values, seed, other images and
the prompt with each value marked to the zoom. The node now sends each
frame's variables. Lowering a Context Loop's count drops seed locks and
bypasses past it, and a sweep edit moves them with their combination
instead of leaving them on whatever frame lands there. Budget 468 KB.
Clicking an image only picks it; clicking the frame around it (border or
label) opens the zoom, and a Zoom & refine header button toggles it, so
prompt edits and mask painting are findable without knowing Space. A
frame with several images gets an 'all' button that picks the frame.
The picker now labels frames with their swept options, seed and prompts,
lays a sweep of two or more wildcards out as a grid, compares two images
in zoom, remembers whether it was left zoomed, and can send the picks back
to the Context Loop (locking kept frames' seeds, bypassing the rest).
In zoom a Refine panel edits the frame's positive/negative prompt and
paints a mask. Edits ride along with the answer: text outputs follow the
edit, an optional clip input re-encodes the conditioning, and painted
masks go to the masks output (alpha of a PNG, resized to the image).
The tab title shows a mark while images wait, and an opt-in setting sends
a desktop notification when the tab is in the background. The "Nothing
picked" option is gone: the picker can't send an empty pick, and the
timeout rule covers the only case left.
Raises the bundle budget 452 -> 464 KB for the larger lazy picker chunk.
A new node that pauses the run and lets you pick images in a picker.
Only the picks continue, and every other slot follows them: latent and
masks are sliced, batched CONDITIONING is sliced (pooled_output too),
prompt texts and Contexts are kept or dropped with their frame, and two
MatchType extras carry anything else. Works per frame for Context Loop
lists, sends picks as the same shape or one item per image, can reuse
the last picks or pass everything, and stops only its own branch when
asked. The picker can be minimised without losing picks.
Raises the js/ bundle budget from 440 to 452 KB for the picker glue.
The updater only spoke the legacy ComfyUI-Manager custom node's /manager/*
API. The Manager built into ComfyUI serves /v2/manager/* and queues installs
as tasks (or through /v2/manager/queue/batch in its legacy UI), so Update
Now fell back to manual steps and the Settings restart button was missing.
Detect which Manager answers and use its routes. After the restart, wait
for a new startup id, read X-WP-Version and reload the page when the target
version is running; otherwise report that the update didn't apply instead
of leaving a stale page that looks updated.
The canvas now flags a constraint row with "rules out all" when some
source pick leaves its target wildcard with nothing to pick and no
fallback to stand in.
Also fixes the All items list, which stopped at 1000 rows: it now loads
the whole library and pages client-side.
Give the sweep Limit field the custom stepper arrows the seed rows use, and dim the Assembler and Prompt Cleaner text boxes when the node is bypassed or muted.
A folder of small lists (hair/colors/red, blonde, dark) now imports as
one wildcard whose options carry the list's path as tags, with one tag
group per folder level, like a hand-built wildcard. Same-named lists in
sibling folders share a tag, so female/footwear + male/footwear become a
gender axis and a garment axis. References to a merged list become a
tag filter on the merged wildcard, and globs over it collapse into one.
Entry points and lists that would make the merged wildcard reference
itself stay separate. The review tab marks merged rows, lists each
list with its tags, and can keep a folder separate; a setting turns
merging off. Billions of Wildcards: 2,653 lists -> 935 wildcards.
Wildcard pack import moves out of the Import tab into its own tab on
Import / Export, in three steps: load the pack, review the plan, then
pick and import. The review shows every wildcard with its role and how
faithfully it carries over, filterable by role, fidelity, domain and
name, beside the import settings, the files read and the conversion
notes. The picker then starts with everything selected.
A pack dropped on the Import tab opens in the new tab, and ?tab=packs
links to it. Docs, README and release notes describe the new flow.
- ${name} stays as text with a note: a wildcard can't read a variable
- __N$$x__ and N#__x__ become {N$$sep$$@{x}}, which draws N different
values like the source instead of allowing repeats
- a line written twice becomes one option with the summed weight
- # comment lines (txt files and multi-line YAML values) go to the module
description; multi-line YAML values are joined into one prompt
- the report carries a plan: each row's role (entry point, composition,
vocabulary, group) from the reference graph and its fidelity (exact,
close, lossy) from its notes
- bundles hold the entry points only; lists stay in the library
- use libyaml's loader when it is available
Convert .txt, .yaml/.yml and .json wildcard files (or a .zip of them)
into one wildcard module per list, named by path, with references turned
into @{} links, glob and parent-key references into group wildcards,
PPP labels, weights and else choices into sub-categories, weights and the
fallback. Optionally files them into one bundle per top folder plus a
pack bundle. A report lists everything that converts differently.
Also fixes import commits that add a category alongside its modules
(categories now go in first, and members follow a name merge), and lets
the Import / Export view load more than 1000 library rows.
The globe, pin and remove buttons now use the row-primitive icon
buttons the Injector and module rows use. The node re-runs every time:
a cached run sends no UI payload, so the widget lost the detected
family after a repeat run.
Each Detected row gets the Injector's globe. All three start internal:
later rules read them, the Assembler and its chips leave them out until
the globe is clicked. The canvas walkers and preview chain follow the
same flags.
Detected values with their source and a pin per row replace the
override text boxes; variant rules become editable rows that light up
on a match. The family shows after a run via the node's UI payload.
The node now outputs only its context.
WP Model Info writes $model_family (from the model's config class),
$model_variant (file-name rules) and $model_name into the Context, reading
the checkpoint name by following its MODEL link back to the loader. Graph
walkers, the assembler preview and WP Debug know the new variables.
A wildcard instance can now match a variable instead of rolling, so a
model wildcard becomes a constraint source. The derivation editor gains a
LoRA by model preset. Docs, node help, README and release notes updated;
bundle budget raised to 432 KB.
Three prompt-syntax rules for WP Prompt Cleaner, run before whitespace so
the existing rules tidy the seams they leave:
- empty_groups drops (), [], ( , ), (:1.2) and groups left empty
- merge_weights folds nested ( ) weights into one group, ComfyUI-style
(((a:1.1):1.2) -> (a:1.32)), and unwraps a weight of 1
- lora_spacing tidies <lora:...> tags and the space around them
Balanced turns on empty groups + LoRA spacing; aggressive adds merge
weights. The negative column follows the same presets.
The Sweep panel moves off the node into a modal opened from a 'Sweep
combinations' button, like Per-iteration seeds. The button shows the
frame count; the modal also previews every frame in run order.
Pick downstream wildcards in the Context Loop's new Sweep panel and the
loop runs the cartesian product of their options, one frame each, up to a
limit. Each frame pins the swept wildcards through the existing pinned
path; 'Hold other picks' keeps unswept modules on the frame-0 seed.
Raises the bundle budget 424 -> 428 KB for the panel.
Settings > General > Privacy gets "Share anonymous usage stats" (on by
default, stored as wp-usage-stats). Community.vue passes it to the embed as
analytics, which the community embed uses to skip its usage pings.
The flagged option now keeps its weight and takes part in normal draws.
It is still taken, without a draw, when constraints or weights leave
nothing to pick. Flagging an option never changes a normal pick, and a
fallback weighted 0 only ever stands in. Editors give it its normal
share and show a fallback chip beside it.
A wildcard option can be marked as the fallback. It never takes part in a
normal draw and is used only when constraints (an Only rule included), a
filter or zero weights leave nothing else to pick, instead of resolving to
an empty string. Works for top-level wildcards and nested @{} refs, and
emits an info-level `fallback_used` note in place of
`constraint_excludes_all_options`.
- engine: engine/modules/_fallback.py shared by the handler and
ref_option_pool; payload validation allows one boolean fallback on a
non-null option
- schema 9 (additive): FALLBACK_SCHEMA_VERSION stamped in TS and Python,
MAX_KNOWN_SCHEMA_VERSION 9, strict validator keeps the flag, parity
fixture regenerated
- library editor: "set as fallback" on an option's probability cell, a
fallback chip, its weight disabled and excluded from the shares
- canvas: FALLBACK badge on the option row, no share in probabilities
- WP Debug: "Fallback used" label and step fact
- docs, release note, CLAUDE.md
- bundle budget raised 420 -> 424 KB (maintainer approved)
Remove the Discussions link, make Discord the place for questions, bugs, feature requests and sharing, link the community site, add icons to every badge and align the title logo.
The node modal's Rules section shows each IF / ELIF / ELSE as its own card,
with one row per test and per action and a full-width value field, so long
values wrap instead of being squeezed into a table column. Nested AND / OR
groups read as indented rows under an "ANY of" / "ALL of" header. An empty
field shows the library value (chips included) as a ghost; an overridden one
lights up with the library value underneath and a "Use library" reset.
Derivations get a fifth action mode, `negative_replace` ("Replace negative"):
the value becomes the target variable's only negative, and the variable's own
text is left alone. Schema v8, like "Add to negative".
A derivation branch (and its ELSE) now runs its action and then each
entry of an optional extra_actions list, in order; each action sees the
previous one's write. The library editor gets "+ And" rows, the canvas
modal shows every action and gives each its own value override (keyed
"bi.K" / "else.K"), and WP Debug lists every action a branch ran.
$name.neg / $name.K.neg reads the negatives a variable carries. It rides
the accessor grammar's axis slot, so "neg" is reserved as an accepts
group name. Reading .neg is not a read of the variable, so it carries no
negatives along. Works in values, combines, the Assembler's negative
template and conditions; autocomplete offers it after the dot.
Both stamp schema v8. Cascade fixers and scans now walk the real
derivation action shape (action, extra_actions, else) instead of a stale
"actions" list, and read-only previews keep a var chip's accessor.
Fixed-value rows without ids were all keyed by the same missing id, so
disabling one disabled every row. Rows are now keyed by their id, or by
their position when the id is missing or repeated, in the canvas editor and
the engine alike.
The wildcard type icon took its color from a bare selector that tied with
the shared grey default, which several lazy chunks carry. Whichever chunk
loaded last won, so wildcard icons turned grey after opening a modal or
adding some nodes. A data-kind selector now outranks it.
The Cleaner's negative input is now a text box under the prompt box, so the
node cleans a prompt and a negative on its own without any wiring. The
rules panel moves below both boxes; workflows saved with the old two
widget values get their rules back on load.
Moves the Assembler's missing-variable scan into a small
assembler-vars module so the boot chunk no longer pulls the negative
preview code, and drops the theme import from the negative template
box (the helper already loads the tokens).
Adds a "neg" checkbox column so each rule can run on the negative too
(stored as negative_rules_override only where it differs from the
preset default), a "drop negative tags also in prompt" toggle
(drop_prompt_overlap, off by default), presets that set both columns,
a last-run line for the negative and a negative word count.
Deleting or renaming a wildcard, tag or combine output now updates the
refs in option negatives and the $vars in a combine's negative, and the
reverse-dependency index counts them.
The trace header led with the node title or "Node <id>" and then the
raw graph id. A Context node now goes by its codename, the name shown on
the node itself; other nodes by their title, and the raw id is only a
fallback for a node no longer on the canvas. Title and id move to the
tooltip.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
The binding modal gets a Negative field under Template for socket and
template rows, with the same `$slot` / `$ref` grammar, suggestions and
insert menu. The preview shows the negative line under the value, and
the dialog notes when the row is internal (its negative reaches no
prompt). An empty negative is stored absent. Rows with a negative show a
NEG badge beside the template badge. The row type gains `negative`, and
the graph helper that hands row negatives to the Assembler preview is
tested.
The manager's Settings page was one ~3,500px column. It is now eight
sections behind a left nav with search (/settings/<section>#<setting>):
General, Appearance, Editing, Autocomplete, Canvas, Test Runner,
Library & data and Advanced.
- Density is one three-way setting (compact / comfortable / cozy) shared by
Settings and the Tweaks panel, instead of two that could disagree.
- Accent color, sidebar, start page and reduce motion under Appearance;
optional What's new after an update.
- Tag, LoRA and embedding autocomplete merged into one list of sources, plus
max suggestions and minimum characters (also added to the canvas panel and
the display playground).
- Canvas section edits the ComfyUI panel's Wildcard Pipeline settings. Writes
go to ComfyUI's settings API and, over a BroadcastChannel, to any open
canvas, which applies them live. Setting ids and options move to
extension/settings-catalog.ts, checked against buildSettings by a test.
- Ref recursion limit moves to Canvas › Runs and saves to the server; the old
localStorage value is carried over once.
- Library & data: stats strip, backups (automatic, keep N, back up now,
restore, delete), location, and folded-away details and maintenance.
- Test Runner defaults for new scenarios (seed mode, first seed, count).
- Export / import every preference as one JSON file.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMHPZ4k2kXrePkcgeYJJSF
The Settings page's ref recursion limit was stored in localStorage and read
by nothing: every run stopped at 8. Server-side preferences now live in
user/wildcard-pipeline/settings.json (engine/prefs.py, /wp/api/settings) and
PipelineEngine.run seeds __wp_max_ref_depth__ from them, so canvas runs,
previews and the Test Runner honour it.
Database backups (engine/db/backups.py): a copy before any migration that
changes the schema, a daily copy while ComfyUI runs, pruning of automatic
copies beyond the configured count (manual ones are kept), and a restore
that is staged in the DB sidecar and applied on the next start before any
connection opens, after backing up the current database.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMHPZ4k2kXrePkcgeYJJSF
Send-to-negative UI for the library:
- Wildcard options get a Negative line under the value: a `+ negative`
ghost button while empty, a NEG-tagged RichTextInput (surface
"wildcard": text, {a|b}, @{ref} chips with remap and the broken-ref
note) once set. The null option may carry one. The option filter also
matches negative text.
- Fixed values get the same line on the "fixed_values" surface. Combines
get a Negative field ($vars + {a|b}) and a read-only Carries line: the
negatives library modules file under each $var the template reads, plus
the phrase's own.
- Bulk add reads `value #tag *N -- negative` (first ` -- ` splits,
modifiers may trail either side) and `name = value -- negative`, with a
"with negative" preview chip. The selection toolbar gains a Negative
menu: Add to each (", "), Replace, Clear; Add and Replace skip the null
option.
- Derivation actions gain "Add to negative": the value field is styled as
a negative with a hint that the variable is not changed. The editor's
load normalisation keeps the mode, the inspector describes it, the canvas
rule summary labels it, and the static preview resolver leaves the
variable alone.
- Canvas wildcard / fixed-value instance rows show a read-only NEG hint;
negatives stay library content, never overridden per instance.
An emptied negative is always stored as an absent key.
A new Negatives page in the in-app docs covers where negative words come
from, how they follow the variable, what each negative field accepts, the
Assembler's negative output and $negatives slot, quiet refs that never
shift picks, the Cleaner's negative column, the bulk `--` syntax and the
schema 8 stamp. The Assembler, Cleaner, Injector, Derivation, WP Debug
and Test Runner pages (and the node help files) describe their new
inputs, outputs and fields, and the release notes gain an entry.
The `negative_template` input renders through the template editor as a
collapsible negative box (collapsed when empty, state on
`node.properties.wp_negative_collapsed`, content-sized so spare height
goes to the prompt editor). It stays socketed and read-only when linked,
offers the reserved `$negatives` slot, and caret inserts still go to the
prompt template only.
The helper reads `negatives` from the preview endpoint, folds in
upstream injector rows' negatives, and renders a NEG preview line built
locally by `extension/negatives.ts`, a TS mirror of engine/negatives.py
(follow usage, `$x.N` = pick N, tag-level dedupe, `$negatives`
placement). Save/Load template carry both boxes; loading a template with
no saved negative leaves the negative box as it was.
The conflict scanner, subgraph badge and pre-run check also scan the
negative template for missing `$vars`, never reporting `$negatives`.
A wildcard option's negative shares the value's grammar, so an `@{uuid}`
inside it is a real dependency: the engine resolves it (quietly) and a
download without it breaks. `listReferencedUuids` (publish / bundle deps),
`buildDepGraph` (export picker) and the import broken-ref scan now read
`options[].negative` too, and the library validity check reports a missing
ref inside a negative (the null option's included). "Add to negative"
derivation actions were already covered by the action-value scan.
WP Debug resolved a step's node with getNodeById(Number(id)), so a
workflow with text node ids ("wpctx") got NaN and "show node" silently
did nothing; trace headers fell back to "Node wpctx" for the same
reason. Look up the id as given (litegraph keys its node map by the raw
id) and fall back to the number.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
Migration 019 adds an optional `negative_template` column to `templates`
(row-level, no schema bump). NULL marks a template saved before
negatives existed. The repository, importer (add, replace with
COALESCE, undo), templates API and TS types carry it, and the manager's
template editor gets a Negative template field.
Each scenario sample now carries every variable's negatives, trace writes
pass their negative through, and tracked variables record their joined
negative per seed. The Outputs tab adds a NEG line under each output,
tinted by the variable each word came from; the Samples table gains a
Negative column when any seed has one; the trace drawer shows a write's
negative. Baselines keep the output's negative per seed, and Compare diffs
it only when both sides recorded one, saying "negative not recorded" for a
baseline saved before negatives until it is saved again.
The Variables tab lists a variable's negative words under its value in the
danger colour, naming the module they came from when it isn't the
variable's own (a derivation's Add to negative, an inherited $var, an
Injector row), with a count badge in the tab bar. The Trace tab shows an
Add to negative action as `negative: <value>` instead of an assignment,
and each write's negative under the step. The Variables copy keeps the
negatives table; Raw and the download already carry it.
An opened trace step repeated its single value in full only when the
value was longer than 60 characters, so a shorter value clipped by a
narrow Debug node stayed clipped. The trace now measures each open row
and repeats the value whenever the row had to cut it off.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
MAX_KNOWN_SCHEMA_VERSION goes to 8 with a content stamp for any non-empty
`negative` or an "Add to negative" derivation action, mirrored in the
Python exporter. The strict validators keep the new fields, the parity
fixtures carry one of each, and the payload types learn the field and the
`negative` derivation mode.
Wildcard options, fixed values and combines can carry a `negative`, and a
derivation action gains the `negative` ("Add to negative") mode. The
engine files negatives per variable in `__wp_negatives__`, carries them
across nodes, and the Assembler gets a `negative` output built from the
variables its template rendered, filled into a `negative_template` at
`$negatives`. Negatives resolve on their own seed stream and refs inside
them resolve quietly, so picks never shift. Injector rows can set a
negative, the Prompt Cleaner cleans an optional negative with its own
rule column, and the preview endpoint returns the negatives table.
Schema v8 stamps payloads that use a negative.
WP Debug's "show node" returned early whenever the node that ran a step
was in a different graph than the one on screen, so it did nothing for a
Context node inside a subgraph, or for a root node while the canvas was
inside one. It now opens the node's graph with setGraph (the breadcrumb
follows), waits for ComfyUI's viewport restore, then selects and centres
the node, uncollapsing it first.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
Clicking any connector in a condition group flipped every connector in
that group, so a user could not pick AND or OR per position. Each
connector now flips on its own: the members regroup the way the mixed
row reads, AND binding tighter than OR, so "a AND b AND c" with its
second connector flipped becomes "(a AND b) OR c", drawn with the AND
pair boxed. Flipping it back merges the box away. Test order, and so
every canvas value override key, is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
Write the README for someone installing the extension rather than
someone reading the engine. Adds the release-zip install path, covers
Test Runner baselines, AND/OR derivations, placeholders, the new WP
Debug tabs and library tags, and fixes the network section, which
claimed nothing is fetched at startup while the update check runs on
launch by default and the Community page loads from wp.dumiflex.dev.
The tag-download hardening notes move to docs/network-access.md.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjXpBAkr8VdNukVP1bmwye
A library can hold hundreds of tags, so listing them in the sidebar
doesn't scale. The Tags row now opens the Tags page and its badge
shows how many distinct tags exist.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JxDBWA8ayXs4T8rS5w6jrC
Library tags already let a module, bundle or template carry several
labels. Give them a home:
- Sidebar "Tags" under Library lists the 8 most-used tags with counts;
each opens All items (or Templates, for template-only tags) filtered
to it.
- New /tags page lists every tag with per-kind counts and renames,
merges or deletes a tag across the library in one step
(POST /wp/api/library-tags/rename|delete, through each repository's
update so fingerprints and versions move as for an editor save).
- List filters with two or more tags get an Any tag / All tags switch
(URL key `tagmode`).
- Glossary entry separating library tags from option sub-categories.
No payload or schema change: tags are a row column.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JxDBWA8ayXs4T8rS5w6jrC
A ref that resolves to nothing (placeholder or deleted module, a filter
with no match, an empty option) left a double space or a doubled comma
in wildcard values and editor previews. Tidy the seam in both the
engine resolver and its TS mirror; text away from the seam is kept as
written.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BEU7uBVCJn1isN2RowbhhT
Every Context, assembler and injector widget re-resolved its whole
upstream chain on each poll, so a series chain cost O(N^2) per round
even when nothing changed. Memoise resolveChainStatic per chain head,
keyed on the chain's nodes, their type/mode/widget strings and the
preview-resolver cacheVersion. 16-node chain: 27.7 ms -> 0.16 ms per
round of refreshes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BEU7uBVCJn1isN2RowbhhT
Clicking a stack card opens an inspector: wildcard weight vs picked share
(never-picked options flagged), constraint link/reach/hits, combine
template and outputs, derivation rules, fixed values, bundle children.
Adds a Test Runner docs page and stops the closed drawers' shadow from
bleeding onto the page in the light theme.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
Each derivation rule folds on its own (fired rules open, the rest
folded, plus open/fold all). Append and prepend actions show the piece
added and the joined result. Trace rows clamp to one line, long step
names ellipsize, and the Variables name column lines up across rows
with long names wrapping.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wwo837fQ1tm6RacaQGYom1
The viewer now reads the engine's per-module run detail: which derivation
branch fired and why, each condition's actual value, a wildcard's odds,
pool, filter and the constraints that re-weighted it, nested @{uuid}
picks, constraint reach and hits, multi-pick items and tag axes.
Steps are grouped by Context node (title, codename, seed) with a jump to
the node on the canvas. Warnings get plain-language labels for every
engine type and link to the step that raised them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wwo837fQ1tm6RacaQGYom1
Canvas Context runs now set an explain flag. With it, each trace row carries
the module's display name and a handler detail dict: which derivation branch
fired, with every test's result and the value it read; a wildcard's option,
odds, pool and the constraints that re-weighted it; a constraint's reach and
rule counts. Warnings a module raised name it as their owner, and trace rows,
warnings and nested @{} picks are tagged with the Context node's graph id.
WP Debug forwards the nested-pick log, node seeds, internal flags, rolled
axes, constraint hits and multi-pick items.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wwo837fQ1tm6RacaQGYom1
The Context node's broken-ref scan only read library action values, so a
ref typed into a canvas action-value override (a placeholder included)
never raised a node warning or subgraph badge. It now scans this
instance's action_value_overrides too.
Row markers in both derivation editors now look only at action values,
the one field that resolves refs, so they agree with the chips and the
node warning. Documents the "bi.k" condition override key.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
Typing @name where no module has that name now offers a last
"Placeholder @name" row. It inserts @{<fresh id>#name}, the red broken
chip under that name, which the existing remap flow repoints later.
Rows holding a ref that points at nothing are now marked where they
are: the field gets a red outline, a wildcard option row gets a red
rail plus a note naming the missing refs (library editor and canvas
modal), and a derivation branch and its rule get a red border and a
warning mark (library editor and canvas modal). Canvas rows count only
refs the server confirmed missing, so nothing flashes red while loading.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
A derivation branch condition can now be a group ({match: all|any,
conditions: [...]}) of tests and nested groups. The manager editor gets
+ Condition / + Group controls and a clickable AND/OR connector; the
canvas modal shows the whole expression and one value override per test
(override keys "bi" and "bi.k"). The engine gains is_empty and
is_not_empty ops, which the editor already offered.
Payloads using groups or the emptiness ops stamp schema 7
(MAX_KNOWN_SCHEMA_VERSION 6 -> 7, additive, no migrator).
Also fixes the derivation editor rewriting presence ops to equals when a
saved derivation was reopened.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkgtCKNLjk77oiA5efKPia
A scenario can store a run as its baseline. Later runs are compared seed
by seed: the Compare tab lists every seed whose output changed (with a
word diff), plus variable values and warnings that appeared or went
away. Re-run all runs every pinned scenario and badges each with how it
compares, and the wildcard and derivation editors link to the saved
scenarios that use them.
The run API gains an opt-in track/track_limit that returns chosen
variables' values per seed, which is what a baseline stores.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
main.ts awaited nineteen separate import() calls before registering the
extension. Each became its own chunk, and every module two of them shared
became another, so an empty canvas fetched 43 JS files (166.5 KB gzip)
before the extension could register.
The widget glue still has to be loaded before registration: ComfyUI does
not wait on a Promise from getCustomWidgets, and init runs right after
extension loading, so there is nothing to gain by deferring it. Instead:
- src/boot.ts gathers everything registration needs behind one import, so
it ships as one chunk and the lazy chunks import from it.
- The toast stack mounts on the first toast, the Display playground on
first open, the subgraph badge module when the graph has a subgraph node.
- The template editor's RichTextInput is lazy, like every other widget SFC.
Empty canvas: 2 JS files, 92.1 KB gzip. Total js/ 409.9 → 397.4 KB gzip.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zVr7mDVkhk2bo1yRPVVZa
The page took its headline from the cached update check, which survives an
update for up to six hours. After updating to 2.17.0 it still said
"Release notes for v2.15.3" while the earlier-releases list below already
had 2.17.0. The headline now uses the newest release either source knows,
and a cached check or history older than the running build is refetched.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129KsfAu5bvhBAnCS8AsyoN
Self-review fixes:
- A bundle nested in a bundle now runs its modules, expanded inline the
way the canvas insert does, instead of being skipped.
- A run that finishes after switching scenarios no longer shows its
result on the new scenario; its summary still lands on its own.
- A stack of bundles picks a default output from the combine (or last
binding) inside them.
- Scenario runs execute in a worker thread so a large run doesn't stall
ComfyUI's event loop.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
The release job built js/ + web/ before semantic-release stamped the new
version, so the release zip carried a bundle one version behind its
pyproject.toml and the new update notice would never clear.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
A combine whose template has no variables, references or choices
renders the same text on every run with no warning. Its stack card now
says so, and the Outputs note explains why the output never varies.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
Samples always has a column for the output variable, so a one-module
stack no longer shows a table of bare seeds.
The seed trace now shows the nested @{ref} picks each module made, as a
tree, with what each ref expanded to. The engine records them only when
the caller seeds ctx["__wp_ref_log__"] (the Test Runner does; canvas runs
don't), and nested picks count toward their wildcard's pick totals.
A stack card now says when it reads a $var that no pin and no earlier
item sets, which is the usual reason a combine keeps producing the same
text, and the Outputs tab points at it when the output never changes.
The trace no longer shows "no change" under a module that wrote values.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
Stack cards are cleaner: a step number, a small on/off switch, and a
remove button that shows on hover. Cards reorder by drag, or Alt + arrow
keys, instead of a row of arrow buttons. Switching a card off and on
again no longer marks the scenario as changed.
The output flag and badge are gone. Which variable counts as the output
is now picked in the Outputs tab, where the choice shows its effect.
The seed control is a Range/Random switch with plain number fields, and
the header, pinned values strip and variable bars are tightened.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
The Test Runner page is now a workbench on the real engine: a rail of
saved scenarios, a stack builder that lines library modules and bundles
up like a Context node, pinned values, a seed range, and results in
Variables, Outputs, Samples and Warnings tabs with a per-seed trace.
Every run goes through POST /wp/api/test/run, so the numbers match what
the canvas produces for the same seeds. Send to Test Runner opens an
unsaved quick run and runs it straight away.
The old single-module sampler and its in-browser simulator are removed:
the /wp/api/test route, api.test, TestRequest/TestResponse and
utils/resolver.ts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
Migration 018 adds a test_scenarios table, and /wp/api/test/scenarios
gives it list/get/create/update/delete. A scenario stores its stack
(library modules and bundles referenced live by id), pinned $var
values, seed spec and output variable, plus two JSON blobs the Test
Runner writes: a baseline to compare against and the latest run
summary. Listing can filter to the scenarios that use a given module
or bundle, for the "used in N scenarios" hint.
Scenarios are local only. They are not part of Import/Export or the
community, and this is a row-level table, so no schema_version bump.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
Add POST /wp/api/test/run. A scenario is a stack of library modules and
bundles, optional pinned $var values and a seed spec (a range, N random
seeds or an explicit list). Each seed is one real PipelineEngine run, so
seed N here is seed N on a canvas Context node with the same modules.
The response carries per-variable counts of fully expanded values,
per-option pick counts, constraint hit totals, engine warnings grouped
with the seeds they fired on, and the first N samples with their trace.
Missing modules are reported and skipped so saved scenarios keep working
after a delete.
The engine side lives in engine/scenario.py (no ComfyUI or DB imports).
The client gets api.testRun and its types; the page moves to it in a
later change, together with removing the old /wp/api/test sampler.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xwq95EvrKu6WgE9D5rahKy
ComfyUI lists every **/*.js under WEB_DIRECTORY in /api/extensions and
the frontend imports each one, so every lazy chunk loaded on every page,
even with no WP node on the canvas (62 files, 1.73 MB raw). Only main.js
keeps .js now; an empty canvas loads 42 files, 576 KB raw.
The size gate counts .mjs and reports it under the old .js names so base
and head still diff. The stale-asset prune matches .mjs, and on the first
start after updating it deletes the old .js chunks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
/wp responses now carry X-WP-Version (the installed pyproject version).
The manager's stale banner names the new version, and the canvas shows a
one-time toast with a Refresh button, when it differs from the version
the page was loaded with.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
The canvas constraint editor now shows the same Linked note as the
manager, following instance mode overrides, disabled rows and extras.
The manager's exceptions table reads source_value/target_value first,
matching the engine, so rows written with the newer keys no longer load
blank.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
The cell popover, matrix legend, SPA exceptions picker and canvas
exceptions cycle all gain Only. Neutral cells in a row that has an Only
rule show a faint x, since they are shut out at run time. The SPA
exceptions table says which source values are linked.
The canvas matrix now stores a neutral override as `allow`, the engine's
name for it; it used to store `neutral`, which failed the constraint.
Docs: add a Linking picks section, and correct Allow, which the docs said
keeps only the matching options when it has always meant no change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
A payload with an `only` rule anywhere (library matrix or exceptions,
instance extra exceptions, instance mode overrides) now stamps
CONSTRAINT_ONLY_SCHEMA_VERSION (6) in both the TS publish path and the
Python exporter, and MAX_KNOWN_SCHEMA_VERSION moves to 6. An older engine
rejects the unknown mode outright, so the stamp makes that extension refuse
the pack and ask for an update. Additive: no migrator, CURRENT stays 2.
Needs community catalog v6 deployed first (server-first ordering).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
A constraint rule with mode `only` turns its row into an allow-list: when
the source fires, a target with no rule of its own in that row is excluded.
On an exception it links literal values (maid forces frilled apron); in a
matrix row it links tags. Before, a link needed an exclude rule for every
other target, and a target added later slipped through.
The rule itself weighs 1.0 and targets with any other rule keep it. A matrix
`allow` cell does not count as a rule because the editors show it as
Neutral. The axis-menu probe ignores value-level `only` so a tag link in
the same constraint still pins an accepts roll. Python and TS folds stay in
step through new constraint-corpus cases.
Also reads a legacy `neutral` cell mode override as `allow`: the canvas
matrix stored that value, and the engine rejected it, failing the whole
constraint.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137To3tFTPKen2wYqEo3wme
When the picked option carried no tag on a declared accepts axis, the run
warned "$outfit has no 'SHOES' axis — is that tag group marked
'accepts'?", sending users to fix a group that was fine. Wildcards now
record which accepts axes they declare (`__wp_axis_decl__`, carried across
nodes and held seeds like `__wp_axes__`), so the resolver can tell the
cases apart: an untagged pick becomes an info note, and a genuinely
unknown axis names the axes that do exist.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BxeNnfTMTyaKQwCYWA6frg
Renaming an accepts tag group to a name `$var.NAME` cannot parse used to
demote it to classify without a word, silently emptying every
`$var.AXIS` read of it. The rename is now refused with a toast (same rule
as promoting such a name), and the input puts the old name back. A name
colliding with another group now does the same instead of leaving the
input showing a name that was never stored.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BxeNnfTMTyaKQwCYWA6frg
New Docs page "Chips & references" (How it connects): what a chip is, its
three states (resolved, filtered, broken), how to make a placeholder $var
chip, the four-segment @{uuid#name:filter!null} form versus plain @name, and
the sub-category filter grammar (not / and / or / comma, parentheses,
precedence, reserved words, null as a flag). Registered with keywords so a
docs search for "chip" or "filter" finds it. Glossary gains Chip, Reference
and Filter expression; the wildcard and variable-pipeline pages link to it.
Claude-Session: https://claude.ai/code/session_012LhbKjx2xyGYREkvcShihy
Co-authored-by: Claude <noreply@anthropic.com>
The assembler preview filled every `$var.AXIS` with the axis's first
tag, independent of the option the preview had picked, so it could show
"sandals | robe | red stilettos". /wp/api/preview/resolve now returns
the rolled `__wp_axes__` beside the values and the preview reads it
with the same shaping as the engine, falling back to the first-tag
guess only until the run answers. Also accepts the axis-first
`$var.AXIS.K` order the engine already parses.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fQ7Lkc8AxwXqsRZrFBxE9
`$outfit.K.AXIS` compacted away picks whose option has no tag on the
axis, so every later index slid down and `$outfit.0.SHOES` could print
pick 1's shoe beside pick 0. Both the resolver (`get_axis`) and the
derivation condition reader now keep one slot per pick.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fQ7Lkc8AxwXqsRZrFBxE9
build_export_payload always stamped CURRENT_SCHEMA_VERSION (2), so a file
export using range multi-picks, a non-default constraint target_select or
an accepts tag axis went out as v2 and an older extension installed it
while misreading or dropping those features.
Port the TS schemaVersionForPayload logic to engine/migrations/stamping.py
(same SP2b regex, reach and tag-axis walks) and stamp the export from all
buckets, auto-included inner bundles included. The SP2B / SP3 / TAG_AXES
constants now also live in engine/migrations beside MAX_KNOWN.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174Xsr85WVPSVjSREXkSi5a
The vitest parity suite checks the TS validators against fixtures that
scripts/dump_engine_shapes.py writes, but nothing re-ran the script, so a
handler shape change left the fixtures silently stale. A pytest now
re-runs the dump in memory and compares.
CLAUDE.md's schema section pointed at files that don't exist
(import-export/validators/, migration-machine.ts, ENGINE_SCHEMA_VERSION).
It now names the real files and spells out CURRENT vs MAX_KNOWN vs the
content stamp, plus the additive-bump procedure.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112KkzW3unDU8PGrTpTDL7r
A wildcard whose tag_group_kinds marks a group accepts now publishes as
v5 (TAG_AXES_SCHEMA_VERSION) instead of v2, and MAX_KNOWN_SCHEMA_VERSION
moves to 5 in TS and Python. An older extension strips tag_group_kinds
on install, silently turning accepts axes back into classify groups; the
v5 stamp makes it refuse the pack and ask for an update instead.
Additive like v4: no migrator, CURRENT_SCHEMA_VERSION stays 2.
Needs community catalog v5 deployed first (server-first ordering).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112KkzW3unDU8PGrTpTDL7r
wrapAsEngineExport pinned schema_version 1 and the dependency downloader
pinned 4. installEnvelope migrates from that number, so every community
update re-ran the v1->v2 migration over already-current content, and a
genuinely old dependency would have skipped the migration it needed.
Both now carry the download's own schema_version.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112KkzW3unDU8PGrTpTDL7r
Backlog P1 "Text input instability on Firefox" asked for a clean repro of
the reported path on the current build: two-option wildcard, add a third,
Ctrl+A Ctrl+X an option into the empty one, twice. Driven in Firefox 153
against 2.14.0 across five variants (cut/paste chains, back-and-forth,
hammered without waits, cut twice in one field). None crashed, bricked the
field or logged an error; the fragment-anchor repairs from 2.13.x hold.
One real defect did reproduce, and it is the content-loss half of the
report. Ctrl+A on an empty field selects nothing but the ZWSP caret pad.
`onHostCut` / `onHostCopy` saw an empty raw selection and returned without
preventDefault, so the browser performed the cut itself and put the pad on
the clipboard, overwriting the text the user had just cut. The following
paste then wrote U+200B into the option value, where it is invisible and
effectively undeletable.
- Cut and copy now swallow a non-collapsed selection that covers no value,
leaving the clipboard untouched. A collapsed caret still falls through
to the browser as before.
- Paste strips ZWSPs from incoming data, so a clipboard that already holds
a pad (from an older build) cannot smuggle one into a value.
Re-measured in Firefox on the rebuilt manager: the double cut now pastes
"red dress" back, and all five variants stay clean.
Three QA screenshots (accepts-icon-candidates.png, accepts-mark-live.png,
refchip-card.png) were git-added by accident in fd6642b2 and landed on
main via the tag-axes merge. pack-release.mjs asserts every top-level git
path is either in SHIP_PATHS or DEV_ONLY, so these unclassified captures
failed the 2.14.0 release in the prepare step (no tag or release was cut).
Remove them and anchor `/*.png` in .gitignore: root-level PNGs are always
scratch QA captures here, while every real image lives under public/. The
anchor keeps public/images/** untouched and stops this recurring.
Wildcard page: correct the accepts fold description (one rolled tag, not an OR
over the menu). Variable-pipeline: $var.AXIS / $var.K.AXIS accessor row.
Constraints concept: an accepts-axis source keys on the rolled tag, an accepts
target OR-folds, and the two agree under a diagonal. Glossary + warning-types:
axis/accepts/classify terms and the two tag-axis warnings. next.md: tag axes
leads the highlights.
An accepts axis rolls one tag per pick (read as $var.AXIS), but a constraint
sourced from it folded over the option's whole menu instead of that rolled tag,
so $outfit.SHOES and the constrained $shoes could disagree. The source now
sends only the rolled winner; a target accepts axis OR-folds so a multi-tag
option survives when any alternative is allowed, then its own roll is pinned to
the allowed tag -- $source.AXIS == $target.AXIS under a diagonal. Classify
groups are unchanged (multiply).
The assembler also rendered $var.AXIS empty: __wp_axes__ crosses the socket on
ContextPayload.internals but the node only merged the internal-flag map; it now
merges the whole carve-out so the accessor resolves.
Import: the community validators silently dropped tag_group_kinds (and the
constraint target_select) because the lenient payload object never listed them,
degrading a shared accepts axis to classify. Both are now in the v2/v1
validators + the engine-parity fixtures, with preservation tests. Engine math
mirrored in TS via the shared corpus.
An accepts axis only yields a value for options that carry one of its tags; an
option with none makes $var.AXIS render empty when it's picked, with no other
symptom. The wildcard editor's sub-category panel now shows a non-blocking
amber note per accepts group when some options don't cover it ("N options carry
no SHOES tag — $outfit.SHOES is empty when it's picked"). Silent when the axis
is fully covered or the group is classify; the null option is excluded (it
deliberately produces nothing). Verified live both directions.
The constraint matrix showed an accepts group (SHOES) exactly like an ordinary
tag group — the editor tells them apart via its accepts button, but the matrix
couldn't. Plumb tag_group_kinds through to the grid (SPA ConstraintMatrix + the
canvas MatrixSection, both wired from their editor/modal) and mark an accepts
band with a small amber pi-sync after the axis name, keeping the group's own hue
so it never collides with an amber group. A hover tooltip and a MatrixLegend row
(shown only when the matrix has an accepts axis) explain the mark. Verified live:
mark on SHOES, none on a classify-only source, legend row appears/hides with it.
The exception mode dropdown clipped its labels and overlapped the selected
row's tick with a scrollbar. Two real causes, both in Select:
- `.wp-select__option-label` was `flex: 1` (basis 0), so it split the row 50/50
with the always-present spacer and squeezed a short nowrap option to
half-width, clipped by overflow:hidden even with room. `flex: 0 1 auto` sizes
it to content and lets the spacer do the filling; a long option still shrinks
into the 2-line clamp.
- The "Type to filter" hint showed for any list of 2+, and its height pushed the
4-item menu past its cap into a scrollbar that overlaid the tick. New
`filterable` prop (default on) turns the hint + type-to-filter off; the mode
picker sets it false, so 4 options render as a clean menu — no hint, no scroll.
The mode Select sits in a table cell that collapses the trigger narrow, and the
Select sizes its menu to the trigger — so the nowrap mode chips clipped to
"N / Exc / Boo / Red". Floor the control at 132px so Neutral / Exclude / Boost /
Reduce each fit. (This is the constraints-mode.mp4 report.)
The nested-ref hover card was 10px mono and pointer-events:none — the report's
"unnecessarily small", and un-clickable by design. Bumped to 12px and made it
interactive with a hover bridge (leave the chip, enter the card, it stays — the
GitHub-hovercard pattern), so a footer of actions is reachable: Copy id (with a
"Copied" tick) and Open (the linked module's SPA editor in a new window; full
phrasing in the title). Copy works even for a broken ref; Open is gated on the
ref resolving. The chip's own click is untouched, so no clash with the template
editor's click-to-edit-filter.
Two backlog items.
- The wildcard editor's sub-category panel now opens on load per a new
"Sub-categories panel" display-pref (Settings → Editing): "Expanded when it
has groups" (default), "Always expanded", or "Always collapsed". Resolved once
per load so collapsing it and adding a tag doesn't yank it back open. (Also
dropped a duplicated tag_group_kinds assignment in the load path.)
- "Send to Test Runner" jumps to the runner with a module/bundle preselected via
?kind=&module=, which TestRunner reads on mount. Added as an icon row action on
every list view (and All items, keyed by row.kind) and a labelled button in
every module editor header. New shared SendToTestRunner.vue.
The Save button and the validation banner sit at opposite ends of a long
editor, so clicking Save on a wildcard with 30 options did nothing the user
could see — a reporter clicked it five times before finding the banner off
screen. EditorFrame now watches its `errors` prop and, on the empty→populated
edge (the "tried to save while invalid" moment every editor already gates on),
scrolls the first offending field into view via the existing scrollToField.
Guarded to that one edge so re-validation on each keystroke while fixing it
doesn't yank the scroll. Covers all five editors at once.
Two backlog QoL fixes.
- duplicate_module dropped content_rating, so copying an 18+ module produced a
SFW copy that slipped out from under the filter. Forward it.
- Icon-only Buttons carried an aria-label (screen-reader name) but no title, so
a sighted user hovering a bare icon got nothing. Mirror the label into title
when there's no visible text — fixes every icon button at once.
Shift for seed lock and Alt for bypass didn't match the reflex — users reach
for Ctrl to bypass and Alt to lock. Swap to Ctrl-click (Cmd on macOS, where a
Ctrl-click is a right-click and never reaches the handler) for bypass and
Alt-click for the seed lock; Shift is freed. Plain click still selects (Loop)
or locks (Seed List, no cursor). Legend + tooltips + the three widget test
suites updated. Verified on the live canvas: ctrl→bypass, alt→lock, shift no-op.
Two bugs the modal-only testing missed, both verified in the live canvas.
1. Assembler template (and every inline `.wp-rt-var` render) mis-parsed an
index-first accessor. `varSpanAttrs` hand-rolled the axis extraction with a
`.replace(/\.\d+$/,"")` that only strips a TRAILING index, so
`$outfit.0.SHOES` produced axis "0.SHOES", matched no declared axis, and
painted a valid reference with the unknown-axis warning — the yellow
squiggle in the screenshot. Replaced with the one shared `varAccessorParts`
grammar (index + axis, either order), and split the inline tail into a
neutral index span and an amber axis span to match the settled chip. The
canvas CSS copy (rich-text-canvas.css) had no accessor rule at all, so the
amber never applied there — added it.
2. `instance.internal` was add-only in three places (engine pipeline, the
graph.ts kinds walk, the static resolver), so a var written internal then
overridden by a PUBLIC module stayed hidden from the assembler forever.
Made all three last-write-wins: whichever module writes the var LAST decides
its internal-ness, exactly like its value. Verified both directions live —
internal→public shows "public value", public→internal hides it.
A var chip's accessor is two unrelated things — a pick index (.0) and a tag
axis (.SHOES) — and both were rendered in one amber span. So `$outfit.0.SHOES`
painted the .0 amber too, and since amber is the axis accent it read as "the
index is an axis / the index is flagged". Worse for the exact case the user
hit: the index only means anything on a multi-pick source, and whether a
source is multi-pick is a runtime fact no static surface can know, so the
editor has no business colouring it at all.
Split the accessor into its own index span (neutral, dimmed, the chip's own
colour) and axis span (amber, or the unknown-axis warning). Only the axis —
the one part that names a library concept — carries a colour now.
The assembler preview walked the template with a regex that stopped at the
numeric accessor, so `$outfit.SHOES` matched `$outfit`, printed its value and
left ".SHOES" as literal text beside it. It now matches the whole reference
and resolves an axis against the chain's accepts axes — passed down from the
same walk that already feeds the resolved map — falling back to the raw
reference when the chain declares no such axis, so a typo is visible rather
than silently dropped.
Separately: `upstreamVars` is `Object.keys(fresh)`, and the API branch merged
the run ctx in without filtering, so every engine table rendered as a variable
chip. The fallback branch had always filtered; the API branch never did, which
is why the chips appeared as soon as a table existed to leak.
The preview tokenizer never carried the axis accessor, so every consumer
rendered the variable and left ".SHOES" beside it as text — which is why both
the PREVIEW and RESOLVED lines read "a white t-shirt and denim skirt.SHOES".
It now carries `axis` the same way it already carried `index`, and the combine
editor resolves an axis read to a tag rather than to the variable's value. An
axis the producer does not declare stays verbatim: swallowing it would delete
text the user typed.
Also undoes the leak from the previous commit. strip_internals' result IS the
variable surface — the assembler's variables panel enumerates it, so keeping
__wp_axes__ / __wp_picks__ there listed them as $__wp_axes__ chips. The tables
are re-attached by with_resolver_tables at the one call site that needs them.
Three separate places dropped an axis read on the floor:
- The producer map replaced a variable's record wholesale on every later
write, so a derivation or injector rebinding $outfit erased the wildcard's
axes. The engine keys __wp_axes__ by binding at pick time and a rebind
never clears it, so the axes must survive the override. Carried forward in
both the graph walk and the same-node sibling merge.
- The static preview resolver knew only the numeric .K accessor, so
"$outfit.SHOES" substituted $outfit and stranded ".SHOES" — the preview and
resolved lines both read "a white t-shirt and denim skirt.SHOES". It now
resolves an axis to its first tag, the same deterministic convention @{uuid}
expansion already uses, and leaves an accessor it cannot resolve verbatim
rather than deleting text.
- strip_internals runs at the prompt-render boundary and dropped every
__-prefixed key, __wp_axes__ and __wp_picks__ included. The assembler
therefore rendered "$outfit.SHOES" and "$outfit.0" as literal text while the
identical template resolved one node upstream. Those two tables are read by
key, never as variables, so keeping them cannot leak a $var.
Committing an autocomplete suggestion bumps hostEpoch, which replaces the
host element. In a browser that removes the node the caret is in, so the
browser fires blur on the way out — and onHostBlur treated it as the user
leaving: it read the already-detached host as "", saw that differ from the
atoms just applied, and re-applied the empty parse. Every $var commit wiped
the whole template, on the canvas and in the SPA alike.
Flag the swap and let blur skip it. jsdom does not fire blur on removal,
which is why the existing tests never saw this; the new ones dispatch the
blur the browser would, in the window before the swap settles.
allVarProducers merges the graph walk with siblingVarInfo.producers, and a
variable written in the same Context node takes the sibling entry wholesale.
Only the graph walk carried axes, so `$var.AXIS` completion went missing for
the most common layout of all: the wildcard and the template that reads it
sitting in one node.
Read the axes off the module's own payload snapshot rather than the library,
so the node offers what it will actually run.
A canvas node carries its own payload SNAPSHOT of each module, so a wildcard
added before its group was promoted has tag_groups but no tag_group_kinds at
all. The warning treated that as 'declares no axes' and put a wavy underline
under $outfit.SHOES - a reference that resolves perfectly well, and will look
fine again the moment the node's snapshot is refreshed.
Absence of the key means UNKNOWABLE, not empty. The mark is now claimed only
when the producer declares SOME axes and this is not among them, which is the
one case where the read is known to be wrong. Same rule on both the chip and
the flat-text surface.
Does not fix the missing axis ROWS on canvas: those come from the same stale
snapshot and need the node's module refreshed from the library, which is the
existing drift flow rather than something to paper over here.
Was the axis group's own hue, matching the pills in the wildcard editor.
That made one meaning look different from variable to variable - SHOES came
out teal in one wildcard and purple in another - when an accessor is the same
KIND of thing everywhere it appears. Now a single --wp-axis token used by both
the chip and the suggestion row.
Amber-400 deliberately, not --wp-warn amber-500, which marks an UNDECLARED
axis: a valid accessor must never read as the warning.
Also restores the accessor style block itself. Both earlier attempts anchored
on a .wp-refchip__label rule that does not exist in this file, so neither the
colour nor the unknown-axis mark had ever actually shipped - the class was on
the element with no rule behind it. Verified in the running SPA: accessor
rgb(251,191,36) against the chip's rgb(34,197,94).
Typing $outfit.0. closed the popover: the flat pool is substring-filtered,
and no entry contains 'outfit.0.'. $outfit. only ever appeared to work by
luck - the pool holds 'outfit.SHOES', which happens to contain 'outfit.'.
From the first dot the question changes from 'which variable' to 'which
axis', so the pool does too: it offers that variable's axes, narrowed by the
fragment after the dot, and preserves a pick index the user already typed
($outfit.0. -> $outfit.0.SHOES). Verified in the running SPA.
Found by driving the real SPA with Playwright; jsdom could not see it. One
Backspace after typing $mo turned it into a chip, closed the popover and
threw the caret onto the host root - three separate reports, one cause.
The modelValue watcher guards against our own echo with
'next === lastEmittedValue && readHostAsText() === next'. But the
atom-direct edit paths sync the host DOM imperatively AFTER updating the
model, so at emit time readHostAsText() still returned the PRE-edit string.
The guard missed, the watcher re-parsed through parseForSurface, and that
chipifies. emitValue now claims the single round-trip it is about to cause,
released on the next tick so an uncontrolled parent cannot strand the claim.
Also fixed, both verified live:
- the axis segment now takes its group's hue on the chip, not just in the
suggestion row; it was styled with opacity/weight only and rendered plain
chip-green. A pick index deliberately stays neutral - it is positional,
not semantic.
- the stale-results dimming applied to $var popovers, which have no async
fetch, so rowsQuery never advanced and the list read stale from the first
keystroke and never recovered.
- the axis row indent lost to a later padding SHORTHAND; now specificity-
based so source order cannot undo it.
QA sweep over axis authoring found the real fault under the reported
symptoms: the ATOM model had no accessor at all. VarAtom carried name and
index but no axis, and tokenToChipAtom never copied one, so $outfit.SHOES
round-tripped as $outfit - silent data loss, not a cosmetic issue. My
earlier fix was to inlineTokenHtml, a different layer, which is why the chip
still looked wrong.
Four hand-rolled var serialisers existed and one had already drifted:
parseForSurface wrote '$' + name and dropped a .K index, so $mood.0 lost
its accessor on the assembler surface today, independent of this feature.
All four now route through one serialiseVarAtom.
Also fixed from the sweep:
- the chip label was built from name alone, so the accessor never rendered
- a dangling dot ($outfit.) killed the trigger, closing the popover at the
moment the axis list was most wanted
- the axis row's padding-left was reset by a later padding SHORTHAND on the
base rule, so the indent never applied
- an undeclared axis was unmarked on chip surfaces; the warn styling had
only landed on the flat text path
Two reported symptoms did NOT reproduce and are not fixed here: caret jumps,
and backspace committing a chip. The Backspace handler deletes and
preventDefaults correctly - an early version of this test deleted twice and
manufactured the failure.
The reference stays ONE .wp-rt-var atom - caret math and deletion are
unchanged - but the .AXIS / .K tail gets its own span so it reads as a
qualifier rather than part of the name.
Also fixes a real bug behind it: varSpanAttrs checked the WHOLE string against
varSuggestions, so $outfit.SHOES matched nothing and every valid axis read
wore the unknown-variable error styling. Scope is a property of the base
variable, so the check now uses the base.
A base that resolves with an axis that does not is warn-coloured rather than
silent, matching the unknown_tag_axis conflict rule. The engine renders an
undeclared axis as an empty string, so without a mark the only symptom is a
word quietly missing from the prompt.
Typing 'out' now lists outfit and, indented under it, outfit.SHOES and
outfit.EXPOSES with the tags each will roll from. One Enter commits the whole
reference, so a committed chip no longer seals the variable before you can
reach its axis.
Flattened into the existing list rather than a second picker like @{uuid}
uses: that picker exists because a ref needs a typed filter expression and a
toggle, which cannot live in a list row. An axis is just a name, so a second
popover would be machinery the problem does not call for - and it would tax
every axis-bearing variable, including the times you wanted the plain $outfit.
The member tags are shown because they are what tell SHOES from EXPOSES. The
accessor segment takes its group's own hue via axisHueAt, indexed over ALL
groups rather than the accepts ones so it matches the colour that group wears
in the wildcard editor.
No index rows: pick_min/pick_max are per-instance, so a library-authored
template has no range to offer and any number shown would be true for one use
and wrong for the next.
Both surfaces already thread varProducers to RichTextInput, so axes ride on
that rather than a parallel map: the canvas reads them from the wildcard
payload during its graph walk, the SPA from the module catalog.
Read from the PAYLOAD deliberately. A group's kind is a library fact shared
by every instance, so completing against it is always correct - unlike
pick_min/pick_max, which live on the instance, so a library-authored
template has no pick range to offer and index completion is not
expressible at all.
Only accepts groups qualify: a classify group is not addressable as
$var.NAME, so suggesting one would complete to a reference the engine
renders as an empty string.
Two defects, both from the accessor grammar landing without the editor being
told about it.
varBaseName stripped a numeric .0 and nothing else, so outfit.SHOES matched
no known variable and never became a chip - the reference resolved fine at
runtime but looked like dead text while authoring. It now understands every
accessor shape and leaves genuinely invalid ones (two indices, three
segments) alone, since reducing those would claim a reference the engine
will not resolve.
The sigil probe walked back over SHOES, met a dot it did not recognise, and
gave up; the booru-tag probe then took the caret and offered shoe TAGS,
none of which are insertable there. It now skips up to two accessor
segments - one index and one axis, either order - and stops, so dotted prose
is not chewed backwards looking for a sigil.
An earlier version faded the classify capsule in on header hover to keep the
default state quiet. That optimised for ink over discovery: a control you
only see by accident is one most people never learn exists, and this is a
capability nobody is looking for yet.
Every group now states its kind. The dim weight keeps it from competing with
the axis name.
The pills this control governs are hue-tinted capsules; the control was a
flat grey square borrowed from the ungroup button, which is the vocabulary
of a utility ACTION. On a piece of state it read as a stray control and the
hover landed as a hard block unrelated to anything near it.
Now the same capsule recipe as the pills - hue fill, 999px, 1px hue border -
so it reads as a property of the axis, and hover deepens the tint already
there rather than adding a second colour. It is also labelled, where an icon
needed a tooltip before anyone knew what it toggled.
A classify group shows nothing until its header is hovered, so the default -
every group that exists today - costs no ink; only the promoted state, which
is real information, is permanently visible. Hidden with opacity rather than
display, so it keeps its place in the tab order and :focus-visible reveals it
for keyboard users.
The first version was a raw <select> with hand-rolled sizing - a 10.5px font,
a 4px radius and a 1px border, none of which exist in the design system. It
tripped both the typography and radius token audits and read as a foreign
form control in a header made entirely of icon buttons.
Now a 24px icon toggle with the same shape and hover as the ungroup button
beside it, tokens throughout, tinted with the group's own hue when promoted.
A classify group - which is every group that exists today - carries no extra
chrome at all; the promoted state is what earns the ink.
Being a toggle also removes the select-reset hack: the button renders from
tagGroupKinds, so a refused promotion can no longer leave the control
displaying a state that was never stored.
_pick_weighted returned options[0] when every weight was zero. That looked
like a working pick - a real option, right shape, right place - and stayed
wrong silently until the list was reordered and the choice changed. It hid
both over-narrowed constraints and a wildcard whose options were all
disabled.
Now returns None, which every caller already turned into an empty binding.
That is what the null option means, so the engine had the vocabulary for
this already.
Applies to all three pools that constraints can zero: the chain handler, the
nested-@{} path in the resolver, and the SPA preview. The inline {a|b}
branch weights are left alone - a user writing {0::a|0::b} is a different
situation and constraints never touch it.
Three tests asserted the old behaviour and are rewritten to state the new
one; the constraint_excludes_all_options warning stays, and now
distinguishes an over-narrowed pool from a legitimate null roll.
A user who had read the docs several times still expected $tag_name to
work, which was a documentation finding independent of any feature. Tags now
have two kinds, so the obligation got larger rather than smaller.
Teaches $outfit.0.SHOES as the one spelling. $outfit.SHOES.0 is accepted
but undocumented - offering both would hand the reader a choice with no
consequence.
The engine renders an undeclared axis as empty, so without a signal the
only symptom is a word silently missing from the prompt. Commonest cause is
a group that exists but still says classify; second is an axis renamed after
the read was written.
Deliberately conservative: the scanner runs per node and receives upstream
variables as names only, never payloads, so a read is checked only when a
wildcard in THIS node writes that binding. Guessing about an unseen upstream
producer would fire on correct workflows, and under-reporting beats a
warning nobody can act on.
The producer map is built before the module loop because a read can sit
above the wildcard that feeds it - resolution is by ctx, not by position.
A select on each group header, defaulting to classify. Only accepts entries
are ever stored and the payload key is omitted when nothing is promoted, so
an untouched wildcard saves byte-identically.
The name check runs here rather than at save: an accepts group is read as
$var.NAME, and hearing about it after the work is done is too late. On
refusal the select is put back explicitly - the bound value never changed,
so Vue has no reason to re-render, and it would otherwise sit showing a
state we just declined to store.
Rename carries the kind across and ungroup drops it, since a kind naming no
group is invalid payload. renameGroup's comment claimed axis names were not
part of any grammar; that stopped being true with $var.AXIS.
The reported failure: an outfit option tagged sneakers, high_heels and
sandals excluded every shoe in the constrained target, the pool summed to
zero, and _pick_weighted fell through to options[0] forever - looking like a
working pick until the list was reordered.
The kind map is derived from the pick records rather than passed down from a
payload, since a pick only carries an axes entry when its source declared
that group accepts. That keeps combine_constraint_factor pure and makes a
legacy pick with no axes take the unchanged flat-product path.
Also fixes the SPA preview resolver, which mirrors the applier: it dropped
axes when building its per-pick list, so the preview would have shown a
narrower pool than the run actually produced.
Conditions store condition.var as raw text rather than tokens, so this path
parses the accessor itself via parse_var_reference. _ctx_set is left on
split_var_accessor: an action writing to $outfit.SHOES should still target
the base var rather than pretend to write an axis.
_ctx_has checks the axes bucket rather than ctx, since $outfit.SHOES can
exist while outfit is unbound and vice versa.
Action values needed no work - they already route through resolve_text.
get_axis sits beside get_var as a plain dict lookup over a projection
build_resolve_ctx makes at frame construction, so the resolver stays a pure
consumer with no ctx dependency. Keyed by binding, matching what the
reference addresses.
Branches before the var lookup: $outfit.SHOES must resolve even when
nothing bound $outfit itself, and must not trip unknown_var on the way
past. Never routes through deref_var_value either - an axis value is not a
ListVar, so the SP2a accessor contract is untouched.
A missing axis renders empty and warns unknown_tag_axis rather than
failing, matching how every other unresolvable reference behaves.
A reference now carries at most one pick index and one axis, in either
order - $o.0.SHOES and $o.SHOES.0 name the same value. Accepting both is
deliberate: $o.0 is already meaningful on its own, so appending .SHOES is
composition rather than a second syntax, and rejecting it would make the
natural spelling the broken one.
Two mirrored regex alternatives, so .0.1 and .SHOES.BELTS reject by not
matching their second segment and the tail stays literal text - no
validation pass. Both tokenizers normalise to one (name, index, axis)
triple immediately, so nothing downstream learns which spelling was used.
Replaces the var_nondigit_accessor_is_text corpus case, which pinned the
behaviour this changes, with cases for both orders and both nonsense forms.
A held wildcard early-returns before recording, so its axis vanished on
iteration 2+ and every read rendered empty. Carries the frame-0 roll forward
the way picks already are, but keyed by binding rather than module id, since
that is the namespace a var read addresses.
setdefault semantics, not assignment: a wildcard that never asked to hold
still re-rolls each iteration, which the third test pins by running six
seeds over a two-tag menu.
Two consumers address a pick differently, so each gets the key it addresses
by. The constraint fold needs a tag-to-axis map and binds by module uuid, so
that rides on the pick entry. A $var.SHOES read binds by variable, so the
rolled winner goes to __wp_axes__ keyed by binding - which also means the
read never inherits the uuid-bucket collision.
Rolled at pick time, never on read: that is what makes two modules, or two
nodes, agree. The draw happens AFTER the option draw on the same rng, so an
existing locked_seed still reproduces its option.
Multi-select rolls per pick in pick order, so $outfit.SHOES mirrors the
shape of $outfit.
A group may declare itself classify (the default, and what every stored
payload means) or accepts. Only an accepts name has to satisfy the
identifier rule, because only an accepts axis is addressable as $var.AXIS;
a classify group keeps whatever name it has today.
Also narrows the constraint weight multiply with isinstance rather than
sentinel identity, which the newly-typed fold made unprovable.
Same three phases in the same order as the Python side: an exception pair
short-circuits the pick, unclaimed tags multiply, each accepts axis
contributes its max and an all-zero axis excludes. Graded against the same
corpus so the two cannot drift.
An option tagged with several tags from one group means those tags are
alternatives it offers, not statements that are all true at once. The fold
multiplied across them, so any sibling's exclude zeroed the option and a
source carrying three shoe tags excluded every shoe in the target pool.
Tags inside a group the source declared 'accepts' now fold with max.
Everything else still multiplies, and the path is unreachable without
axis_kinds, so a payload predating the feature folds byte-identically -
locked by the corpus case that omits the kind map.
Also replaces the bare object() sentinel with a narrowable class: 'is
EXCLUDE' never narrowed, leaving every 'factor *= r' unprovable.
The two rows around the variable strip go; the strip itself is untouched, being
the part that earns its space.
The standing hint row ("click → insert $var · Ctrl+click → remove · right-click
→ more") is deleted rather than shrunk, because the chips it describes ALREADY
carry that exact text in their own `title` — it was a permanent row duplicating
something one hover away. Removing it outright would have cost the only clue
that Ctrl+click removes, which is genuinely undiscoverable; it does not, because
that clue was never in the row alone.
Load / Save / Clear become icon-only. Each already had a `title` and an
`aria-label`, so the visible word was the only thing dropped, and three words
were most of the row's width. Kept as visible buttons rather than folded into
the context menu: an affordance you cannot see is one you do not know exists,
which is the mistake the hint row was compensating for.
`<lora:…>` and `embedding:…` now carry one fixed colour each — lavender and
cyan, matching the popover's own section icons — in the editor AND in the
resolved preview. The preview needed its own wiring: those two resolve to
themselves rather than to a variable, so they fell into `literal` tokens and
were the last place the syntaxes appeared uncoloured. It calls the same
`modelSyntaxHtml` the editor does, so the two cannot drift.
The colour is applied INLINE, which two independent facts each force. The SPA's
`rich-text.css` is not loaded on the canvas — the canvas has its own
`rich-text-canvas.css` carrying a "keep in sync" note — so a rule would have
had to be written twice. And these spans come from `v-html`, so they never
receive the `data-v-*` scope attribute a rule in a `<style scoped>` block
needs. The first attempt did it with a stylesheet rule and rendered plain #ddd
on both hosts; caught by reading the computed colour rather than the diff.
Verified on canvas: embedding rgb(103,232,249), lora rgb(196,181,253), `$camera`
still its hashed orange, hint row absent, three icon-only buttons. The preview
half is NOT verified — the helper freezes mid-`<Transition>` in this harness,
where `transitionend` never fires, so the preview never mounts.
Turning a completion source on did nothing until the page was reloaded.
`completionSourceEnabled` asks ComfyUI's settings store (or localStorage)
directly, and neither is a Vue reactive source — so the `computed` gating the
popover cached on its other dependencies and never re-evaluated. Readers stay
where they are, because they are the single place that knows how to answer per
host; a version counter is now bumped by every writer and read by the gate.
A counter rather than mirroring each value into its own ref: there is one
question here — did any of this change — and nothing to keep in sync.
Both hosts notify: the canvas switches from their `wp-switch` handler, the
native separator boolean through ComfyUI's own `onChange`, and the manager from
`uiStore`'s single `writeFlag`. The first test in the new file asserts the BUG
— a computed over the raw reader going stale — so the fix cannot be quietly
undone.
`<lora:…>` and `embedding:…` now render in their own fixed colours, matching
the `loras` and `embeddings` section icons in the suggestion popover, so the
thing being inserted and the thing on the page read as the same kind. Fixed
per kind rather than hashed like `$var`: there are arbitrarily many variables
and the colour is how you tell two apart, but exactly two of these and they
always mean the same thing, so one colour each is learned once instead of
decoded each time.
Deliberately not a tokenizer kind. `tokenizeRich` is shared with the
engine-parity resolver and the atomic editor model, and neither has any
business knowing ComfyUI prompt syntax — this is a rendering concern and it
stays in the renderer, decorating text tokens on the way out. A half-typed
`<lora:` highlights too, since that is exactly when it is being written.
The flicker on the last letter typed, from the screen recording. Two causes,
one of them mine.
The sources settled INDEPENDENTLY, which I chose deliberately so the popover
would never be held at the speed of the slower one. That optimised for a
latency that does not exist — both endpoints are in-process on localhost — and
paid for it with a visible double reflow on every keystroke: tag rows landed
and rendered, then model rows landed, appended their sections and re-capped the
tags, so the list rebuilt twice within a few tens of milliseconds. One settle
now, via `allSettled` so one source failing still shows the other.
Frame-stepping the recording also turned up something worse than flicker. At
2.60s the field and the header both read `lazy` while the third row was `laser`
(from the alias `lazer`) — not a `lazy` prefix at all. Those were the results
for `laz`: the header renders `acQuery`, which updates synchronously on every
keystroke, while the rows arrive from a debounced fetch, so there is a window
where the popover confidently shows the PREVIOUS query's results under the
CURRENT query's label. Pressing Enter there commits a row chosen from a list
that no longer matches what was typed.
The rows are deliberately still not cleared while the next fetch is in flight —
blanking on every keystroke flickers far worse than briefly-stale content — so
instead the popover says so: the header shows "searching…" and the rows dim
while `rowsQuery` differs from `acQuery`. That turns an unexplained reflow into
an obvious "still looking", and makes the stale window visible rather than
silent.
Also moved the GitHub star prompt directly under the hero. It sat at the very
bottom of the dashboard, below the stats, the quick-create row AND the full
recents list, so it could not be seen without deliberately scrolling to the end
of a page nobody scrolls to the end of. The reasoning for putting it last — a
favour belongs below what someone came for — was half right and produced
something invisible; an aside nobody can see is not tactful, it is absent. The
concern behind it still shapes the new spot: ABOVE the hero it was louder than
the product's own welcome, so under the hero keeps the welcome first and the
favour second.
You cannot find a model by typing its name unless you also reproduce its
punctuation, and nobody remembers where the punctuation fell. `2xko` could not
find `2X-KO_more_-ill_r1` at all — reported exactly that way.
Matching now folds `-`, `_`, `.`, `/`, spaces and brackets out of BOTH sides
before comparing, in three tiers: an exact prefix still outranks a folded one,
which outranks a folded substring. So `2xko`, `2x-ko` and `2XKO` all reach
`2X-KO_more_-ill_r1`, `spritepixel` reaches `8.0-sprite pixel art style by
skormino`, and someone who typed a name exactly is never reordered beneath a
fuzzier match. Free to do here: the model list is tens of entries, not the
tag list's 286k.
Tag search is deliberately left alone — it is a bisect over a sorted array of
286,337 names and prefix-only is what every booru autocomplete does.
Sections were not delivering what I claimed for them. Tags lead, `lazy` matches
twenty of them, and the embedding section existed but sat entirely below the
fold — the user could not filter to their own models without scrolling a list
they were not looking for. The leading section is now capped to 6 rows WHEN a
model also matched, which is what actually makes the others reachable. A query
matching nothing but tags still gets the full twenty.
The LoRA and embedding settings move to the same hand-built switch as the tag
one, for the reason that control exists: a count beside the toggle. "50 LoRAs
found" answers the question a bare switch raises — is there anything for this
to suggest? — and it is the question that otherwise sends people to the manager
to check.
And the pill now reads PrimeVue's own `--p-toggleswitch-*` custom properties
for every dimension, not just its colours. Those are injected when their
component first mounts, which has always happened by the time ours renders,
because our row sits in their dialog among their switches — so at render time
this IS their pill and follows their theme. Aura's defaults remain as
fallbacks. Handle travel became a `calc()` over the same tokens rather than a
fixed 16px, so a differently-sized track still lands the knob flush.
Read off the screen recording rather than guessed at — ffmpeg frames of the
real settings dialog, which is the first time this control has been seen next
to the ones it has to sit among.
THE SWITCH WAS THE WRONG SIZE. 34x18 with a 14px knob, against PrimeVue's Aura
preset of 40x24 with a 16px handle, which is what ComfyUI renders and what the
frames measure. Beside three real toggles it read as visibly smaller and
duller.
IT WAS ALSO IN THE WRONG PLACE. The note and the switch were appended in that
order inside a flex row, so the control floated mid-row while every neighbour
sat flush against the right edge. A row that does not line up reads as broken
before it reads as ours. Note first, switch last.
AND THE KNOB TELEPORTED. `paint()` rewrote `style.cssText` on every change,
which replaces the `transition` declaration mid-flight — the browser then has
nothing to animate between. That is the visual glitch: the static styling is
now written once and only the properties that actually change are touched, so
the slide runs.
Colour and timing come from `--p-primary-color` and `--p-transition-duration`,
which ComfyUI publishes on `:root`, so both track their theme. The rest of
PrimeVue's `--p-toggleswitch-*` tokens are injected lazily when the component
first mounts and do not exist until the dialog has been opened once — so they
are read with fallbacks rather than relied on. Still not borrowing
`.p-toggleswitch` itself: those are ComfyUI's internals, and reusing them buys
a perfect match today and a control that renders as nothing the day they
restyle.
In the manager, the counts move onto the control's own row as a tinted pill
pushed to the far edge. First they were appended to the dim `hint`, where the
one fact worth reading was the least readable thing on the card; then they got
their own line, where they crowded the explanation above them. The whole badge
is tinted rather than just its dot — at 11px a dot alone is easy to miss, and
"none found" is the case that most needs noticing.
Verified live: badge on the same row as its toggle, pushed right, no overlap
with the hint, green tint, "50 found" and "17 found".
Three things from a QA pass on the restarted server.
The model counts were appended to the `hint`, which is dim by design — so the
one fact on the card worth reading was the least readable thing on it. Each
source now gets its own status line at normal text colour with the same
green/amber dot the tag card uses, so "is this usable?" reads identically on
both cards.
The tag setting kept rendering a checkbox while every other boolean in the
panel is a pill switch. It cannot be a plain `type: "boolean"` — it disables
itself when no tag list is installed, and a native boolean has no way to say
"on is not available" — so it gets a switch of its own: 34x18 pill, sliding
knob, `role="switch"`, space and enter, dimmed and non-interactive in the
disabled state.
Styled inline and namespaced rather than borrowing PrimeVue's classes. Those
are ComfyUI's internals; reusing them buys a pixel-perfect match today and a
control that silently looks like nothing the day they restyle or upgrade.
Typing a bare `<lora:` offered nothing. The endpoint refuses an empty query so
that a stray keystroke cannot dump the whole models folder into a popover —
correct for a bare word, and exactly wrong inside a reference, where the marker
IS the request and "show me what I have" is the main way these get used. The
client now sets `all=1` only when the caret is inside a reference, where the
intent is unambiguous, and the server lists the first N by name.
QA notes from the same pass, all verified against the live server:
- `/wp/api/models/*` serves: 50 loras, 17 embeddings.
- The data-folder migration ran and logged its own decision:
"left in place — wildcard-pipeline.db (already present at destination)".
The destination already held the real 1.13MB library, so the never-overwrite
rule preserved the older loose copy instead of clobbering it, and the server
resolves to the correct file. Working as designed.
- The two reported completion failures now return exactly one correct match
each: the completed `embedding:style\lazyhand-e12c.safetensors` path, and a
LoRA name carrying both spaces and dots.
- Sections render: "tags · embeddings" with per-source headers, tags first, and
no header when only one source has hits.
Both halves of the low-end-hardware note, measured first as it asked.
PROFILE. An 8-node Context chain carrying 96 variables costs 0.591ms per
refresh. That is small alone and it is not what it costs: every node walks its
WHOLE upstream chain, so a series chain — the shape people actually build — is
quadratic in total work, and nine nodes already produce a visible long task
when the refreshes are forced back to back.
Two loops were paying it forever: `reactive.ts` at 400ms per WP node, and
`subgraph-badge.ts` at 800ms per SubgraphNode, each rescanning regardless of
whether anything could have changed. Neither stopped for a hidden tab and
neither backed off.
They now share `startAdaptivePoll`, which was extracted rather than written
twice — the two had already drifted into having nothing in common but the bug.
It gates on two things that both cost nothing while the user is working:
A hidden tab does no work at all. Nobody can observe a stale widget on a tab
they are not looking at, so this was work being done precisely when it was
least useful. One catch-up refresh runs on the way back to visible, so an edit
made elsewhere is never missed.
A still canvas backs off 3x then 8x after ~4s of no pointer, key or wheel
activity AND no observed change. The fallback exists for upstream edits that
fire no event, which cannot happen while nobody is editing. Any real change or
any user activity snaps it straight back. One shared document listener feeds
every node — N listeners for a single global fact would repeat the mistake the
per-node intervals already make.
The event paths are untouched: `onConnectionsChange`, the mode intercept and
graph load all still fire instantly. Only the fallback slows, and only while
nothing is happening.
FONTS. We shipped a 48 KB Inter that ComfyUI already serves, declared
identically — same family, same `font-weight: 100 900` variable axis, same
latin woff2, same `font-display: swap` — from its main stylesheet, so it is
loaded on every page a canvas widget can appear on.
The note wanted the removal risk measured before taking this, so: added
2025-09-16 in Comfy-Org/ComfyUI_frontend 4ff18fd ("Add Inter font used by
Figma designs", #5535) and untouched since — one commit in its entire history.
It is the typeface of their whole UI, so dropping it means restyling their
product rather than removing an optional asset.
The coupling is also weaker than the note assumed. We depend on the FAMILY
NAME, not their URL: our stack names `Inter` and the browser resolves it
against whatever `Inter` face is loaded, so a rename, re-subset or re-hash is
invisible to us. Their copy lives in `public/fonts/`, which Vite serves
un-hashed exactly so URLs stay stable. And the failure mode is the one the
stack already shows on every cold load — fall through to `-apple-system`.
JetBrains Mono stays; ComfyUI ships no monospace face.
Verified live: zero requests for our Inter, their `inter-latin-normal.woff2`
loaded, `document.fonts.check("16px Inter")` true.
Three leftovers from fields that used to be `<textarea>` and became
RichTextInput in ca87384b and 8aea38dd. The markup changed; the CSS written for
the textarea stayed, still matching because the class moved onto the
component's root.
`.row__value` declared `overflow-y: auto` and `max-height` on that root, and
the component's own `.wp-rt__host` already declares both — so a capped,
scrolling box sat inside a capped, scrolling box and a fixed-values row showed
TWO vertical scrollbars. Reported in the bundle snapshot editor, but it was
every fixed-values row everywhere. `min-height`, `line-height` and
`white-space` were the same mistake without a visible symptom. Only
`word-break` survives — a long unbroken value is a row-layout concern, not an
editor one.
`.row__grip` and `.row__value-wrap--more::after` reimplemented the drag grip
and the overflow fade, which existed here only because a textarea cannot carry
either. Both now belong to RichTextInput, and the markup that used these went
with the textarea — the rules had been matching nothing since.
`.ibm__template` kept `resize: vertical`, which put the browser's native
resizer in the same corner as the component's own grip: two handles, one of
which the component cannot clamp. That is the class of bug `startResize` exists
to avoid.
Also from the same report: the SPA's template editor was a plain Textarea, so
it was the one place a PromptAssembler template could be written with no tag,
LoRA or embedding completion at all — despite templates being saved here and
loaded into the assembler. It uses RichTextInput on the `assembler` surface
now, so both ends agree on what the syntax means.
Four things, all of them the same feature being genuinely usable rather than
merely present.
The completion could not see a filename. `probeTagWord` bounds a word with the
character class `[a-zA-Z0-9_'-]`, which contains no dot and no path separator —
so a caret at the end of `embedding:style\lazyhand-e12c.safetensors` walked back
only as far as the dot and searched for `safetensors`, matching every model on
disk and nothing that was meant. Real names carry dots, separators and spaces
(`8.0-sprite pixel art style by skormino`), and no character class can bound
that.
So the new `probeModelRef` bounds by SYNTAX instead: everything between
`<lora:` or `embedding:` and the caret. Unambiguous, and it describes names a
class never could. It stops at a comma, newline or `>` so a completed reference
earlier in the prompt cannot claim a caret that has moved on, and past a LoRA's
second colon, which is a weight and not a name.
It also takes precedence over the bare word and RESTRICTS the search to the one
kind being named — a reference names exactly one by construction, so offering
the other, or offering tags, was offering something that could not legally be
inserted there. That is the "caret in the embedding, popup full of LoRAs"
report. Committing inside a reference now inserts the bare path, since the
marker is already typed.
Server side, the query is separator-normalised like the stored paths, and a
full path now ranks as a PREFIX hit — otherwise a completed reference sorted
below unrelated substring matches.
The canvas settings use plain `type: "boolean"`, which is what renders
ComfyUI's own pill toggle; the checkboxes came from the hand-built renderer.
The tag setting keeps its custom control because it DISABLES itself when no
list is installed, which no native type can express — the two model sources
have no such state, so there is nothing to express.
New opt-in setting appends `", "` after a completion. Suppressed inside a
reference, where a comma would terminate the thing being completed. Applied on
both the keyboard and mouse commit paths, because a preference that lands on
one of them is worse than not having it.
And the gap I left last time: the model sources had no SPA surface at all —
canvas settings and playground mirrors only, with nothing anywhere writing
their storage keys, so outside the canvas they could not be switched on.
`ModelSourcesCard` adds the toggles, the counts, and the Refresh that
`/wp/api/models/refresh` was built for and nothing called. `uiStore` gains the
writers; `tagSetting.ts` stays the reader, because the canvas has no Pinia.
`enabledCompletionSources` is deleted — it was referenced only by its own test.
Maintainer call after three failed rounds: drop the in-editor grip, let
ComfyUI's node corner own the height, and make the editor scroll instead of
growing to fit its content.
That is the right call and my argument against it was wrong. I rejected
`fillHost` on the grounds that the assembler has TWO widgets, so
node-drives-widget would stretch the chip strip and preview alongside the
editor. Measured, it does not — the helper carries `autoHeight`, which pins it
to its content, so every pixel of slack goes to the editor:
node 390 -> editor 70, helper 178
node 700 -> editor 168, helper 178
node 1000-> editor 273, helper 178
node 300 -> clamps to 420, editor back to 70
Shrinking works again too: 1000 -> 300 clamps at the widgets' legitimate 420
floor rather than springing back to fit the text, and the box scrolls
(scrollHeight 928 against clientHeight 98) instead of inflating the node.
The root cause of all of it was two resize authorities over one box. Each round
found and fixed a genuine defect — `autoHeight` discarding the user's height,
grip-follow mutating scroll from inside the resize flush, a lifted height cap
outliving its drag, a lost `pointerup` stranding `dragging` — and none of them
was the symptom, because arbitrating between two authorities cannot make them
agree. Removing one can.
`fillHost` also skips the content-size ResizeObserver entirely and takes the
subtree out of flow, so the template can no longer push the node at all. That
is the auto-scaling half of the report.
New `fill` prop on the editor: hides the grip, drops the 14rem cap (which
exists to bound AUTO-growth, and would otherwise cut a node the user
deliberately dragged tall), and sets `min-height: 0` on both the root and the
host. That last part is load-bearing — both are flex items, and a flex item
defaults to `min-height: auto` and refuses to shrink below its content, which
is exactly how the payload used to push the node.
The grip stays everywhere else. The SPA's modals and pages have no node corner
to drag, so there the in-editor handle is the only control there is — and the
stuck-drag fix in 25527c37 still matters for them.
`.releaserc.js` renders no commit sections (`transform: () => false`), so
this file IS the release body. Without it the release ships with only a
header and a compare link — the blank-changelog outcome that 2.13.0 hit.
Written for users rather than maintainers: what broke, what it looked
like, and which installs were affected. semantic-release clears the file
on release, so it leaves no net change on main.
`migrate()` skips everything `<= MAX(version)`, which made an integer
the entire identity of a schema. It is not, and two failures followed
from that, both silent:
1. A database migrated by a NEWER build. Every migration is already
"applied", so the runner does nothing and the caller reads a schema
it has never seen. Additive columns survive; a shape change does not.
2. A database at the SAME version but a different shape, because a
migration file changed after it had already run somewhere — a
revised migration, a hand-edited file, an abandoned branch. Version
numbers match, so nothing compared anything.
Both corrupt cumulatively: every subsequent write goes through code
whose assumptions about the row shape are wrong, and the user has no
signal until something much later fails for an unrelated-looking reason.
Migration 017 adds a nullable `checksum` column; the runner records the
sha256 of the file it actually executed. `assert_schema_compatible`
checks both failure modes and runs at the top of `migrate()`, so no
caller can forget it.
NULL is treated as "unknown", never "mismatched". Rows applied before
017 existed cannot retroactively grow a checksum, and backfilling them
from the files on disk would assert exactly the compatibility the check
exists to verify. So the version-ahead half protects every database
immediately; the divergence half protects migrations from 018 onward.
`SHIP_PATHS` omitted `locales/`, which ComfyUI reads from
`custom_nodes/<pack>/locales/<lang>/` for node display names,
descriptions and settings labels (app/custom_node_manager.py). We ship
main.json, nodeDefs.json and settings.json there.
The registry archive already included it, because `comfy node publish`
ships everything git-tracked that `.comfyignore` does not exclude. The
zip is a hand-maintained list, so the two artifacts silently disagreed
about what a complete install is. Nothing installs from the zip today,
which is the only reason this has not bitten anyone.
The omission is the symptom; two hand-maintained lists of the same thing
with nothing tying them together is the cause. `assertShipListIsTotal`
now fails the pack when a top-level tracked path is neither in
SHIP_PATHS nor explicitly listed as dev-only, so the next runtime
directory someone adds cannot go missing the same way.
Also names the missing-`zip` case: on Windows the packer reported
"exited with status null", which says nothing about `zip` not being on
PATH.
Second report, same wound, different door: Ctrl+A then Ctrl+X inside an
option value bricked the field on Firefox — typing, Backspace and even
Save and Cancel stopped responding — with `insertBefore: Child to insert
before is not a child of this node` and the `g is null` unmount cascade.
`onHostCut` already routes the deletion through `applyAtoms` so the
browser never removes the spans itself (2.13.1). But the atom list still
shrinks from N to 1, and shrinking a keyed list unmounts the surplus
`<template v-for>` Fragments. With the fragment anchors normalised away
by Firefox that teardown walks off the end of the child list, exactly as
the ref-picker path did — reached from a call site nobody had flagged.
Marking individual call sites `rebuild` was a whitelist, and the
whitelist kept missing entries: three separate crashes now, three
separate patches. Ask the DOM instead.
`hostAnchorsIntact()` counts the empty text nodes Vue uses to delimit its
Fragments — a healthy host holds exactly `2N + 2` of them, verified
against the live bundle. `isStructuralApply()` marks the applies that
add, remove or re-branch an atom, which are the only ones that touch an
anchor. When both hold, the host is replaced instead of patched, and all
thirteen `applyAtoms` call sites are covered at once.
Costs nothing on Chromium, where the anchors are never missing, and
nothing on the same-shape applies that carry ordinary typing — a test
pins that a chip settle still lands on the very same host element.
Save/Cancel and Backspace needed no separate fix; both were the dead
subtree left behind by the first throw.
Inserting a nested `@` reference took the whole editor down behind the
error boundary with `can't access property "nextSibling", e is null`,
followed by the unmount cascade (`g is null`). Firefox only.
`<template v-for>` mounts each atom inside a Fragment, and Vue delimits a
Fragment in the DOM with two EMPTY TEXT NODES. Those anchors sit inside
the contenteditable host, which the browser owns — and Firefox normalises
empty text nodes away as the user types. Chromium keeps them, which is
why this never reproduced here.
The picker-Apply path then re-keyed the atom v-for to force a clean
remount. Vue's `removeFragment` walks `nextSibling` from the start anchor
until it reaches the end anchor; with the end anchor gone the walk runs
off the last child and derefs null.
`hostDomIsStale()` could not catch it: it counts `[data-atom-index]`
ELEMENTS, and what the browser destroyed were anchors, so it reported a
healthy DOM and the re-key path was taken.
Both rebuild routes now go through the host ELEMENT swap that already
existed for the stale-DOM case. Unmounting an element vnode is a single
`hostRemove(el)` on a node that IS still attached, and its children come
down with `doRemove: false`, so no missing anchor and no detached child
el is ever touched; the new tree then mounts into an empty element with
nothing to insert before. The v-for key drops back to the plain index.
A host swap also replaces the element the ResizeObserver was watching, so
`useGrowableField.attach()` is now idempotent and RichTextInput re-attaches
on every swap — otherwise the overflow fade and grip-follow died silently
for the rest of the session on any field that had ever repaired itself.
Reported as "the resize is linked to my mouse and resizes as I move my mouse
around without holding, and can't be interrupted no matter what I do or press."
That is one state — `dragging` stuck true — and it was reachable whenever a
single `pointerup` was missed. Three things combined:
`setPointerCapture` reads like the right call and is what stranded the drag.
Capture retargets every later pointer event to the grip, INCLUDING `pointerup`.
The editor re-renders while it resizes, and a captured element that gets
replaced is detached — so the `pointerup` was delivered to a node no longer in
the tree and never bubbled to `window`. Removed: the listeners are on `window`,
which sees the events regardless of what is under the cursor, so capture bought
nothing here.
The listeners were in bubble phase, so a `stopPropagation()` anywhere between
the target and the window hid the release too. ComfyUI's node layer does exactly
that to stop the canvas panning under a widget. All three are capture phase now,
which fires before anything downstream can swallow them.
Nothing ever cleared `dragging` afterwards, which is the "can't be interrupted"
half — there was no path back to a stopped state at all. Now `pointerdown`,
`blur` and Escape all end a drag, and `onResizeMove` bails when `ev.buttons` is
0. That last one is the one that cannot be outsmarted: every pointermove reports
which buttons are down, so a move with none held means the release was lost
whatever swallowed it. It ends the state even for a cause we have not found.
Two existing tests drove a drag with a synthetic `PointerEvent` whose `buttons`
defaults to 0, which the new guard correctly reads as a release. They now pass
`buttons: 1`, which is what a held drag actually reports and what they meant to
simulate.
This is separate from bc8421fe. Those three fixes are in and correct — they
addressed the node fighting the editor over height. This is the drag never
ending, which no amount of height policy would have cured.
Two more completion sources for a bare word, each behind its own setting.
Far cheaper than the tag list: ComfyUI already enumerates both folders for its
own node combos, so there is nothing to download, cache, byte-cap or parse, and
the security surface that dominated the tag work does not exist here.
Sections rather than one ranked list, because the sources have no common
ranking key. A tag ranks by post count in the tens of thousands; a model has no
count at all — you either have the file or you do not. Any flat ordering has to
invent a comparison between "12,000 posts" and "a file on disk", and whichever
is invented, tags win on weight of numbers and the user's own models sink below
the fold. Sections also let each source cap its own rows, so 20 tags cannot
crowd out 3 matching LoRAs.
The rows stay ONE FLAT ARRAY internally even though they render grouped,
because `acActive` indexes it. Grouping the state would put the keyboard
selection in charge of two coordinates and make "skip the header" a case to
handle; flat, a header simply is not in the array and cannot be selected. The
header also only appears when more than one source has hits — with a single
group it would cost a row to say what the group already says.
A model row inserts its FULL RELATIVE PATH, not the display name. Two folders
can hold the same filename and ComfyUI resolves by path, so inserting the short
name would silently pick a different file from the one on screen. The folder is
shown as the row subtitle for the same reason.
Icons are `pi-asterisk` for lora and `pi-code` for embedding — the only two
candidates from the shortlist with zero existing uses in `src/`. That check is
the method: `pi-tags` was chosen for booru tags precisely because `pi-tag`
singular is already the fixed_values module kind.
Each source is independently switchable. Someone writing danbooru prompts may
have no LoRAs at all; someone with 200 of them may find the tag list noise.
`tagSetting.ts` generalises to answer per source, keeping its host-aware split —
the canvas reads ComfyUI's settings store, the SPA reads localStorage directly
because this is called on every keystroke probe.
The settings parity test earned its keep again: it failed the moment the two
new canvas settings existed without playground mirrors.
Sources settle independently rather than being awaited together, so the popover
is never held at the speed of the slower one — the model lookup is an
in-process list scan, the tag lookup walks a multi-megabyte index.
The new routes need a ComfyUI restart before they serve. Verified that until
then the 404s degrade silently: settings persist and read back, tag suggestions
are unaffected, nothing throws.
The previous commit only restyled the chip — box off, colour on, atom intact —
and that is not what "coloured text" means. It still behaved like an object:
one Backspace deleted the whole token, the caret could not enter it, it kept a
pointer cursor and its leading `⌘` glyph. Looking like text is not being text.
The mechanism for this already existed and I missed it. `parseForSurface` has a
per-surface COLLAPSE SET that keeps a token as literal text instead of turning
it into an atom — `wildcard` collapses `var`, `fixed_values` collapses both. The
assembler simply was not in it. Adding it there makes `$name` ordinary editable
text, which is the whole fix: caret enters it, Backspace takes one character,
no glyph, no atom.
Colour then comes from `inlineTokenHtml`, which already emits editable
`<span class="wp-rt-var">` sub-spans — it was being told to collapse `var` to
bare text. `textAtomHtml`'s always-collapse rule has a documented rationale
("the ABSENCE of a chip already signals not-committed, so an inline colour
would only compete with the settled chip palette"), and the assembler is the
one surface where it does not hold: there are no var chips there at all, so
nothing is being competed with and the colour is the only signal.
Per-variable colour rides on an inline `style` from a new `varAttrs` hook,
because `.wp-rt .wp-rt-var` already sets a colour at higher specificity than
the global `.var-N` palette classes. Unbound names keep the danger colour and
wavy underline, still only claimed where the host walked a graph.
The hand cursor was unrelated to any of this and is fixed separately: nothing
ever set a cursor on `.wp-rt__host`, so it inherited from the surrounding
chrome — on the canvas that is ComfyUI's node wrapper carrying `cursor-grab`
for dragging. A grab hand over an editable field reads as "you cannot type
here". Never visible in the SPA, which is why it survived.
`RichTextPreview` gets the same surface rule, or the same template would render
with chips read-only and without them in the editor.
`RefChip`'s `flat` prop and its test are deleted rather than left in place —
with vars collapsed to text on the only surface that used it, the whole path is
unreachable. One insert test asserted the assembler chipifies, which this makes
false by design; it now asserts the rendering that replaced it, with a sibling
case proving chipping surfaces are untouched.
Verified live: 0 chips, cursor `text`, `$quality` → `$qualit` on one Backspace,
colours unchanged from the strip.
Three defects, each independently wrong, all pushing on the same thing. Keeping
the grip rather than moving to `fillHost`: the assembler has TWO widgets, and
`fillHost` means the node's size drives the widget — with two of them sharing
the node height, dragging the corner would stretch the chip strip and preview
too. Debug gets away with it because it is the only widget on its node.
`autoHeight` was copied onto the template editor from the Context and Injector
widgets without their reason for it. Those need it because a node stuck at a
manually-set tall height breaks their collapse animation; this widget has no
collapse animation. And the flag is precisely the branch that discards a user's
height:
const userControlsHeight = !options.autoHeight && …
const rawTargetH = userControlsHeight ? Math.max(cur[1], min[1]) : min[1];
With it off, the default path already does what a template editor wants —
preserve the height the user settled on, grow only when content needs more. The
mechanism was there; the flag was switching it off.
`followGrip` now runs only while a grip is actually held, which is what its name
always implied — it exists to keep the handle under the cursor. Ungated it also
fired on content-driven growth, so typing a long enough template scrolled the
page out from under you, and it made the resize flush mutate scroll position.
That moves the element the observer is measuring: a resize handler that can
change its own input is the shape a runaway needs.
`capLifted` now re-arms on pointerup. It guards a one-time "pin the current
height, release the max-height cap" step, and leaving it set meant the release
outlived the explicit height that bounded it — `applyAtoms` replaces the host
element on a rebuild, dropping the inline height but not the flag, so the next
drag found an uncapped, unpinned box.
Both new tests confirmed to fail with their fix reverted. Still not reproduced
end to end: the harness here runs the page as a hidden tab where neither rAF nor
ResizeObserver fires, so the drag cannot be exercised. Each change stands on
inspection; which of them was the reported symptom is for a real pointer to say.
The "sometimes the highlight at the bottom of an input doesn't render" report.
Deterministic once the font is identified as the variable.
These fields are typed in `--wp-font-mono`, a bundled webfont declared
`font-display: swap`. So the first paint lays the text out in the system
fallback (Consolas / Monaco), the real face swaps in later, and the two stacks
have different metrics. `useGrowableField` measured `scrollHeight` once at
mount, via a single rAF — against type that was about to be replaced — and
nothing re-measured after the swap.
That produces exactly the reported intermittency: wrong on a cold load, correct
on a warm cache where the face is already there, and corrected by accident by
any later scroll, input or resize, since all three re-measure. Nothing in the
codebase waited on `document.fonts.ready` anywhere.
`attach()` now re-runs the overflow hint and the autosize once fonts settle.
Resolves once, no-ops when the font was already cached, and guarded for hosts
that expose no font-loading API.
Stated plainly: this is a strong hypothesis, not a confirmed reproduction. The
harness available here runs the page as a hidden tab where rAF never fires, so
the fade could not be observed either way. The mechanism is real and the fix is
correct regardless of whether it turns out to be the whole of what was seen.
Both files sat loose in ComfyUI's user directory next to ComfyUI's own. That
was fine with one of them and stopped being fine at two. One folder is also one
thing to back up and one thing to delete.
The subfolder alone would have read as data loss: every existing install has a
real library at the old path, and the extension would have come up empty while
the file sat one level up. So `engine/db/relocate.py` moves them in, once, on
first boot.
Four constraints shaped the mover:
Never overwrite. A file at the destination means either a finished migration
or something the user put there; both outrank anything we could infer, so the
legacy file is left alone and reported as skipped.
Run before the database is opened. SQLite keeps `-wal` and `-shm` sidecars
beside the main file and moving that set out from under an open connection
corrupts it. The call sits in `__init__.py` ABOVE the node imports, which can
reach the DB — placement is load-bearing, not stylistic.
Move the sidecars with it. A `-wal` holds committed transactions not yet
checkpointed into the main file, so moving the `.db` alone silently drops the
most recent writes.
Never raise. This runs at extension import; a throw would take the whole
extension down over housekeeping. Failures are collected into a report the
caller logs, and the degraded state is "keep using the old location".
`shutil.move` rather than `Path.rename` because a user directory that is a
mount or a symlink elsewhere would make rename fail with EXDEV.
`TAG_FILE_NAME` is duplicated in `relocate.py` rather than imported from
`wp_api/tags.py`: the directory contract keeps `engine/` free of ComfyUI-facing
imports, and that module pulls in aiohttp.
Five existing path assertions moved to the new location. They were asserting
the behaviour this changes, and now carry a note saying why the subfolder is
expected so nobody "fixes" them back.
The template editor and the variable strip under it disagreed about what
colour a variable is. `.wp-refchip--var` painted every var the same
`--wp-success` green; the strip ran each name through `varColorClass()` and got
eight. So `$quality` was green in the editor and blue in the strip, six pixels
apart, in one node.
Chips go, on this surface only. A border and a fill advertise "this is an
object you can act on" — true in the module editors, where clicking a ref chip
re-picks its wildcard, and false in a prompt template, which is prose you are
writing. Font size steps up to the surrounding text too: chips ran 10px inside
12px because a box has to sit within the line, and without the box a token a
size smaller than its own sentence just reads as misaligned.
Refs keep their box everywhere. A `@{uuid}` really is a clickable object with a
picker behind it.
The colour is applied inline rather than via the `.var-N` class. Those live in
`theme.css` at the same specificity as `.wp-refchip--var`, and this component's
scoped block is injected after it, so the class lost the cascade and every
token still rendered green — caught by measuring the computed style rather
than by reading the diff.
Dropping the box cost the one cue that separated a broken var from a working
one: with a chip, `$typo` still read as a chip. `resolved` cannot recover it
(for a var it is only `name.length > 0`, so a typo is "resolved"), so the state
comes from `inScope`, and only where the host actually walked a graph — in the
SPA every var is out of scope because there is no graph to be in. Unbound vars
get the danger colour and a wavy underline instead of a palette colour.
The `$` popover now takes the variable's colour rather than its module kind's,
so a row and a strip chip can be matched by looking. The glyph still carries
the kind, exactly as the strip does. `@` rows keep `kindTint` — there the kind
IS the identity of the thing being picked.
Verified live: `$quality` rgb(147,197,253), `$camera` rgb(253,186,116),
`$scene` rgb(249,168,212), identical in editor and popover, and `$typo_here`
red with a wavy underline.
Note on the preview I sent: it proposed raising the editor line-height from
1.55 to 1.75. The real value is already 1.9, so that part was wrong and is not
applied. The strip's gap and padding do move onto the `--wp-space-*` scale.
`startResize` called `setPointerCapture` before attaching its `pointermove`
and `pointerup` listeners. That call throws `NotFoundError` for any id with no
active pointer, and an uncaught throw there meant the listeners were never
attached — a grip that visibly does nothing when dragged.
Capture is only an optimisation here: it keeps move events coming when the
pointer outruns the 16px grip. The listeners are on `window` and work without
it, so a failure should cost nothing. Wrapped, and left after the listener
attach path so ordering can't matter again.
Found while trying to reproduce the reported resize bugs. Not yet confirmed to
be the cause of either — the harness available here runs the page as a hidden
tab, where `requestAnimationFrame` and `ResizeObserver` never fire, and the
whole autosize path is built on both. This fix stands on inspection regardless.
Two reports against the assembler's editor, both fixed at the source.
The suggestion popover never closed when clicking away. The dismiss listener
was bound to `mousedown` only, and litegraph drives the canvas from pointer
events and calls `preventDefault()` on `pointerdown` to suppress native
text-selection and drag — a prevented `pointerdown` also suppresses the
browser's compatibility `mousedown`, so the listener never heard the click.
On a node graph the canvas is most of the screen, which is why this read as
"it never closes". Now bound to `pointerdown` too, which fires first and
cannot be taken away downstream. `mousedown` stays as the fallback for hosts
with no PointerEvent (jsdom, older webviews); closing twice is idempotent.
Presses inside the popover still don't dismiss, so rows (which commit on
mousedown to beat the host blur) and the scrollbar keep working.
The `$` list also offered variables the assembler cannot render. It runs
`strip_internals` over the render context before resolving, so `$var` naming
a user-flagged internal variable substitutes to nothing — yet the popover
listed 52 matches, most of them `$iteration` and `*_bool` toggles. Those names
legitimately cross the socket for Combine and Derivation to read, so the fix
is not to drop them from the walker but to give the PROMPT surface its own
list: `collectUpstreamRenderableVariables`.
The internal-flag parse existed already as a private copy inside
`widgets/assembler.ts`. Extracted to `internalVarNames` and shared, because
the two surfaces on this same node have to agree about which names the prompt
will render, and they would have drifted with one copy each.
`resolveChainStatic` iterated `m.entries` with no guard and read
`e.variable_name` with no type check. A library payload that carries
`payload.values` but no `entries` mirror — which is every row installed
straight from the library, since `entries` only appears once a module has been
edited inline — threw "m.entries is not iterable".
The blast radius is the reason this matters. The walker runs inside
`onConnectionsChange` via `extension/reactive.ts`, so the throw does not
degrade to an empty preview: it escapes into litegraph's connection handling,
and one bad module takes out canvas interaction for the whole graph.
The other two `entries` readers in this file already used `?? []`; this one
was the outlier. Found while hand-writing test fixtures for the assembler
editor — hit it twice before recognising it as the code's problem rather than
the fixture's.
The template input now renders through RichTextInput, so it has the booru tag
autocomplete, `$var` chips with producer attribution, and the same editing
behaviour as every other WP text surface.
No payload transition. It is the SAME `template` widget: same name, same
position in `widgets_values`, same plain string value — only the renderer
changed. A workflow saved before this loads its template back untouched;
verified by loading a hand-written pre-change workflow JSON.
The seam is `widgetType`. The frontend picks a widget constructor with
`t.widgetType ?? t.type` while the socket keeps `t.type`, so tagging the input
spec routes the lookup to us without touching what the socket accepts. It has
to go through `extra_dict`: V3's `widget_type=` parameter would ALSO change
the socket, because `WidgetInput.get_io_type` returns widget_type when set —
the input would stop being STRING and no upstream STRING output could feed it.
`extra_dict` is merged last in `Input.as_dict` and never consulted by
`get_io_type`. The new schema test asserts both halves together, since either
one alone passes while the feature is broken.
Keeping the link input needs one more thing: ComfyUI only calls
`addInput(name, spec.type, {widget})` when the widget the factory returns has
no `socketless` flag, and `createDomWidgetHost` hardcoded `socketless: true`.
Hence the new `socketed` option — correct for every other WP widget, exactly
wrong for this one. While a link IS connected the editor goes read-only with
a placeholder saying so, matching the stock multiline widget. Derived from the
link rather than the widget's `computedDisabled`, which is recomputed lazily
during a draw and still read `true` a second after the link was removed.
Why a separate file and not `assembler.ts`: the helper widget must stay
socketless (it is an editor, not a value), and the two widgets need opposite
answers to that one question.
The helper's template mutators lose their `inputEl` branches. Those had been
dead for a while — the frontend moved widget values into a store, so the
textarea at `widget.inputEl` is detached and unrendered, and each of those
functions was really working through the `w.value` write sitting next to it.
Insert is the exception: it needs a caret, so it asks the editor through a
WeakMap hook instead of replacing the whole string.
Verified live on frontend 1.48.6 with Vue Nodes on: legacy value restores,
STRING link connects and disconnects, serialize round-trips, clear / remove /
insert all propagate, `$` autocomplete lists upstream vars with attribution,
tag autocomplete and its legend work, and a full Context → assembler chain
previews correctly.
Two changes to RichTextInput, both needed by the assembler's template editor
but neither specific to it.
The echo guard on the `modelValue` watcher compared only the string:
if (next === lastEmittedValue) return;
`lastEmittedValue` seeds from the value present at mount. Every canvas widget
mounts empty — ComfyUI restores the saved workflow value AFTER the widget is
built — so `lastEmittedValue` stays `""` until the user types, and every
later external `""` looked like the editor's own echo and was dropped. The
assembler's Clear template button is exactly that write: the widget value went
to `""` and the old template stayed on screen. The guard's real question is
"does the DOM already show this?", so ask that instead. Non-empty writes were
never affected, which is why this survived this long.
`insertTextAtCaret` is the component's first public method. The assembler's
chip strip is a SEPARATE widget on the same node, so it cannot splice into
this editor's DOM; it used to splice into the native `<textarea>` at
`widget.inputEl`, which no longer renders. Writing `widget.value` instead
works but replaces the whole string and drops the caret.
It separates on BOTH sides. Leading-only was the old textarea's behaviour and
was already subtly wrong: inserting `$mood` before `portrait` yields
`$moodportrait`, which re-parses as a variable named `moodportrait`, so the
insert quietly changed what it inserted. Caught in the browser, then pinned
with a test that drives a real jsdom Selection — the other cases exercise the
end-of-text fallback, which cannot reach the trailing branch.
Both regression tests were confirmed to fail with their fix reverted.
One slot now says both things: the glyph says "booru tag", its tint says which
category. The separate 4px colour bar goes.
`pi-tags` PLURAL is deliberate. `pi-tag` singular is already the fixed_values
module kind in KIND_ICON_MAP, so a booru tag row would have rendered
identically to a library module row. Checked every `pi-*` in the source before
choosing: `pi-sparkles` is the wildcard kind, `pi-sliders-h` the injector's
sampler, `pi-palette`/`pi-hashtag` are taken too. `pi-tags` is unused.
Neutral grey is `general`, which is most rows -- colouring every line would
make the coloured ones stop meaning anything.
Three defects caught by measuring the rendered result rather than reading the
diff: `artist` and `meta` kept `background:` because extra alignment
whitespace defeated the edit, so both fell back to inherited dim; the legend
icon lost its `pi pi-tags` classes and rendered as a coloured but glyph-less
box; and the legend swatch kept `width: 4px; height: 10px` from the bar it
replaced, squashing the icon to a sliver. Verified live: 20/20 row icons at
12px in the primeicons font, and legend glyphs at 11px in character green,
artist orange and general grey.
The canvas fixed-values row was a bare <textarea>, so booru tag autocomplete
never reached it. It is a RichTextInput now.
`$` and `@` stay off there, and that is the ENGINE's rule rather than a UI
preference. `fixed_values_handler.py` says the surface is a binding PRODUCER,
not a consumer: a fixed value DEFINES what `$name` resolves to, so `resolve_text`
gates var reads and `@{}` refs off and renders such a token as literal text
with a warning.
The frontend did not encode that. It hardcoded `surface === "wildcard"` in the
`$` gate, which made the SPA's fixed-values editor MORE permissive than the
engine -- offering `$` autocomplete for tokens the engine would never resolve,
while `parseForSurface` already collapsed those same vars to literal text. The
gate now derives from the producer/consumer split the engine defines, so both
surfaces agree and the existing SPA divergence closes with it.
No machinery was lost in the swap: RichTextInput uses the SAME
`useGrowableField` composable ValueRow did, so auto-grow, the overflow fade and
the drag grip come with it, and ValueRow's duplicate copy goes.
A Vue prop-casting trap cost two RichTextInput tests on the way, and the fix is
the interesting part. `allowVars?: boolean` is inferred as a Boolean prop, and
Vue casts an ABSENT Boolean prop to `false` rather than undefined -- so
`props.allowVars ?? <surface default>` never reached the default and EVERY
surface silently lost `$`. It is now `"auto" | "on" | "off"`, which no
prop-casting rule can quietly rewrite. Two existing tests caught it; without
them this ships as "$ autocomplete stopped working everywhere".
ValueRow's tests updated: the "is a TEXTAREA" assertion became "is multiline
and grows", which is the requirement the tag name was standing in for.
The binding modal's template was a bare <textarea>, so it had no `$`
autocomplete at all -- reported as "the $ variable autocomplete does not work
in the context injector". Nothing was broken; the machinery had simply never
been attached to that field.
The suggestion pool was already sitting next to it. `insertOptions` builds the
"+ $ref" menu from this row's own references -- a socket row can reference only
its own slot, the general row can reference every socket -- and the
autocomplete now reads the SAME list, so the menu and the popover cannot drift.
Deliberately not the library's variables: nothing in this modal can resolve
one, and offering them would suggest bindings that silently do nothing.
Surface is `assembler` because this composes a template. Explicitly not
`wildcard`, which suppresses `$` on purpose.
`insertSlotRef` no longer splices at the caret. RichTextInput is
contenteditable with atom spans, so `selectionStart` does not exist and the old
path had nothing to splice into; it appends instead. Honest about what it does,
and the menu is the fallback now that typing `$` opens the same list in place.
Tests updated rather than worked around: seven drove the field as an
HTMLTextAreaElement. The modal's own suite stubs RichTextInput in its mount
helper the way the combine editor's tests do, and the two widget-level tests
drive the component directly, since jsdom does not implement contenteditable
editing and those tests care that the value reaches the persisted JSON rather
than how the caret moved.
Managing the file meant opening a file manager, which is how the maintainer
had to remove it to test the disabled state.
Refresh re-reads the path. The server already notices an mtime change on its
own, but nothing tells the PAGE to go and look, so a file copied in by hand
stayed invisible until a reload. Both actions also drop the cached
availability the editors hold, so an open editor picks up a list that appeared
or disappeared without a reload.
Remove deletes it. Same shape as the download for the same reason: no caller
input reaches the path, and a symlink there is refused rather than followed --
otherwise this unlinks whatever it points at.
The setting I added last commit was wrong three ways, all visible in one
screenshot of the panel: filed under "2. Sizing" when it is behaviour, in a
bespoke `editing.` namespace matching none of the three the playground routes,
and absent from the Display Playground entirely.
Now `wildcardPipeline.behavior.tagAutocomplete`, under "7. Runtime behavior",
registered in the playground store's routing set and bound to a control in the
modal.
The real fix is the fourth change. `playground-store.ts` carries a comment
asking the next person to "keep this routing in sync if a new key is added",
and a comment is not a mechanism -- it is a note that gets read after the
divergence, by whoever is looking for the cause. `playground-parity.test.ts`
reads both sources and asserts, for every registered setting, that it uses a
routable namespace, that the store knows its key, and that the modal binds a
control to it. 18 settings, three checks each.
That test caught its own bug on first run: the id regex matched `id:` sites
only, and most entries reference a `SETTING_ID_*` constant, so it found exactly
one setting. The "finds them at all" assertion exists for precisely that and
fired immediately -- a parity test that silently checks nothing is worse than
no parity test, because it reports success.
Playground rows for behaviour settings have nothing to preview on the right.
It is listed anyway: the playground is where users expect the settings
mirrored, and "has no preview" is not a reason to be absent from the list.
The canvas editors were bundled and rendering-ready but the feature never
fired there. Cause: the setting was read via `useUiStore()` behind a try/catch,
and NO Pinia is installed in the canvas widget mounts at all -- so it threw,
returned false, and stayed silently off. The try/catch I added to fix 113 tests
was hiding a missing implementation rather than handling an edge case.
Each host now answers for itself. `utils/tagSetting.ts` reads ComfyUI's own
setting when `app.extensionManager.setting` exists and the persisted SPA value
otherwise, so neither host depends on the other's machinery. The two switches
are deliberately independent: wanting suggestions in the full manager does not
mean wanting them while squinting at a node on a canvas.
The ComfyUI setting is hand-rendered rather than a plain boolean so it can
DISABLE itself when no tag list is installed, saying where to get one. A
checkbox that switches on and does nothing is the exact failure this feature
keeps having to design around -- a control implying a capability it does not
have.
Scope is unchanged and worth stating: RichTextInput only ever mounts inside
this extension's own widgets, so nothing here touches ComfyUI's text widgets or
another extension's. That is a property of where the component is used, and the
obvious future "improvement" of hooking ComfyUI's generic textarea would throw
it away.
Also fixes arrow navigation. The header and legend are sticky, so they overlay
the scrollport rather than shrinking it, and `scrollIntoView({block:"nearest"})`
only knows about the scrollport -- arrowing to the first or last row parked it
under a pinned band, selected and invisible. `scroll-margin` on the rows is the
mechanism for exactly that. Verified: arrowing to the last row leaves it fully
above the legend, and back to the first leaves it clear of the header.
Two reported by the maintainer from a screenshot, both specific.
The `general` swatch rendered as nothing. Legend swatches carried only a
modifier class, and `--general` was never defined -- the row bars get their
neutral grey from the base `.wp-rt-tag__cat` rule, which the legend markup did
not use. Swatches now have their own base class and `general` is stated
explicitly rather than inherited by accident, since it is a real category and
not an absence.
A scrolling row showed through beneath the legend band. The popover root has
`padding-bottom`, and `bottom: 0` sticks the legend to the CONTENT box, leaving
that padding transparent below it. The legend is now pulled down over it with a
negative offset and matching padding.
Verified live at full scroll: no blank swatches, and no row pixels below the
legend -- the only gap left is the 1px border.
The legend was designed, described and never built -- rows shipped with a
colour bar and nothing saying what the colours meant.
It appears only when more than one category is in the CURRENT results. On an
all-general query every bar is the same neutral grey, and a legend naming four
colours none of which are on screen is a row of height explaining nothing.
Verified live: a `mik` query renders "character artist general" -- the three
kinds actually present, not the full five.
Also pins the header and the legend. `overflow-y: auto` sits on the popover
root, so everything inside scrolled together: the query you are refining
scrolled out of view as you moved down the list. That was already true of the
`$`/`@` popover and is fixed for both. Sticky rather than a flex wrapper
because the row list has no container element -- restructuring the existing
markup would have put the working sigil popover at risk for no gain. Negative
margins cancel the root's horizontal padding so the pinned bands span the full
width instead of leaving a gutter for rows to show through.
Verified in the running SPA: scrolling the list 691px leaves both the header
and the legend visible while the rows move, and a field 189px from the bottom
of the viewport flips the popover above the caret rather than overflowing the
screen, legend included.
Completes #27. Typing a word in an option value now suggests tags; `$` and `@`
are untouched.
Non-interference is structural, not coordinated. The tag mode is a third value
on the SAME `acTrigger` state, so only one popover can exist -- two independent
popovers could both open over one caret, which is the behaviour this feature
was not allowed to introduce. And it is probed only where `probeAutocomplete`
already declined the caret, so the sigil probe gets first refusal on every
keystroke. `probeTagWord` re-checks for a preceding sigil as a second lock, and
19 tests assert the two probes never both claim a caret.
Commit inserts PLAIN TEXT. `$`/`@` build chips because they carry engine
meaning; a tag is just characters in a prompt. Deliberately not a branch inside
`insertChipAtCaret` -- its defensive re-derivation scans backwards for a
`$`/`@` run, which is exactly wrong for a sigil-less word.
Rows follow the design pass: the line that gets INSERTED is always primary, so
an alias hit reads `head_tuft` with `from blue_head_tuft` beneath rather than
leading with the alias, which is not what Enter produces. The category bar
appears only when the loaded file has categories, and the legend only when the
results actually differ -- a column of identical grey bars explains nothing.
Three bugs found by QA against the real SPA, none of which any test caught:
- `useUiStore()` at setup scope threw in 113 existing tests, which mount this
component without Pinia. Every other setting arrives as a prop, so the store
dependency was the odd one out as well as the broken one; it is now resolved
lazily and degrades to "off" when Pinia is absent.
- The popover renders on `acOpen && acItems.length > 0`, and tag mode returns
no `acItems` by design, so it could never appear. Now gated on the row count
for whichever mode is active.
- The "shared" status promise was a `let` inside `<script setup>`, which
compiles into `setup()` and is therefore per-instance: 135 identical requests
on a 133-option wildcard. Moved to a real module -- measured 135 -> 1.
Verified in the running SPA: the popover opens with 20 real rows from a
286,337-entry list, Enter completes `blue_h` to `blue_hair` as plain text with
zero chips, and typing `$mood` shows no tag rows at all.
Client half of #27, minus the editor wiring. Adds the API client namespace,
the types, the persisted on/off setting, and the Settings card.
The card separates two facts that look like one: whether the user WANTS
suggestions, and whether a tag list exists to make them from. The toggle owns
the first, the status row owns the second. Conflating them produces a switch
that silently does nothing, which is why /wp/api/tags/status reports
`available` independently of the setting.
Off by default -- the feature needs a list the user has to fetch first, so
defaulting it on would advertise a capability that is not there.
Four states the card renders honestly: nothing installed, installed and on,
downloading, and a two-column file that works but cannot colour-code. The last
reports "no categories" rather than pretending, because the dropdown will
visibly differ.
The path is shown even when nothing is installed -- it is the answer to "where
do I put my own?", which is the supported alternative to downloading ours.
The card states in the UI that Download fetches from GitHub, and that it is
the only thing this extension fetches. The README says so too, but someone
deciding whether to press a button should not have to read the README first.
Follows the Updates card shape (Field + Toggle, then a status row with an
action) because it is the same interaction: tell me the state, give me the
verb. Designed against the real tokens with real rows from a 286k index, not
mock data.
The only outbound request this extension makes, and only on an explicit click
in Settings. Documented in the README under "Network access" -- a user should
be able to find out that a plugin talks to the internet without reading its
source.
ComfyUI serves its API unauthenticated, so "fetch a URL and write it to disk"
is the most abusable endpoint shape available. Each capability is therefore
removed rather than checked at the door:
- The URL is a module constant. The request body is ignored entirely, so there
is no parameter to smuggle `http://169.254.169.254/` or an internal host
through.
- Redirects are validated per hop against a fixed host list. GitHub serves
release assets via a CDN so the chain must leave github.com -- to those hosts
and nowhere else, https only.
- The destination is computed from ComfyUI's user dir plus a fixed filename, so
no caller input reaches the path. A symlink there is refused rather than
followed, so the write cannot be redirected.
- The body is size-capped while streaming. Content-Length is checked when
present but never trusted as the only guard, since it is whatever the server
chose to say.
- A single-flight lock means repeat triggering gets "already running" instead
of N concurrent multi-megabyte fetches.
- The payload is parsed BEFORE it replaces anything, then moved atomically. A
response that is not a readable tag list leaves the existing one intact, and
an interrupted download cannot leave a half-written file in place.
- No proxy or cookie handler on the opener: one public asset, no ambient
credentials.
21 tests, one per removed capability, because a comment claiming a capability
is absent is worth nothing on its own. Includes the metadata-address and
suffix-confusion hosts (`github.com.evil.example.com`), a Content-Length that
lies about a body over the cap, and a symlinked destination.
What is deliberately not claimed: this does not defend against a compromise of
our own release. It is a tag list, parsed into strings and never executed, so
the worst a bad file achieves is bad suggestions.
Data source for the optional value autocomplete (#27). Replaces the
community script this started from, which walked all 1000 allowed pages and
kept only `name,post_count`.
Three changes, each from something measured against the live API on
2026-08-06.
A post-count floor instead of a page count. `search[order]=count` sorts
strictly descending ACROSS pages:
page 1: first 8,244,950 last 55,918
page 100: first 68 last 67
page 800: first 1 last 1
so a popular tag cannot hide on a later page and stopping early provably
loses nothing. Walking to page 1000 spends ~900 requests and a quarter of an
hour collecting single-post tags. The default floor of 20 lands near what
other extensions ship.
Aliases, from the separate `tag_aliases.json` endpoint. `tags.json` carries
none, and aliases are what let someone type `hires` and land on `highres` --
demonstrably the most valuable field after the names.
Category is kept. The API returns it and the old script discarded it; it is
what lets the UI tell an artist tag from a character tag.
Also retries with backoff rather than aborting on the first non-200, which
over a 100-request run means one blip no longer discards everything.
The User-Agent is pinned to bare `product/version` and must stay that way --
Danbooru's bot filter 403s a bare token, a longer description, or anything
containing a URL. Adding a contact URL is the usual courtesy for a scraper and
is exactly what breaks it, so the reasoning is recorded next to the constant.
MANUAL ONLY. The list describes Danbooru, not this project, and goes stale
slowly: a two-year-old file still autocompletes correctly because staleness
moves post counts and therefore ranking, while tag names barely change. That
is not an argument for a timer against someone else's API. Output goes to a
fixed non-semver `tag-list` tag, replaced in place, so the download URL is
stable and the SPA can hardcode it -- and so semantic-release ignores it.
Server half of the optional value autocomplete (#27). No UI yet.
The tag list is a file the user supplies at one path we own, under ComfyUI's
user dir -- not the package folder, which a reinstall replaces and the asset
pruner walks. Reading other extensions' tag files was considered and rejected:
it couples us to layouts they are free to change. Our own CI workflow will
generate the list instead.
Bundling was never viable regardless -- a usable list is 2-6 MB against a
420 KB gzipped budget -- and the file is not sent to the browser either.
Prefix search runs here and the client gets ~20 rows per keystroke, which is
the drift-poll lesson applied before making the mistake rather than after.
Both shapes in the wild are accepted:
name,post_count ComfyUI-Custom-Scripts
name,category,post_count,"aliases" Danbooru API export
with no header to switch on, so they are told apart by magnitude: a category
is a small enum, a post count is not.
Built on the FIRST SUGGEST REQUEST, never at plugin import. Benchmarked on a
real 286,337-entry file: 785 ms to load, 5-950 us to query. Paying that at
startup would slow every ComfyUI launch for a feature most users leave off --
the exact problem this cycle just finished fixing.
Two defects the benchmark caught, both alias-related:
- `1girl` matched both itself and the alias `1girls`, which resolves back to
`1girl`, so the same row rendered twice. Results are now deduplicated by the
tag that would actually be inserted, and a direct hit beats an alias hit for
the same canonical.
- An alias match displayed only its canonical, so `ka` returned `pokemon` with
nothing to explain it. The response now carries `matched` alongside `name`
so the UI can render `kalos -> pokemon`.
Prefix-only by design. Substring matching over 200k tags buries the wanted tag,
and every booru autocomplete users already know behaves this way.
Also exposes `comfyui_user_dir()` from engine.db.connection -- the detector
chain already existed there but only as private helpers behind the DB path,
and reaching across modules for underscore names to find it was the wrong
shape.
Investigating slow ComfyUI page loads on a real install turned up this
project as the single largest contributor, by a wide margin.
js/ 518 files 36.0 MB 179 stale chunk copies
web/ 1256 files 22.0 MB 1120 stale chunk copies
ComfyUI fetches EVERY *.js under WEB_DIRECTORY at page load, so that install
requested 237 of our chunks where 58 were live: 9.9 MB, 42% of all extension
bytes on the page and 27% of all extension requests. Twelve copies of `about`,
nine of `ContextWidget`.
Two independent causes, both ours.
Chunks are content-hashed, so every release emits new filenames, and Manager
installs an update by extracting over the installed folder without deleting
what the new version dropped. Each mechanism is reasonable alone. Together
they never remove anything. It stayed invisible for a dozen releases because
`emptyOutDir` wipes the output directory on every local build -- only installs
that UPDATE accumulate, and a maintainer never sees one.
And `sourcemap: "hidden"` still WRITES every .map, omitting only the
`sourceMappingURL` comment, so 22.5 MB of maps shipped that no browser had
ever requested. `pack-release.mjs` excluded them from the GitHub zip, but the
registry package comes from pyproject's `includes = ["js", "web"]`, which has
no exclusion -- so the fix has to be not emitting them.
Now: each build writes `.wp-assets.json` listing what it produced, and the
plugin prunes anything hashed and unlisted at import, before ComfyUI scans
WEB_DIRECTORY. Self-healing -- existing installs clean themselves on the next
start with no user action.
Deliberately conservative, because deleting a live file breaks an install
while missing a stale one only costs disk: no manifest, an empty manifest or a
corrupt one all mean do nothing; only bundler-shaped names are candidates
(hashed chunks, plus any .map -- the entry map is unhashed, which the hash
pattern alone walked straight past); every failure is swallowed.
Verified against a copy of the real install, updated the way Manager would:
1,881 files -> 302, 60 MB -> 10.9 MB, 1,579 removed. All 551 relative module
imports across the surviving chunks still resolve, and every asset
`web/index.html` references is intact.
The constraint and derivation filters inherited the fixed-values threshold of
"more than 8 rows" unexamined, and it hid the feature outright. Measured
against a real library: 53 derivations with at most 3 rules, 21 constraints
with at most 2 exceptions. Nobody would ever have seen either filter.
Rules now appear above 2, exceptions above 5. Not merely to make them visible
-- a derivation rule is a whole card rather than a table row, so three of them
already scroll, while a fixed-value row is short enough that eight fit.
The prop's doc comment now says thresholds are the caller's call, sized from
how tall that surface's rows are, so the next surface does not inherit 8 by
accident too.
Reported by the maintainer: the editor accepted the same source/target
combination more than once with contradictory modes and factors. Only one ever
applied. `combine_constraint_factor` files exceptions into a dict keyed by the
pair, so the last one in the list wins and every earlier one is discarded.
Verified against the pure math, and the alarming direction is real:
[boost x3, reduce x0.5] -> 0.5 not the combined 1.5
[reduce x0.5, boost x3] -> 3.0 order decides the result
[boost x3, exclude] -> EXCLUDE
[exclude, boost x3] -> 3.0 the exclusion is thrown away
That last line contradicts the documented model in CLAUDE.md, which says
constraints combine "with `exclude` (factor 0) absorbing". Within duplicate
exceptions it neither combines nor absorbs, and the deciding factor is list
position -- which no surface displays and nothing lets you edit.
Enforced at the AUTHORING boundary, not in `validate_payload`. `resolve` calls
that on every graph run, so a rule there would turn an already-stored payload
into a hard failure mid-execution -- strictly worse than the silent
misbehaviour it replaces, and unreachable for a user who cannot open the editor
without the graph running. Handlers may now expose an optional
`validate_authoring`, called by the module create/update paths and by bundle
child validation; existing rows stay executable.
Engine math is deliberately unchanged. Making duplicates combine would have
been defensible -- it is what the docs describe -- but it silently alters
re-weighting for anyone who already has them, and "you cannot create this
anymore" achieves the same end without touching anyone's output.
Scanned the maintainer's library first: 21 constraints, 0 duplicate pairs, so
nothing existing is affected either way.
`_startup_id_middleware` is registered on ComfyUI's application, not on a
sub-app, and had no path check despite a docstring claiming it tagged
"/wp/api/*". It therefore stamped X-WP-Startup-Id on every response the whole
server sent: ComfyUI's index, /api/extensions, image outputs, other
extensions' routes. Found by a remote probe during the 2026-08-06 session --
`GET /` came back carrying it.
Nothing depended on the wider scope. The only consumer is
manager/api/client.ts, which talks exclusively to /wp/api/*.
Same principle CLAUDE.md's extension-isolation section applies to CSS
selectors and litegraph node properties, extended to response headers: being a
guest in someone else's application means not writing on their responses.
`drift-store.ts` polls /wp/api/modules/hashes and /wp/api/bundles/hashes every
5 seconds. Both the SPA and the in-graph WP_Context subscribe, so a ComfyUI tab
with a Context node on the graph polls these whether or not the manager is ever
opened.
Measured against a live 2.13.1 install on 2026-08-06: 33,008 bytes per poll, no
ETag, no Cache-Control, no Last-Modified, and 0 of 39 observed requests served
from cache. That is ~24 MB/hour per open tab on an idle page. Invisible on
localhost; over Tailscale it was the largest thing this extension does.
Producing it was not cheap either, despite the docstring's "lightweight ...
without measurable cost" -- that described the response, not the work.
`ModuleRepository.list()` is `SELECT *` plus a json.loads of every payload in
the library, and the handler kept three fields per row and discarded the rest.
Two changes:
- Conditional responses. `json_ok_revalidated` emits an ETag plus
`Cache-Control: no-cache` -- store it, but revalidate -- and returns a bodied
304 when `If-None-Match` matches. Nothing changes for the client: the browser
serves the cached body as a 200, so `fetch().then(r => r.json())` is
untouched and the saving is entirely on the wire.
- A cheap stamp behind the ETag. `library_stamp()` is
COUNT/SUM(version)/MAX(updated_at) -- one aggregate row, no payloads. The
expensive map is built only when the stamp moves, which is the whole point:
computing an ETag from the response body would have done all the work anyway
and then thrown it away.
Also narrows the map builders. `list_hash_rows` selects the columns the drift
map needs instead of every column via `_row_to_module`/`_row_to_bundle`, which
parse `tags` (and `children`, for bundles) per row for a map that wants
neither. Bundles get the bigger win -- `payload_hash` is a stored column there,
so that path now parses nothing at all. Modules still parse `payload` because
their hash is computed rather than stored; removing that needs a schema
migration, and the stamp makes it moot in the steady state.
Stamp precision, both directions verified: `set_community_origin` writes
without a version bump and cannot change the map, so the ETag correctly holds.
A favourite toggle goes through `update()`, whose single statement always does
`version = version + 1`, so it does move the ETag and costs one refetch of an
identical map. Accepted rather than fixed -- a rare user action against a second
counter tracking payload-affecting columns only -- and pinned by a test that
says so, and says a future failure would be an improvement.
Same bug as fa9cde05 fixed in the three simpler editors, carried
independently here because this editor predates `useBulkSelection` and was
never migrated onto it. `selectableOptions` was the full option list while the
table rendered `visibleOptionRows`, so select-all reached rows the filter was
hiding.
Worse blast radius than the fixed-values case. Bulk actions here are delete,
set-weight, and tag add/remove. Delete at least changes the row count;
`setWeightSelected` rewrote every weight in the list with no visible signal at
all, and a hand-tuned distribution has no undo.
`toggleSelectAll` now adds or removes only the visible ids, matching the
composable's semantics: a selection survives the user retyping the filter, and
`selectedCount` still reports the honest total.
Also migrates FixedEditor onto ui/ListFilter (the follow-up fa9cde05 deferred)
and drops the ~50 lines of markup and CSS it duplicated. `test-prefix="fv"`
keeps its data-test hooks byte-identical, so its tests are unchanged.
Two layout fixes found by QA, not by tests:
- ListFilter had no flex growth, so it never claimed the card header's slack
the way the fixed-values filter it was extracted from did. Ported the
`flex: 1000 1 auto` and its rationale.
- `.wp-card__header` could not wrap, so a crowded header shaved its flexible
child instead. The derivation card has four buttons and squeezed the filter
input to 18px in a narrow window. The header now wraps and the filter has a
220px floor; measured 18px -> 194px, with every other card header on the
page unchanged at 42-50px and nothing overflowing.
Verified on a 133-option wildcard: filtering to 20 and selecting all reports
20, not 133; clearing the filter keeps those 20; selecting all under a second
filter adds 15 more; deselecting under that filter returns to 20 with the
first selection intact.
The wildcard and fixed-values editors grew a filter; these two never did,
which had it backwards. A constraint's exception list is routinely longer
than the wildcard it filters, and a rule card is tall enough that a dozen
rules is already a scroll.
Extracted `ui/ListFilter.vue` rather than copy the fixed-values markup a
third time, and `utils/listFilter.ts` for the two haystack builders, since
"what does this row match on?" is the part worth testing and mounting an
editor to assert it would test the wiring instead.
Both surfaces match on what the row READS AS, not what it stores. An
exception matches its resolved source/target labels -- the stored values are
frequently `@{uuid}` tokens and nobody searches for a uuid they cannot see.
A rule matches every variable, operator, mode and literal across its branches
and its else, but never its generated id.
Rows carry their ORIGINAL index through the filter. Both editors address rows
by position (`removeRule(idx)`, `exceptions.value[idx]`), so a plain filtered
array would edit and delete the wrong row, and the rule cards would renumber
under a filter and claim Rule 5 is Rule 1.
Also fixes a pre-existing destructive bug in the fixed-values editor, found
while porting the pattern: `useBulkSelection` scoped select-all to every row,
not the visible ones. Filtering 40 values to 3 and hitting the header checkbox
selected all 40, and the delete that usually follows removed 37 rows the user
never saw. It takes an optional second getter for the visible ids; toggleAll
and the header state now read that, while count and selectedIds stay global so
a selection survives the user retyping the filter.
Verified against a running ComfyUI on temporary modules, since nothing in the
library was long enough to trigger either filter: filtering 8 rules to 1 keeps
its card labelled Rule 5, select-all under that filter reports 1 selected
rather than 8, and deleting a filtered exception removes that row -- confirmed
by the surviving rows' mode sequence, not by row text. The temporary modules
were deleted afterwards.
Vite library mode ignores `build.assetsInlineLimit` and inlines every asset
unconditionally, so both woff2 files were base64'd into a chunk: 88,660 bytes
of font became a 118,896-byte JS file, awaited in main.ts's top-level
`Promise.all` and therefore parsed as JavaScript before ComfyUI could finish
registering the nodes.
fonts.ts believed the opposite -- its comment claimed `new URL(path,
import.meta.url)` kept the woff2 as separate assets. That transform is exactly
what Vite intercepts in lib mode, so the intent never held.
The fonts now leave the module graph entirely. `src/assets/fonts/wp-fonts.css`
is a real source file copied verbatim to `js/assets/fonts/` by copy-fonts.mjs;
fonts.ts <link>s it at a URL resolved against its own chunk, and the browser
resolves each woff2 relative to the stylesheet. No path arithmetic in JS, and
a renamed install directory still works.
The href is assembled from array parts on purpose: Vite's asset transform fires
on `new URL(<string literal>, import.meta.url)`, so a literal here would
silently re-inline the stylesheet with no build error and no failing test.
Measured with the gate's own method: 492,407 -> 403,055 bytes gzipped. Total
bytes on a cold cache are about unchanged -- gzip recovers base64's overhead --
so the win is latency and caching, not payload: registration no longer waits,
90 KB left the JS parse path, and the fonts stop being re-downloaded on every
release when the enclosing chunk's hash changes.
TOTAL_LIMIT tightened 490 -> 420 KB. Re-inlining costs ~90 KB, which fits under
490 KB and would have regressed unnoticed; it does not fit under 420 KB.
Verified against a running ComfyUI: the stylesheet and both woff2 serve 200 and
are fetched as fonts, and document.fonts.check() passes for JetBrains Mono,
which only this stylesheet provides.
The registry publish for 2.13.0 failed:
400 {"message":"The node version already exists"}
The empty 2.13.0 cut earlier today was deleted from the registry, but
deleting frees the LISTING, not the number — version records are
immutable there, the same model as PyPI and npm, and the publisher
requires each new version to be greater than every existing one. So
2.13.0 can never be published again, whatever it now contains.
The consequence is worse than an untidy version history: 2.13.0 carries
the `pending_move` containment fix, it reached GitHub, and it did NOT
reach anyone installing through ComfyUI Manager. Those users are still on
2.12.0 with the unauthenticated file copy/move reachable.
Restores the 2.13.0 notes so this release ships with them rather than the
empty body an emptied `next.md` would produce, plus a line for people
already on 2.13.0 saying the two are the same build.
The page rendered only the newest release, so updating across two
versions meant the middle one's notes were unreachable. That is not
hypothetical: 2.12.0 — the largest release in months — was current for
about an hour before 2.13.0 replaced it, so anyone updating from 2.11.0
would never have seen it.
The last three releases now appear beneath the current one, collapsed,
each with its own notes and a link to its release page. Three because the
gap is small but real; more and the page becomes a changelog, which the
compare link already does better.
Fetched through the same throttle and rate-limit lockout as the update
check — a second GitHub call on a shared 60/hr anonymous quota, on a page
someone may open repeatedly, is exactly what the caching work existed to
prevent. Cached under its own key with the same TTL, and skipped
entirely while a lockout is in force.
Also fixes the "All releases" button, which preferred the current
release's own URL and so went to a single release whenever the release
check had resolved — the common case. It now goes to the releases index,
which is what it says.
`PUT /wp/api/database/config` accepted `pending_move.from` and `.to` as
any absolute paths. `execute_pending_move` then runs `shutil.copy2` or
`shutil.move` on them at plugin load, as whoever runs ComfyUI. Every
ComfyUI route is unauthenticated by default, so anyone able to reach the
port could schedule:
* an arbitrary file read — copy a target into `web/`, which this plugin
serves at `/wp/<path>`, turning our own static server into the
exfiltration channel;
* an arbitrary overwrite or deletion — move any file anywhere.
Fixed with an allowlist rather than a sanitiser. The database can
legitimately live in exactly three server-computed locations under one
fixed filename, so there is no reason to accept a client-supplied path.
The live path is also allowed, since WP_DB_PATH / COMFYUI_USER_DIR can
place the file elsewhere and those users must still be able to migrate
off it.
Both paths are `resolve()`d before the membership test, so neither `..`
nor a symlink planted at an allowed location can smuggle a different
target past it, and the resolved values are what get stored — what
executes is what was validated.
`spa.py` already did this correctly (`resolve()` + `relative_to()` + 403);
this route simply missed the pattern.
Adds 7 containment tests covering arbitrary source, arbitrary
destination, the exfiltration-into-`web/` chain, traversal, and a no-op
move — plus one asserting a legitimate relocation still works, since a
guard that breaks the feature it protects is its own bug.
2.13.0 shipped as an empty release. Three commits touching only
`scripts/` and `.github/` were typed `feat(announce)` and
`fix(announce)`; both are release-triggering, so semantic-release did
exactly what it was told, and every user on 2.12.0 was offered an update
with a blank changelog.
The discipline fix — remember to type tooling commits `ci:` — had already
failed once within an hour of the rule being written down, so this is the
structural one. `paths-ignore` means those paths cannot cut a release
whatever the commit type says.
Neither path is part of what a user installs: `scripts/` is dev tooling,
`.github/` is CI. GitHub skips the run only when EVERY changed file
matches, so a push touching shipped code alongside a workflow still
releases normally.
`docs/**` is deliberately excluded from the list: `docs(readme)` is
configured to bump a patch, and `docs/release-notes/next.md` IS the
release body.
publish.yml needs no change — it fires on a published release, so no
release means no registry publish.
2.13.0 shipped nothing. It was cut because `feat(announce)` and
`fix(announce)` are release-triggering types, but those commits only
touched `scripts/` and `.github/` — dev tooling that is not part of what
users install. They should have been `ci:`, which is `release: false`.
The result was a version bump with an empty body: every user on 2.12.0
would have seen an update prompt with a blank changelog.
Release and tag are deleted; this restores package.json, pyproject.toml
and CHANGELOG.md to 2.12.0.
`[skip ci]` is load-bearing. Without it this push runs release.yml, which
would analyse the same commits against the now-latest tag v2.12.0 and cut
2.13.0 straight back.
Note that 2.13.0 will be used again by the next REAL release: the
`feat(announce)` commits stay in history and still count toward the bump.
That is the intended outcome — the number is reused for a release that
actually contains something, rather than being burned on an empty one.
Unset and empty were already safe. A MALFORMED id was not: any truthy
string went straight into `<@&…>`, so a stray space in the secret produced
a literal `<@& >` and a pasted mention produced `<@&<@&123>>` — visible
junk at the top of the most public message the project sends.
`normalizeRoleId` is now the single decision point, applied inside
`buildPayload` rather than at the call site so every caller gets the same
guarantee. It trims, unwraps a pasted `<@&123>`, and requires a 17-20
digit snowflake. Anything else is rejected rather than guessed at: a ping
that silently does not happen is a far smaller problem than a broken one
that does.
`allowed_mentions.roles` is derived from the same normalised value, so
the two can never disagree — a content string naming a role the payload
does not permit would be a mention that renders but never notifies.
The CLI warns when a non-empty id was supplied and rejected. Dropping it
silently would leave someone wondering why the ping never fired.
One webhook meant the choice was all-or-nothing: either every release
announced itself to everyone, or nothing was automated. Two channels,
deliberately asymmetric:
staff posts AUTOMATICALLY on every release
public ONLY from a deliberate manual dispatch
The staff copy carries a link back to this workflow with the inputs
spelled out. That is what makes it a review step rather than a duplicate
feed: the post being read IS the post that will go out, and the button to
send it is attached to it. Otherwise "now go publish it" is a separate
instruction living in someone's head.
The public copy does not get that field — an announcement should not tell
its readers how to re-send it. Returned as `undefined` rather than an
empty array, since an empty field block renders as dead space.
Guarded twice. The workflow only passes `--channel public` on a manual
dispatch, AND the script refuses public when `GITHUB_EVENT_NAME=release`.
One of those is enough; both are cheap, and the failure mode is
announcing to everyone with nobody having read it.
Only the public post pings the role. A ping in the staff channel on every
release is noise in a room that exists to watch releases.
`DISCORD_WEBHOOK_STAFF` / `DISCORD_WEBHOOK_PUBLIC`, with the existing
`DISCORD_WEBHOOK_URL` kept as a staff fallback so the current
single-webhook setup keeps working untouched.
v2.12.0 went out as "Captain Hook" with a placeholder avatar — a webhook
posts under whatever name and image it was created with, and Discord's
default is a generic pair.
`username` and `avatar_url` override that per message, so the identity
lives in the payload rather than in a webhook's settings. It then stays
right if the webhook is ever rotated or recreated, and it is the same in
every channel the automation posts to.
Avatar is the 512px manifest icon, fetched from raw.githubusercontent by
Discord server-side. It has to be raster — an SVG will not render, which
rules out the repo's favicon.svg, and that failure mode is silent. Pinned
to `main` rather than a tag so replacing the logo needs no code change.
`DISCORD_USERNAME` / `DISCORD_AVATAR_URL` override both. An empty value
falls through to the defaults rather than blanking the identity and
handing the post back to the webhook's name.
The dry run now prints both, since identity is invisible in the embed
body and is exactly what was wrong the first time.
The v2.12.0 announcement failed before it ran a line of script:
Unable to locate executable file: pnpm
`actions/setup-node` sniffs the lockfile, sees pnpm, and tries to prime
its cache — but this job never installs pnpm. It does not need to: the
announce script has no dependencies at all, just plain ESM and the global
fetch built into Node 18+. Nothing is installed, so there is nothing to
cache.
Caught only in the real run because the failure is in the runner's
toolchain setup, not in anything a local invocation of the script
exercises.
`FrameChips.vue` imported `theme.css` into its scoped style. The sheet
declares its tokens on `:root`, so one copy anywhere in the document
serves everything — and this component only ever renders inside
ContextLoopWidget or SeedListWidget, both of which already import it.
Being a shared component, its chunk then carried the whole 521-line sheet
a third time. Removed, with literal fallbacks added to the two
declarations that lacked them so the component still renders if it is
ever used somewhere unthemed.
The gzip win is small (~0.3 KB) because the chunk it lands in already
contained the sheet via SeedListModal, and gzip dedupes the repetition
well. Worth doing anyway: the duplication would start costing real bytes
the moment these modules split into different chunks.
Note for anyone reading the bundle report on this PR: `FrameChips.js` is
listed as a new 10.70 KB chunk and `SeedListModal.js` as removed at
8.33 KB. That is one chunk being RENAMED, not 10.70 KB of new code —
Rollup names a shared chunk after one of its modules, and adding
FrameChips to the chunk that already held SeedListModal and SeedLockRow
changed which name it picked. Real new weight is closer to 2 KB.
Brings in the 2.11.0 release commit. Only conflict was
docs/release-notes/next.md: main cleared it when 2.11.0 shipped, this
branch holds the unreleased v2.12 notes. Kept ours — clearing it would
ship a release with an empty body.
Ten commits landed after `next.md` was written and none of them were in it.
Anything left out of that file simply does not ship in the notes.
No new highlights. The cap is 4-5 and it was already at 5 — per the file's
own rule, if a sixth feels essential something else was not a highlight.
Per-frame lock and bypass is a shortcut to something the seeds dialog
already did, so it goes in the tail rather than displacing anything.
Tail gains six entries in two new groups: the frame chips and collapsible
grid on the Loop and Seed List, the broken-reference fix, the what's-new
page, and the update check that was burning GitHub's hourly allowance.
Count corrected 20 → 26, which the update dialog computes independently
from the same bullets.
Also fixes a real bug in the announcement transform, caught by previewing
it against this file: `splitBody` stripped `<details>` BEFORE counting the
tail. The "Also in this release" bullets live inside that block, so it
counted nothing real — while the authoring guidance in the trailing HTML
comment contributed bullets of its own. A 26-change release announced
itself as 3. Comments are stripped, details are not.
README gets the Nodes 2.0 line. Renderer support is a compatibility fact
people check before installing, it was the single largest piece of work in
this release, and the README did not mention it anywhere. The "switching
between them with a workflow already open" clause is deliberate: that is
what repeatedly broke and is now specifically handled.
Announcements were written by hand, which is why they went out "only once
a few versions" -- the cost was never posting, it was composing a second
piece of prose about a release that had already been written up once.
Nothing new has to be written. `docs/release-notes/next.md` is already
curated by hand per release and already IS the GitHub release body, so
the announcement is a transform of it rather than a fresh document.
`scripts/lib/discord-notes.mjs` handles the gaps between GitHub markdown
and Discord, which are specific rather than general:
- masked links render ONLY inside an embed, so the notes go in an embed
and the message content stays a bare ping
- there are no tables; rows become bullets
- <details> shows as raw tags
- headings render, but an embed `##` outsizes the embed title above it,
so headings become bold
- the description caps at 4096, and truncation cuts at a bullet
boundary -- a hard slice can land inside a link and render as broken
markup, which is worse than saying less
It cuts at the same `<!-- /modal -->` marker the in-app update dialog
uses, for the same reason: an announcement is an interruption. The tail
is counted rather than dropped, so a three-bullet post over a forty-change
release does not read as a quiet week.
`allowed_mentions` is always explicit. Release notes are not written with
`@everyone` in mind and a webhook will happily resolve one that slipped
in; only a configured role id can ping.
Two entry points. `release: published` posts automatically. A manual
`workflow_dispatch` takes `--since <tag>` and rolls several releases into
one post -- the catch-up case that actually happens -- and defaults to a
dry run so a manual trigger cannot surprise anyone. Dry run is also the
CLI default: `pnpm announce --version v2.11.0` prints and posts nothing.
Kept as a separate workflow from release.yml on purpose: a Discord
outage, a rotated webhook or a rate limit must never fail a release that
has already shipped.
Also widens the vitest include to `scripts/**/*.test.mjs`. A broken
announcement transform is otherwise only noticed after it has been
posted.
The broken-ref card told every surface to "click the chip to point it at
another module". Only `RichTextInput` listens for `remap`.
`RichTextPreview` renders the same chips read-only, and the canvas
derivation modal's summary column is a preview -- so on the surface where
the card was most likely to be read, the one instruction it gave did
nothing.
`remappable` is now an explicit prop, set by the editable input alone.
Read-only surfaces point at the SPA editor instead, which is where the
value can actually be repointed. It defaults to false because a caller
that forgets the prop is precisely the caller with no handler wired:
promising nothing is the safe direction.
Nothing shipped stale -- `web/` is a gitignored local build artifact --
but it is worth recording that a change under `src/manager/` is invisible
in the running SPA until `pnpm build:manager`, and the pre-commit hook
only builds the extension (for the size gate). Touch the SPA, rebuild it
before judging what you see.
A ref to a module deleted from the library went on looking fine: right
name, right colour, resolved-ref glyph, and a hover card quoting the
option count the module had BEFORE it was deleted. The node badge said
BROKEN REF while the chip inside the modal disagreed -- the two read
different sources, and only one of them was right.
ROOT CAUSE. When the server confirms a uuid is gone -- a 404, or a 200
that omits it -- `fetchBundle` stamped a permanent tombstone but left the
cached snapshot in place, so `lookup()` kept answering from it and no
consumer ever learned the ref had broken. The rule it was following
("keep the stale value so a label never flickers back to a raw uuid") is
right for a TRANSIENT failure, where the old value is our best guess at
the current one. Once the server says the module is gone, the old value
is not a guess, it is a false statement. Confirmed-missing uuids now
evict; transient ones still keep their snapshot. `lookup` also refuses a
permanently-tombstoned uuid outright, so the fact beats any cache entry
whatever wrote it.
`atomIsResolved` already documented exactly this case -- "a ref pointing
at a deleted library entry should still render unresolved (red chip) even
when the cached label survives" -- and was correct; it just asked a
`lookup` that was lying to it.
THE CHIP. Two more places assumed a resolved ref. `optionStats` counted
from whatever snapshot was cached regardless, and outranks the broken
branch in the template, so a gone module reported "2 options" and hid the
explanation. `poolLabel` printed "pool: library" because that is
`resolvePoolFor`'s fallback for an unknown uuid -- a fallback, not a
finding -- which put "not in the library" and "pool: library" in the same
card. Both now return null for an unresolved ref.
The broken chip keeps the name rather than collapsing to a bare "?": the
`@{uuid#name}` syntax preserves what the target was called when the
reference was written, so it renders as a red `? test` and the hover
names the missing module, says it is not in the library, and says
clicking will remap it. Phrased as "was", since a name we can no longer
verify is exactly what the old card was wrong about.
The toggle reset to open on every reload, which made it close to
pointless: someone who collapses a 100-frame grid to get their node back
wants it collapsed tomorrow too.
State lives on `node.properties.wp_frame_chips_collapsed`. That is the
workflow-JSON serialization root, and the only place per-node UI state
survives a save -- a WeakMap would be lost on reload, which is exactly
what we are fixing. Key is `wp_`-prefixed per the extension-isolation
convention.
`FrameChips` takes it as a `defineModel`, so it stays usable standalone
(local fallback) while the widget glue owns the value in the app. The
glue keeps a ref as the render source of truth and writes through to
properties, so a toggle repaints immediately instead of waiting on a
poll.
The re-sync in `onValueRestored` is load-bearing: `create()` runs BEFORE
ComfyUI applies a workflow's saved properties, so the first read always
sees nothing. Without it a collapsed grid would come back open and the
persistence would look broken in precisely the case it exists for.
The collapsed header keeps reporting `N locked · N bypassed`. That
mattered when collapse was per-session; it matters more now that the grid
can stay hidden indefinitely, because a forgotten lock is a confusing run
with no visible cause.
The chips are the inline view of what the per-iteration seeds modal
lists, so sitting above its button made them read as an unrelated
section. Below it they read as its expansion, and the two nodes now
agree: the Context Loop already ordered them this way.
Extracts the Loop's per-frame chips into a shared `FrameChips` component
and gives WP_SeedList the same surface, because the two nodes were
already showing the same information through different code.
CLICK SEMANTICS DIFFER ON PURPOSE. The Loop has an edit cursor, so a
plain click selects the frame to edit and the state toggles need
modifiers. The Seed List has no cursor and nothing else a chip could do,
so a plain click toggles the lock directly -- making someone hold Shift
for the only available action would be ceremony.
Bypass is asymmetric for the same kind of reason. The Loop OWNS its
bypass set, so Alt-click toggles it. The Seed List only MIRRORS the
bypass of the loop wired into its `loop_config`, so its chips show the
state and refuse to change it: editing there would mean writing to a
different node. Alt-click is inert rather than absent, and the tooltip
names where the setting actually lives, so a click that does nothing does
not read as a bug.
Both nodes now show locked frames too. That state existed and was only
visible inside the modal, which defeats the point of reading it off the
node.
COLLAPSE + BOUNDED HEIGHT. A 100-frame loop previously grew the node
until the chips owned the canvas. The grid now caps at roughly four rows
and scrolls; the wheel shield already installed on every widget host is
what keeps that scroll from zooming the canvas under Nodes 2.0.
The header keeps a `N locked · N bypassed` summary while collapsed --
hiding the grid must not also hide the fact that frames are set, since a
forgotten lock is a confusing run. Only in-range frames are counted: an
out-of-range lock has no chip here, and naming it would point at a frame
that is not on screen.
Collapse is deliberately NOT persisted. Surviving a workflow save would
mean a hidden grid staying hidden across sessions, which is the same
forgotten-lock trap. Re-opening costs one click.
Test ids for the chrome are pluralised (`loop-frames-grid`) so they do
not collide with the chips' own `loop-frame-` prefix, which suites count
with a prefix selector.
Both states were already VISIBLE on the frame chips -- a dashed border for
bypassed -- but only CHANGEABLE from the per-iteration seeds modal, which
is two clicks away and covers the node you were reading. Flipping one or
two frames is the common case, so it should not cost a round trip through
a dialog.
Shift-click toggle the frame's seed lock
Alt-click toggle bypass
Ctrl is deliberately unused: on macOS Ctrl-click IS a right-click, so the
combo would open a context menu instead of firing. Alt for bypass follows
the idiom already in the seed modal, where Alt-click on Copy takes the
locked-only variant.
A chip-lock writes the seed the frame WOULD have used, from the same
`deriveLoopSeeds` series the modal's "Lock all" writes, so the two agree
-- a lock that froze a different value than the one displayed would be
worse than no lock.
Bypassing the last running frame is refused, mirroring the modal's own
rule, and says why with a toast. A silent no-op would read as a broken
click, and nothing on the chip hints at the reason.
A modifier click never also moves the edit cursor. Jumping the editor to
another frame as a side effect of locking one is the kind of surprise
that makes people stop trusting a shortcut. `base` takes no modifiers at
all: it has no seed to lock and nothing to bypass.
Locked frames now get a corner dot -- the chips are ~20px tall so a
padlock glyph would be mud, and the tooltip carries the actual seed. The
dot survives bypass, or unlocking later would look like it did nothing.
Every chip is `position: relative` whether locked or not, so toggling one
cannot reflow the grid.
The combos are printed under the grid rather than left to tooltips. An
undiscoverable shortcut is the same as no shortcut, and that line is
where the reader is already looking.
As a dashboard card it held the top of the home view permanently to
deliver something read once, and competed with the hero for the first
thing a returning user sees. A topbar button with an unread dot costs a
few pixels, says "there is something here" just as clearly, and -- unlike
a dismissible card -- is still there next week when someone wants to
check what changed.
That last part fixes a gap the card could not. The update pill renders
only while a NEWER release exists, so once you were current there was no
way back to the notes for the version you are actually running. This page
is now the permanent home for them, which is what makes the unread dot
safe to clear on sight: nothing is lost by not reading it today.
The page shows the full notes, including the "Also in this release" tail
the update dialog cuts. The dialog cuts it because it is an interruption
and should stay short; a page the reader chose to open is not, and
withholding half the notes there would just send them to GitHub. The
per-commit dump stays stripped in both -- that is for people reading git.
Icon is a megaphone, with the dot moved to the BOTTOM-right rather than
the icon changed to suit the dot. Top-right is the conventional corner
but it is also where the horn is, so the dot merged into the glyph and
stopped reading as a marker; bottom-right is the one corner the shape
leaves empty. Tried and rejected: `pi-gift` (says reward), `pi-bell`
(promises actionable alerts this does not deliver) and `pi-sparkles`
(the wildcard kind icon everywhere else).
Also restores mocks between AppTopbar tests. The update-pill test spies
on `useReleaseCheck` and pins `current` to a fixed version; module spies
outlive the test that made them, so every later test in the file was
silently running against that stub. The new dot tests failed on it while
passing in isolation, which is the visible symptom of a hazard that was
already there.
Verified in the running SPA: 13 checks covering the dot lighting on a
version change, clearing on visit and staying clear across a reload, the
page rendering the tail the dialog omits, and the no-notes-cached state.
Three defects, found by opening the page instead of reading the diff.
RATE LIMITING. The launch check was spending far more of the anonymous
60/hr-per-IP allowance than "once per session" implied, in two
independent ways.
The `sessionFetched` guard is a module-level binding, so it dies with the
page: the real cadence was one request per RELOAD, and a day of working
on the SPA is easily sixty. Freshness is now judged from the persisted
`checked_at` the cache was already writing and never reading, with a
6-hour TTL. `checkNow()` still ignores it, because the user asked.
Worse, the guard was set only once a response LANDED. Every consumer
mounting in the same tick -- topbar pill, Dashboard, Settings -- read it
as false and opened its own request, so a single load cost three units,
not one. It is now set on attempt, and concurrent callers share one
in-flight promise.
When GitHub does refuse us, the reset it hands back in X-RateLimit-Reset
is honoured rather than retried against, and persisted, so the reload
that follows a 403 does not immediately spend another request. The
previously cached release survives a refusal -- forgetting the version we
already knew because the quota ran out would be a second failure on top
of the first.
WHAT'S NEW WAS STRUCTURALLY DEAD. `hasUnseenRelease` needs a previously
recorded version, and the only writer was the card's own dismiss button,
which never renders until the card shows. A closed loop with no entry
point -- it could not have fired for anyone, ever. The running version is
now recorded on first sight, so the NEXT upgrade has a baseline. Tests
that seeded `seenVersion` by hand never exercised the path the app takes,
which is why they passed against a feature that could not run.
STYLING. Both cards styled themselves from scratch in `--wp-node` -- the
CANVAS node palette, teal -- which is the graph's colour language, not the
manager's. They now use the same Card/Button/Icon primitives and accent
purple as everything around them, and the what's-new list gets an
explicit `list-style` because the app reset clears it globally and the
entries were running together unmarked.
The star prompt also moves to the BOTTOM of the dashboard. Above the hero
it was the first thing on the page, louder than the product's own
welcome -- the layout of an ad rather than of an aside. The eligibility
rule already selects a returning user; it does not need the best seat.
Verified in the running SPA, not just in jsdom: 15 checks covering both
dismiss buttons persisting across reload, the snooze expiring, the
what's-new dismiss, four reloads making zero GitHub calls, and a stale
cache making exactly one.
Two Dashboard cards, both inline and dismissible. Neither blocks
anything and neither is a modal — the extension already raises an update
dialog, and a second one on the next SPA open is the same news twice.
WHAT'S NEW reuses the release body the update check already fetches, cut
at the modal marker, so it shows the same highlights-only slice for the
same reason. Silent on a fresh install: someone who has never recorded a
version has no "new" to hear about. It also only renders when the fetched
release matches the INSTALLED version — while an update is pending the
body describes changes the user does not have yet, and presenting that
as "what's new in your version" would be a lie.
THE STAR PROMPT is a favour, so it behaves like one. The obvious
triggers were all first-touch — "created N modules", "ran the starter",
"first test run" — and every one fires on someone still poking at the
thing: ten modules can be ten empty rows, and the starter bundle is by
definition the moment before you understand anything. Those measure
curiosity, not value.
So it needs two signals, both: five distinct calendar days with the
manager open (not sessions -- a reload is not a return; not consecutive
-- life happens), AND a library carrying real content. Either alone is a
false positive.
Existing users are credited on first run: without it, tracking starts at
zero for everyone and a three-month user waits another five days, which
is backwards. The credit is deliberately short of the threshold, so they
still have to come back -- being asked the instant you update reads as a
reward for updating.
"Maybe later" hides it for a fortnight then lets it return, because a
button that visibly does nothing is a broken button and "later" is not
"no". "Don't ask again" is permanent and survives upgrades. The star
count is not shown: social proof cuts both ways, and at a low number it
argues against starring.
25 tests on the eligibility rule, which is the whole feature -- fire
early and it is adware, never fire and it is dead code.
The dialog cuts at the modal marker, so it shows the headline and
highlights and then simply stops — a five-change release and an
eighty-change one look identical from inside it, which is the opposite
of what the cut was for.
`tailChangeCount` counts the bullets below the marker and the dialog
renders "+ N smaller changes" beneath the notes. Zero for releases
published before the marker existed, so nothing is claimed about them.
Verified against the real next.md: 20 counted, matching the 20 written
by hand in the <details> summary on the GitHub side. The template now
notes that the GitHub number is manual and the dialog's is computed, so
if they ever disagree the hand-written one is the wrong one.
The CSS this mirrors is `radial-gradient(120% 100% at 0% 0%, …)` — an
ellipse 120 percent of the WIDTH by 100 percent of the HEIGHT, anchored
top-left, so it falls off across the whole panel. I had applied a
`scale(1, h/w)` transform, which squashed it into a flat smear along the
top edge; on an 880x202 frame that reads as a tinted corner with three
quarters of the figure left flat.
Now `r=1` with `scale(1.2 1)`, which is the CSS geometry directly, and a
three-stop falloff so the tint carries further before it disappears.
Three things, all of them fidelity to the SPA figure rather than taste.
The frame lost its wash. PipelineDiagram paints
`radial-gradient(120% 100% at 0% 0%, node 6%, transparent 60%)` over
bg-1; dropping it left a flat slab. Reproduced as a radial gradient with
themed stops.
The connectors lost their fade. `.wp-doc-diagram__arrow-ln` is a
gradient that fades in and out at both ends, so a connector reads as
flow rather than a drawn border -- which is most of why these felt dead.
They are RECTS, not lines: a horizontal <line> has a zero-height
bounding box, so an objectBoundingBox gradient on it collapses and the
line vanishes, leaving an arrowhead pointing at nothing. Caught that in
the render, not in review.
And the loop diagram was topologically incomplete. WP_ContextLoop has a
`loop_config` side-output; WP_SeedList takes it as an optional input and
mirrors the loop's count, strategy and base seed from it. That link is
exactly WHY the two fan out in lockstep, and the old figure -- and my
first rebuild -- drew them as unrelated sources, leaving the caption's
claim unexplained.
The icon extractor rewrote `fill` attributes to `currentColor`. Almost
no PrimeIcon HAS a fill attribute -- of the ones these figures use, only
`sparkles` declares one -- so a rewrite-what-exists pass left every
other glyph at SVG's default black.
That is why the feeder pills looked right while every node icon came out
black: the feeders happened to use icons carrying fills.
Concrete fills are now stripped and the wrapping group carries
`fill="currentColor"`, so anything without its own fill inherits the
group colour. `fill="none"` is preserved -- on the icons that use it, it
marks the deliberately hollow part, and filling it would blob the glyph.
Verified rendered in both themes: WP nodes teal, external nodes muted,
feeder pills in their per-kind colours.
The two figures were hand-drawn SVG that had drifted from the app: flat
horizontal cards, approximated icon shapes, a violet accent the product
does not use, and — in the loop diagram — the assembled prompt running
straight into KSampler. It does not go there. Text is encoded first and
only conditioning reaches the sampler; seeds are the one thing that
arrives directly.
Both are now generated from the real component. PrimeIcons ships
`raw-svg/`, the same paths the webfont is built from, so the README
carries the actual glyphs rather than lookalikes, and every value is
lifted from PipelineDiagram.vue and theme.css instead of eyeballed:
teal `--wp-node` accent, `--wp-bg-2` cards at radius 10, vertical
icon/name/mono-subtitle layout, kind-coloured feeder pills, per-chip
accent borders, 9.5px uppercase connector labels.
A `prefers-color-scheme` block mirrors the SPA's light theme, so the
figures follow the reader's GitHub theme rather than sitting as a dark
slab on a light page. `pnpm docs:figures` regenerates them.
The SPA components are untouched — they already theme correctly.
Also: the release-notes tail moves into a <details>. On a release this
size it would otherwise double the page. The summary carries the count
so the reader knows what they are opening; the cost, noted in the
template, is that collapsed text is not reliably reachable by
find-in-page. The modal is unaffected — it already cuts above this.
The old body was a flat curated list followed by the per-commit
changelog inside a <details>. Two problems, both visible on 2.11.0.
The commit list restated the curated notes. Hidden types were already
filtered out, so what remained WAS the user-facing changes -- the same
content at lower quality, growing linearly with the release. Dropped in
favour of a compare link, which is one line and strictly more useful:
diffable, searchable, and the real archive is git anyway.
The curated list had no hierarchy, so "long values wrap in a text box"
sat at the same weight as a correctness fix, and length scaled with the
release. It is now:
Headline
### Highlights 4-5, capped
<!-- /modal -->
### Also in this release grouped one-liners
### Upgrade notes only when the reader must act
The cap is the mechanism -- it is what keeps a 6-commit release and an
80-commit release roughly the same height. next.md carries the
selection rules as comments so the next writer does not have to
re-derive them.
The modal now stops at the marker. It has a 320px scroll box and one
job -- answer "is this worth clicking Update now" -- and was rendering
the entire body into it, slicing a paragraph mid-sentence. Bodies with
no marker still render whole, so every published release is unaffected.
Also replaces the stale next.md, which still held the already-published
2.11.0 text and would have shipped again verbatim. It now describes the
81 unreleased changes on this branch: 5 highlights, 20 grouped
one-liners, 291 words to the modal against 686 for the page.
The cleaner treats a prompt as prose or as a comma-separated tag list.
That is right for tags and wrong for the few tokens that are ADDRESSES
rather than words: `embedding:name` and `<lora:name:1.0>` resolve to a
file, so one edited character changes what the sampler loads, or loads
nothing.
Two rules were provably destructive:
embedding:bad_prompt_ -> embedding:bad_prompt
embedding:badhandv4, embedding:badhandv5 -> embedding:badhandv4
`_` and `-` are in the stripped punctuation set, and `bad_prompt_` is a
real published shape. Versioned names sit far above the hardcoded 0.9
fuzzy threshold while naming different files. Both failures are silent:
ComfyUI resolves a missing embedding to nothing, and the dropped tag
only shows up in a generic "N removed" count.
engine/cleaner/atoms.py marks both forms -- LoRA included, since it has
the identical failure mode and excluding it would have been an
arbitrary line. Punctuation stripping skips atoms; fuzzy dedupe falls
back to exact comparison when either side is one.
This widens the cleaner's remit from "text" to "knows a little prompt
syntax", which the findings named as the cost. The alternative was a
rule that renames a file reference without saying so.
Narrow, and the narrowness is tested: ordinary tags still get trimmed,
ordinary near-duplicates still merge, exact repeats of an embedding
still collapse, and text mode still trims a leading edge -- it only
holds back the trailing trim when the prompt ENDS in an atom.
reactiveFromGraph installs a 400ms poll per call site, and a single
WP_Context node installs TEN of them. Every walk re-read the node's
wp_modules widget and re-parsed it from scratch -- on a real workflow
that string is ~294 KB, so the parse cost MORE than the traversal it
fed (JSON.parse 4.64 ms/call against 4.02 ms for the whole of
collectUpstreamProducers). Ten pollers parsed the identical string ten
times per cycle; five nodes made it ~21% of a core.
Cache keyed on the raw string, so it self-invalidates when the widget
is edited, and bounded at 24 entries because every keystroke in an
editor mints a new 294 KB key.
The findings flagged the hazard: callers now share one object instead
of each getting a private copy. That is why this lives in graph.ts as a
module-private helper rather than inside parseWidgetJson, whose other
callers (ContextWidget) legitimately mutate what they get back. The
read-only contract is enforced, not assumed -- graph.parse-cache.test.ts
puts the cache in freeze mode and runs every walker, so a write throws
instead of silently corrupting the next reader.
Measured on the same 5 x 18 x 133 graph as before:
collectUpstreamProducers 3.67 ms -> 0.06 ms
collectUpstreamVariables 9.39 ms -> 1.99 ms
collectUpstreamWildcardUuids 3.69 ms -> 0.01 ms
per cycle, 5 nodes 83.79 ms -> 10.33 ms
~21% core -> ~2.6%
Collapsing the ten polls per node into one shared walk stays
un-attempted; this may make it unnecessary.
Every commit ran the whole CI suite -- lint, typecheck, the full 4000-test
vitest run, a build, the size gate, ruff and the full pytest suite --
regardless of what the commit touched. Measured on this machine that is
about 4.5 minutes, and since the habit was to run the same gates by hand
first, the real cost per commit was closer to nine.
The hook now looks at the staged paths and runs only the halves that can
be affected, with vitest scoped to the changed sources via `vitest
related` (30s against 150s; it still walks the import graph, so a shared
module pulls in its dependents). WP_FULL=1 forces everything.
This is only safe because CI now runs on every branch push rather than
just main -- a feature branch previously had no remote verification at
all until a PR existed.
Three corrections, all of them to my own earlier attempt.
Option chips: these were hand-rolled spans that only MIRRORED RefChip's
styling, so they were the one surface in the editor with no hover card.
The previous commit made that worse by bolting on plain `title`
tooltips instead of using the component we already have. Now they ARE
RefChips, so they get the same card as every other chip. Two test
expectations move to RefChip's conventions, which is the point of the
change: `@` is prefixed only once a ref resolves, and the filter
expression lives in the card rather than a native title.
Derivations: rule-summary chips said "binds at runtime" for variables
with an obvious producer. RuleValueChips rendered RichTextPreview with
only value/uuid-to-name/surface, and RichTextPreview had no producer
props at all, so every var chip below it fell back. Producers now flow
RulesSection -> RuleValueChips -> RichTextPreview -> RefChip, and the
same chain is wired for wildcard option chips
(ModuleEditModal -> WildcardInstanceModal -> PoolSection -> OptionRow).
Combine already worked, which is why the symptom looked
derivation-specific.
Type-to-filter hint: shipped behind a six-option threshold, which hid
it on exactly the menus being checked -- a three-option dropdown showed
nothing. Threshold is now two, so it appears wherever there is anything
to filter.
Two discoverability fixes.
Chips inside a wildcard option had no hover text in the ordinary case.
A nested-ref chip only carried a `title` when it was unresolved or
filtered, and `$var` chips carried none at all -- so a resolved ref,
which is the common case, gave no way to see which library entry it
points at. The chip label is abbreviated to `@name` with no uuid, so
there was nothing else to go on either. Ref chips now always describe
themselves (name, uuid, and any filter), and var chips say what they
are.
Every Select menu has always filtered as you type, but the only sign of
it was the "Filtering:" line, which appears AFTER the user has already
guessed the feature exists -- as a user put it in Discord, "perhaps it
should be telegraphed better". The menu now says "Type to filter" up
front, on lists of six or more where filtering is worth reaching for,
and gives way to the live filter line on the first keystroke. Dropdowns
that already carry their own search field are separate components and
are untouched.
The Nodes 2.0 toggle does not reload the page, so every widget alive at
that moment was built against the other renderer. The damaging piece of
staleness is the autosize bookkeeping: pushSize compares the node's
current height against the last height WE set and treats a mismatch as
"the user dragged this, leave it alone". A renderer flip changes node
height without going through us, so from that instant every widget
decides the user owns its height and stops auto-collapsing.
That is the same trigger behind the Debug node's jump, and it explains
why WP_VarToInt/Float stay tall after their dropdown closes but only
following a LIVE switch -- after a page refresh they are fine.
One watcher, driven by the DOM churn the flip itself causes, tells every
widget to forget its baseline and re-fit. It is not specific to the two
nodes reported: any widget that autosizes was exposed.
Not reproduced end-to-end: the var picker only grows enough to show the
bug when it has upstream variables to list, and an unwired node's menu
is empty. The mechanism is covered by unit tests instead -- a flip
triggers a re-fit, a non-flip does not -- and the browser checks confirm
no regression in either renderer.
Two small ones.
The modal footers rendered a hardcoded `⌘↵`, which reads as a Mac-only
binding to the overwhelming majority of ComfyUI users. The handler has
always been `(ev.ctrlKey || ev.metaKey) && Enter`, so only the LABEL was
wrong -- it now says `Ctrl+↵` off Apple platforms. Detection prefers the
UA-CH platform hint and falls back to the user-agent string, avoiding
the deprecated navigator.platform.
The bundle header's child-count summary ("9 mods") was 10px in
--wp-text-dim, which resolves to #666 on the dark theme and sat right at
the edge of legibility against the bundle frame tint -- the one thing
telling you how big a collapsed bundle is. Now the muted token at 11px
with a faint pill, so it reads as a value rather than a watermark.
The root-level shield only sees keys TARGETED inside the overlay. Click
the button that opens a modal and focus stays on that button, which is
outside the overlay, so keystrokes go straight from it to window and the
shield never runs. Measured on the Blocklist modal: pressing a, a, r
with the modal open put ["a","a","r"] on window.
Two additions:
- focus the overlay when it opens, unless something inside already has
focus (an autofocused field must keep it);
- guard at the document for keys targeted outside the open modal, since
a modal owns the keyboard while it is up. Document bubble runs before
window, where ComfyUI's keybindHandler lives.
Escape still passes through, so close handlers keep working.
Verified in a browser, Blocklist modal open:
before focus BUTTON (the trigger), keys to window ["a","a","r"]
after focus moves into the overlay, keys to window []
typing "abc" still lands in the textarea, nothing leaks
Pressing `r` inside an edit modal ran ComfyUI's Refresh Node Definitions
and froze the page.
ComfyUI binds `useEventListener(window, 'keydown', keybindHandler)`, and
the handler only bails for text-editing targets:
const target = event.composedPath()[0]
if (keyCombo.isReservedByTextInput &&
(target.tagName === 'TEXTAREA' || target.tagName === 'INPUT' ||
target.contentEditable === 'true' || ...)) return
A plain letter pressed while focus sits on a button or a div inside a
modal is not reserved by text input, so it runs the global keybinding.
Its other guard -- skip global keybindings while a dialog is open -- keys
off ComfyUI's OWN dialog stack, which our modals never enter.
useModalKeyShield binds keydown/keyup to the modal ROOT in bubble phase.
Everything inside the modal has already had its turn by then, so inner
handlers, input defaults and IME are untouched; the event simply stops
before it can climb to window. stopPropagation only -- never
preventDefault -- so typing still works.
The corollary is that a modal's own key handling can no longer live on
window: a window listener sits ABOVE the shield and would never see keys
pressed inside its own modal. ModalShell now re-emits them, and the two
consumers that had window listeners are moved onto it:
- ModuleEditModal (Ctrl+Enter to save)
- BundlePickerModal (arrow/Enter/"/" navigation)
ModalShell keeps a window listener for Escape only, which covers the
case where focus is OUTSIDE an open modal.
ModulePickerModal already used a capture-phase window listener, which
runs before the shield, so it is unaffected.
Verified in a browser: keys pressed inside a ModalShell modal no longer
reach window, and Escape still closes it.
Switching the renderer from the menu does not reload the page, so a
widget built under legacy never ran any construction-time isVueNodes()
branch, and the fill observer's bounded retry (~10s of frames, looking
for a node element that does not exist yet in legacy) had long since
given up. Toggling with content on screen therefore left the layout
unapplied: measured, the node jumped from 380 to 1200 and could no
longer be resized. Reproducing it needed a wait past the retry budget,
which is why the earlier reload-based test showed it passing.
Two changes:
- Apply the out-of-flow layout at construction, in BOTH renderers, and
stop stripping it in the legacy branch. The push needs only one frame,
so there must be no window at all. Legacy is indifferent -- it gives
the host a definite box either way, and its numbers are unchanged
(host 354u, scroller engaged, 500x240 floor, wheel scrolls 0 -> 300).
- Replace the bounded retry with a registry driven by one document-level
observer, so a node element that appears minutes later is still
picked up.
Verified: toggling live after the old budget would have expired now
keeps size at 380, the scroller engaged, and manual resize working.
Two follow-ups to 27685706, which fixed the Debug node inflating but by
pinning the host to a pixel height computed from node.size.
1. The pin was the wrong lever. The node element's height is
authoritative, so the correction term sat at roughly zero: the host
never grew with the node and drifted a couple of pixels smaller on
every resize. The box stopped tracking the node and shrank each time
it was dragged.
The real cause is narrower than "the percentage height does not
resolve". Every ancestor between us and the node DOES have a definite
height tracking node.size -- measured 238 / 638 / 838 as the node
went 330 / 730 / 930. What breaks is that we are a flex item, and a
flex item defaults to min-height: auto, which refuses to shrink below
its content. The payload grew our box, which pushed the chain, which
the layout store wrote back into node.size.
Three parts, each needed:
- min-height on the host so it can shrink below content. Fixed, not
content-derived: the host clamps a resize with
measureMinContentHeight(), which MEASURES our content, and with the
content out of flow that measured zero and took the floor with it
(dragged to 62u where legacy stops at 240).
- content out of flow. Our own min-height is not sufficient because
EVERY ancestor is also min-height: auto, so the push propagates
past us -- measured, the node still inflated 300 -> 870.
- both applied at widget construction, not on a deferred sync: Vue
paints content before any observer of ours runs, and one frame of
in-flow content is enough for the store to record an inflated size
that then sticks across a renderer switch.
2. The wheel zoomed the canvas instead of scrolling our widgets. The
canvas yields a wheel only to a widget that declares
data-capture-wheel="true" AND currently holds focus; a read-only
viewer never qualifies. A bubble-phase stopPropagation on our own
element does not reach that decision either. Measured over the Debug
scroller:
legacy scrollTop 0 -> 300 scale 0.900 -> 0.900
Nodes 2.0 scrollTop 0 -> 0 scale 0.900 -> 0.818
Absorb it at window capture, which runs before every other listener,
using stopPropagation alone so the browser still performs the native
scroll. Ctrl+wheel is left to the canvas: that is pinch zoom. Applied
to every widget host, not just the Debug viewer.
Verified in a real browser, both renderers:
host tracks the node 238 / 638 / 838 for node 330 / 730 / 930
payload does not push size[1] holds at 400 for 3, 20 and 60 vars
scroller engages pre 289/1089
wheel scrollTop 0 -> 300, scale unchanged
renderer switch size stays 380, no jump to content height
floors Nodes 2.0 390x262, legacy 500x240
Legacy numbers are identical to before the change.
fillHost means the user owns the node's height and the widget scrolls
whatever overflows. That rests on `height: 100%` resolving -- and a
percentage height against an INDEFINITE container computes to `auto`.
Legacy gives the host a definite box so it resolves. Nodes 2.0 lays
nodes out from content, so it does not: the flex column sizes to
content, .wp-dbg-pre (flex: 1 1 0%; min-height: 0) is handed its full
content height instead of being compressed, overflow: auto never
engages, and the node inflates to the whole payload -- which the layout
store then syncs back into node.size.
Measured with node.size[1] pinned at 400:
payload legacy host / pre Nodes 2.0 host / pre
3 vars 354u 305/305 338u 289/289
20 vars 354u 305/429 scrolls 477u 429/429 never scrolls
60 vars 354u 305/1089 scrolls 1138u 1089/1089 never scrolls
One mechanism, three reported symptoms: the dead scrollbar, the node
that cannot be dragged shorter, and the absurdly tall node.
Pinning a pixel height alone is NOT enough. The Nodes 2.0 parent is
.flex.flex-col.*:flex-1, and that `*:flex-1` hits every child including
us; with flex-basis 0% and flex-grow 1 the main-axis size comes from
flexing and an explicit height is ignored. Measured: host pinned to
308px still rendered 1024px. So opt out of flexing too.
Height comes from node.size[1], which is authoritative in both
renderers, via an error-correcting step rather than a modelled chrome
constant -- compared against size[1] + header, because the host's own
sync notes that layout size excludes the title.
Width: legacy gets its floor free from computeSize, which Nodes 2.0
never calls, so the node could be squeezed to MIN_NODE_WIDTH (225)
against a widget declaring 494. Its resize interaction reads the floor
from the node element's inline min-width, so publish ours there --
writing node.size[0] does not work, the layout store owns the rendered
size and syncs one-way.
After, Nodes 2.0 matches legacy: size[1] holds at 400 for every payload,
the pre scrolls (283/1089), and dragging shrinks to a 390x348 floor
instead of 225.
Only WP_Debug sets fillHost, so nothing else is affected.
Four defects in the Vue-renderer wire merge, all from the same place:
the merge is DOM state, and it was bound to one element at one instant.
1. Merged rows printed their labels too. They are zero-height and
stacked on the kept row, so "input_1"/"input_2"/"input_3" piled on
top of the unified "inputs xN" and rendered as a smear. They keep the
label override -- it has to be ready the moment they expand -- so
suppress only their generated text.
2. No clearance under the merged pin. Zeroing the merged rows reclaimed
all their vertical space, leaving the incoming wires running into the
top edge of the widget body. Reserve some back on the last merged
row: they share a y, so only its bottom margin moves what follows.
3. Switching renderers while collapsed came back expanded. At attach
time the node's element usually does not exist yet -- the workflow is
restored before Vue mounts nodes -- so the one-shot lookup bailed and
nothing was left watching.
4. Focusing a collapsed node expanded its wires while the button still
read "collapsed". Vue REPLACES the node element on re-render, so the
per-element observer was watching a detached tree.
3 and 4 are both fixed by registering nodes and re-applying from a
single observer on a stable root. childList only: our own writes are
class and style attributes, which that never sees, so there is no
feedback loop.
Labels also now publish in BOTH states, not just while collapsed. Vue
renders slot names from its own snapshot and never sees a slot.label
write, which breaks the restore too: a legacy collapse serializes the
placeholders into the workflow, so reloading under Vue showed "inputs
xN" and " " forever, even expanded.
Verified in a real browser. Legacy collapse -> switch renderer -> reload:
collapsed 4 pins at 1 distinct y, label "inputs x3", 12px clearance
expanded 4 pins at 4 distinct y, labels input_0..input_3 restored
focus stays merged, 1 distinct y
The wire merge was a canvas paint-time trick: override getInputPos and
every matched pin reports the first pin's position. Nodes 2.0 paints no
canvas for slots. It renders one .lg-slot--input row per node.inputs
entry and feeds those elements' measured rects to the layout store,
which is what the link renderer draws to, so the override moves nothing
there.
Measured with four wires merged: every pin reported the same
getInputPos while the DOM dots stayed 18px apart. Half the mechanism
did work -- mutating slot.label writes to the data model -- which is why
the node read "inputs xN" while the wires stayed fanned out.
The host has this feature internally: NodeSlots.vue takes a `unified`
prop that grid-stacks every dot into one cell. It is wired only to
whole-node collapse, with no per-node opt-in, so reproduce the effect on
the rows we own. Zero the merged rows' height so they share one centre
line, and pull the first up half a row to land on the kept pin. Height
rather than display: useSlotElementTracking discards any slot measuring
zero area, so hiding a row would drop its link endpoint instead of
moving it.
The label needs the same treatment for the same reason -- Vue renders
slot names from its own VueNodeData snapshot and never sees the
slot.label write (measured: model "inputs x4", rendered "input_0") --
so the collapsed label is published as a custom property and printed
from CSS.
Verified in a real browser, both renderers. Nodes 2.0, four wires:
expanded 5 dynamic pins at 5 distinct y [270,288,306,324,342]
collapsed 5 dynamic pins at 1 distinct y [270] upstream stays 252
expanded 5 dynamic pins at 5 distinct y (round trip restores)
Also guard CSS.escape, which is absent in some environments.
The focus-flash border mapped graph coords to screen itself
(canvasRect + (pos + ds.offset) * ds.scale, plus a TITLE_PAD constant).
That derives the box from node.size, and under ComfyUI's Nodes 2.0
renderer node.size is a hint rather than a fact: the node is laid out
from its DOM content and never clamped back. A node declaring 400 wide
measured 490 graph units, so at 0.9 zoom the border came out 81px too
narrow and cut through the node.
Measure instead of recompute. Nodes 2.0 gives each node a
[data-node-id] element whose rect is the box, title bar included, which
also retires the TITLE_PAD estimate. The legacy renderer paints nodes on
the canvas and has no such element, so it keeps the transform maths --
which is correct there: both renderers agreed on position to the pixel,
only the width was wrong.
Verified through the real path (Assembler with an unresolved $var ->
warning toast -> Focus click) in both renderers:
Nodes 2.0 overlay 584,320 432x291 node 584,320 432x291 (exact)
legacy overlay 584,325 432x247 (transform-maths fallback)
Two reproducible probes backing the P3 investigations. Neither changes
behaviour; both exist so the findings can be re-run rather than re-argued.
`src/extension/__perf__/poll-cost.test.ts` times the graph walkers on a graph
shaped like the reported workflow — 5 Context nodes, 18 modules each, 133
options. It measures rather than asserts: the thresholds are loose so a busy
machine cannot turn it red, and the console output is the deliverable.
It shows the 400ms interval is not the expensive part. A Context node installs
TEN `reactiveFromGraph` polls, each re-reading the node's `wp_modules` widget
through `parseWidgetJson`, which is a bare `JSON.parse` with no memoisation.
That JSON is 294 KB per node, and parsing it costs slightly MORE than the
traversal it feeds — so the same string is parsed ten times per node per cycle
for nothing. Three of the ten polls across five nodes come to 84 ms every
400 ms, about a fifth of a core.
`tests/engine/cleaner/test_embedding_roundtrip.py` pins what the Prompt Cleaner
does to `embedding:` syntax. The engine itself never touches it — one unrelated
comment is the only hit in `engine/` — so the cleaner is the whole hazard, and
two of its rules damage embeddings:
- Punctuation stripping trims `_` and `-` from a tag's trailing edge, so
`embedding:bad_prompt_` becomes `embedding:bad_prompt`. ComfyUI resolves a
missing embedding to nothing, so the prompt quietly stops working.
- Fuzzy dedupe at its hardcoded 0.9 threshold treats `badhandv4` and
`badhandv5` as the same tag and drops one. Different files, different
training, no warning beyond the generic removed-count.
Those two tests assert the CURRENT behaviour and say so in their names, because
whether to teach the cleaner about prompt syntax is a design decision — and the
same argument would apply to LoRA tags, which have the same shape.
Written up in full, with the Nodes 2.0 and capability-survey findings, at
docs/investigations/p3-findings.md (untracked, per the docs allowlist).
The previous attempt capped the menu's own height at `100vh - 24px`, which
cannot work: whether a menu fits depends entirely on where its top edge landed.
A 400px menu opened at y=700 overflows however small that cap is, because the
cap never knew about the 700. The height is now measured from the trigger to
the edge of the window.
That alone made it fill the whole page on a tall window, which is worse than
the overflow it fixed — one menu burying the page behind it, and a dozen tags
spread over 800px are harder to scan, not easier. So the viewport is the LIMIT
and 340px is the target: roughly a dozen rows plus the search box, shrinking
only when there is less room than that, with a 140px floor below which it
scrolls instead.
The filter menu also flips above its trigger when the room below is genuinely
worse, which the per-option picker already did. In practice the filter never
flips — its button lives in a sticky header near the top — but the row-level
picker does, and both now stay inside the window.
Measured at 1000 / 760 / 620 / 500px viewport heights, on both hosts: 340px
where there is room, 294px at 500px tall, and the row picker flipping to
12–312px at 620px tall. The inner list carries no cap of its own any more — it
is the part that gives, and a fixed 240px there fought the menu's own bound and
won.
**The tag menu lost its axis colours** when the picker became a shared
component: I rewrote its stylesheet instead of porting it, and the rules
consuming `--chip-hue` went with it. The hue is what makes the menu read as the
same colour clusters as the pills and chips everywhere else; a flat grey list
loses the only cue saying which axis a tag belongs to. Ported properly this
time.
**It was cut off at the bottom** whenever the list behind it was short — an
empty filter result leaves almost no page to sit on. Capped to the viewport,
with `min-height: 0` on the inner list so it shrinks and scrolls instead of
pushing the menu past the edge.
**It closed the moment the filter emptied the list.** Any layout change fired a
scroll, and the handler that keeps the teleported menu glued to its trigger
treated that as a reason to dismiss. It re-measures now, and only closes once
the trigger has actually left the viewport.
**Select's menu could not be scrolled by its scrollbar** — reported on the test
runner, present on every Select in the app. The menu is teleported to <body>,
so it is not inside the trigger's wrapper, and the outside-click guard checked
only that wrapper: a mousedown on the menu's own scrollbar counted as an
outside click and dismissed it. The wheel worked, which is why it read as "the
scrollbar is dead" rather than "the menu closes". The guard now excludes the
menu, as its comment always claimed it did.
Audited the rest, since this class of bug is easy to repeat: every other
teleported surface with an outside-click dismissal — IconPicker, ContextMenu,
the sub-category picker — already excludes its own panel. Select was the only
one that did not.
**Fixed Values had the grip before the checkbox** in the body and after it in
the header, so the two disagreed. Body now matches.
**Select-all skipped the null option.** `selectableOptions` still filtered it
out from when it could not be selected at all; selection drives moves, weight
and delete, all of which it takes part in. Tag actions still skip it — the
engine refuses tags there.
**Bulk add appended past the starter blanks.** A new wildcard or fixed-values
module opens with empty rows so the table is not a void; a first bulk add left
them sitting above everything just added, and they fail validation on save (an
option's value must be a non-empty string). An untouched blank is scaffolding
and is consumed by the incoming batch. One the user tagged or re-weighted is
NOT untouched — they were working on it — so only a fully default row
qualifies.
Three from testing the merged toolbar.
**The search box was a quarter of the width it should be.** Two nested flex
competitions, both lost the same way. Card's header puts a `.wp-spacer`
(`flex: 1`) between the title and the actions slot, and the filter block had
`flex: 1` too, so the two split the free space evenly; a far larger grow factor
gives the block effectively all of it. Inside the block a second `.wp-spacer`
was right-aligning the count and taking half of what was left — it is gone, and
the count now sits beside the tag button it describes. Measured 267px → 523px
of an 1122px header.
**The tag menu closed the moment you scrolled it.** The scroll listener that
keeps the teleported menu glued to its trigger fired for scrolls INSIDE the
menu too, so reaching for the wheel or the scrollbar dismissed it before you
could read past the first axis. Scrolls originating within a teleported picker
are now ignored: that is the user reading its own list. A scroll of the page
underneath still dismisses it, since the trigger has moved.
**Bulk edit was giving the null option tags.** It has no chips of its own — the
row renders a dash — so the tags went in invisibly, and the engine would have
refused the save: "null option must have no sub_categories"
(wildcard_handler.py). Its participation is governed solely by `exclude_null`,
so a tag on it could not affect anything even if it were allowed. Apply and
Remove now skip it. Set weight and Delete still include it, because it has a
weight and can be deleted — and it stays selectable, since selection also
drives the moves it took part in as of the previous commit.
So: no, null should not carry tags. The engine has always said so; the UI was
quietly disagreeing.
Five follow-ups from testing the options filter.
**The tag menu is now one component.** The filter had grown its own dropdown
while the per-option picker had another — same job, two implementations, and
they would have drifted within a release. `TagPickerMenu.vue` is the picker,
extracted: teleported past the `overflow: auto` scrollers that clipped it,
search pinned above a scrolling list, axis headings, checkboxes. Both callers
use it.
**It closes when you click away.** The filter menu was teleported to <body> but
never registered with `closeAllMenus`, so it stayed open until its own button
was clicked again. It joins the outside-click and Escape dismissal the
per-option picker already had, and closes on scroll rather than hanging in
space once its trigger has moved.
**One row, not two.** Bulk edit / Add null / Add option sat on one line and the
filter on another, which made the header taller than the first option in the
list. They all act on the same table; they belong together. The filter takes
the flexible width, the buttons keep their intrinsic size.
**The null option is a row like any other.** It could not be selected in bulk
edit and could not be reordered, because `hoistNullFirst` re-pinned it to index
0 on every save and any move would have silently undone itself. That pin was
never needed: the engine locates the null option by the `is_null` FLAG and
never by position — "the flag is the source of truth", wildcard_handler.py, and
`resolve` filters with `[o for o in options if not o.get("is_null")]`. The
function is gone, and the row now has a checkbox and a grip.
**Fixed Values gets the filter and the reorder.** No tag menu — those rows
carry no tags — so the text box searches BOTH halves, the binding and the
content, because you look for either and matching one would send you back to
scrolling half the time. Grip column, Alt+↑/↓, and Top / Bottom on the
selection toolbar, with drag disabled under a filter for the same reason as in
the options list.
The per-option picker's test hooks changed shape with the extraction —
`opt-tag-{id}-toggle-{tag}` rather than `opt-tag-toggle-{id}-{tag}` — since the
component namespaces every hook uniformly off one prefix.
A wildcard here carries 133 options. Until now the only way to reach one was
to scroll and read, and the only way to order them was to have added them in
the right sequence.
**Filter.** Text over the value plus a tag multi-select, pinned in the sticky
subheader so it survives the scroll. Text and tags AND together, and multiple
tags AND with each other — adding a second constraint should narrow the result,
and OR would widen it, which reads as the control being broken. The count sits
idle ("133 options") until a filter is on, because "133 of 133" reports a
success nobody asked for. The empty state says all 133 are still there: an
empty table in a list you can also delete rows from is an alarming thing to be
shown.
Rows keep their ORIGINAL index through the filter. Every row action addresses
its option by position — `removeOption(i)`, the `wc-opt-row-${i}` hooks — so
renumbering them under a filter would delete the wrong row.
**Folded tags get promoted.** A row shows four tags and folds the rest behind
`+N`. Filter by a tag sitting in that remainder and the row appeared with no
visible reason for being there, the evidence hidden behind the very pill saying
there was more. Matched tags are now promoted into the visible slots — tags are
a set, so their order carries no meaning and promoting one is free. Auto-
expanding instead would reflow every matching row at once, a lot of movement
for a small clarification. When matches remain folded even so, the pill itself
is tinted and says why.
**Reorder,** three ways, because no single one covers the range:
- A grip in its own column, hover-revealed. The only pointer affordance the
value cell's contenteditable does not poison — a press there is a text
selection, and the two gestures are indistinguishable at mousedown.
- Alt+↑/↓ on the focused grip. The only one that stays usable at 133 rows,
where a drag becomes an auto-scroll fight.
- Bulk edit ▸ Top / Bottom / Move here. Select, then move as a block.
**Drag is disabled while filtered; the bulk moves are not.** Dropping row 3
above row 47 says nothing about the 43 hidden rows between them, so there is no
honest position to compute. The bulk moves have no such problem because their
destination is absolute — "top" means the top of the whole list, "here" means
beside one specific visible row. So search ▸ tick ▸ move is exactly the
workflow that stays well defined under a filter.
Two behaviours worth stating, both asserted:
- A scattered selection collapses into one contiguous block in the relative
order it already had. There is no other coherent answer, but it surprises the
first time, so the result is reported rather than discovered.
- The null option never moves and is never a landing point. `hoistNullFirst`
re-pins it to index 0 on every save, so any move it joined would silently
undo itself.
Ordering and set logic live in `utils/option-list-ops.ts`, out of the 2.4k-line
editor and directly assertable.
Two reported losses of work.
**Bulk add was easy to throw away.** Users reach for the PAGE's Save and Cancel
instead of the panel's own "Add options" / Cancel — the page pair is larger and
in the place muscle memory expects — and the typed batch went with it. Two
guards, and deliberately no new dialog for the common case:
- Save is greyed while the panel is open, so the only Save-shaped control that
responds is the panel's own commit. The button carries a tooltip saying why;
a greyed control with no stated reason reads as a broken one, and the reason
is exactly what the user needs in order to clear it.
- Un-added text now counts as unsaved work, so the route guard that already
covers Cancel, the back link and every other navigation picks it up for free.
Only the wording changes: "Discard un-added options?" rather than the generic
unsaved-changes copy.
Both editors that have a bulk-add panel — wildcard options and fixed values.
Constraint and derivation have bulk EDIT but no bulk add, so nothing to guard.
**Empty tag groups vanished on save.** A "+ Group" box created and not yet
filled was dropped, which reads as the editor deleting work the user did on
purpose. Dropping stays the default, because it is also what clears up boxes
made by accident, but the choice is now theirs: Settings › Editing › Keep empty
tag groups.
Stored as a preference rather than a payload field. An empty axis is already
representable as `{axis: []}`, a shape the engine's validator accepts — the
loop over members simply does not run — so keeping one needs no new field, no
validator, no migrator and no schema bump. What varies per user is the
DECISION; the RESULT is recorded in the payload like any other edit.
Note on the ref declaration: the guard's predicate runs during setup, so
`bulkPending` is declared above it rather than beside the panel state it
belongs with. Putting it in the obvious place threw "Cannot access
'bulkPending' before initialization" on every editor mount.
`.wp-refchip` carried `user-select: none`, which excludes an element from
selection RENDERING. Ctrl+A, or dragging across a value, highlighted the text
on either side and left the chip looking untouched — so the selection appeared
to stop at the chip even though it never did. Confirmed in Firefox 153:
`Selection.containsNode` reported the chip inside the selection the whole
time, and the selected string always contained its label. Only the paint was
missing, which made a correct selection look like a broken one.
Chips are atomic for EDITING because they are `contenteditable="false"`, not
because of `user-select`, so dropping it costs nothing there. Added an explicit
`::selection` colour as well: a chip carries its own tint, and the default
highlight washed it out.
Re-measured the whole interaction matrix afterwards, since making chips
selectable could plausibly change how edits fall across them — Ctrl+A followed
by Backspace, Delete, Shift+Delete, cut, paste and typing; undo, redo, bold,
italic, underline, Enter, double- and triple-click, Home/End deletes and
Ctrl+Backspace; each with and without a chip in the field. 40 cases, all
intact, no formatting elements injected, no page errors, and clicking a chip
still opens its filter picker.
The rule is asserted against the stylesheet source rather than a computed
style: it lives in a scoped <style> block, which jsdom does not apply, so a
computed-style check would have passed no matter what the rule said.
Reported: cutting an option's text and pasting it into another leaves the
field broken, after which Cancel does nothing and sometimes links stop working
too. Reproduced in Firefox 153 and measured.
A Ctrl+A selection is anchored on the HOST element, not inside a text span. Cut
was the one clipboard verb with no handler, so the browser performed the
deletion itself — and that deletion took the `wp-rt__text` spans with it, the
very elements Vue's vnodes point at. Measured directly after the cut: zero atom
spans left, one child node, the value a stray newline. The field still accepted
typing, but nothing chipped and nothing coloured, because there was no atom
span left to hold any of it, and the vdom now referenced detached nodes. That
is the state a later patch throws `insertBefore: Child to insert before is not
a child of this node` from — the DOMException reported separately.
Cut now runs through `applyAtoms` exactly as paste already did, so the
structure stays Vue's.
Copy was quietly lossy in the same way. A ref chip's DOM text is its display
label, so the browser's own copy turned `red @{955bb6fa} tail` into `red tail`
and the ref vanished on paste — measured, every time. Copy now puts the SOURCE
text on the clipboard, and a chip survives the round trip.
Third, a general repair: any edit made against a host-anchored selection can
delete the atom spans, not merely their text — Ctrl+A then typing a character
did it too. `applyAtoms` already knows how to recover (it swaps the host
element when the DOM has gone stale) but nothing reached it from the typing
path, which deliberately avoids re-applying atoms to keep the caret steady.
`onHostInput` now re-applies when, and only when, the structure is actually
gone.
Measured across the full matrix — Ctrl+A followed by Backspace, Delete, cut,
typing, and paste, each with and without a chip in the field. Before: two of
ten cases left the field with no atom spans and one silently dropped a chip.
After: ten of ten intact, and the chip round-trips.
Not a bug, for the record: Cancel refusing to navigate while there are unsaved
edits is the route guard working — it raises "Discard unsaved changes?" and
waits. It only reads as a dead button when the render loop has already thrown,
which is what the cut corruption above led to.
Two user-reported Firefox bugs, both in the same rescue path. The host parks
the selection on ITSELF rather than inside a `wp-rt__text` span whenever the
caret is at the very start of the field — pressing Home, or clicking before
the first character. Firefox does this most readily, which is why both reports
came from there. `onHostBeforeInput` redirects such a caret into a span before
the browser inserts, and it was redirecting to the wrong place twice over.
**Typing at the start went to the end.** With no chip adjacent, the fallback
picked the LAST span and put the caret at the END of its text. Typing `{` in
front of `skirt` produced `skirt{`. On the host root the offset is a CHILD
INDEX, so it already says where the caret is; the fallback now scans forward
from it for a span and lands at that span's START, falling back to the end of
the preceding span only when there is nothing after.
**Typing over a selection did not replace it.** The rescue ran for ranges as
well as carets and unconditionally collapsed the selection, so the browser
never deleted what was selected — select-all then typing one letter over
`yellow` left `yellowy` instead of `y`. A range is exactly the case the
browser already handles correctly, so the rescue now returns early for one.
This is the mangling behind the `yyellow` in the first report's video.
Verified against Firefox 153.0 — the reported version — driving the real
browser: `skirt{` → `{skirt`, `yellowy` → `y`. Regression tests go through the
DOM Selection API rather than component internals, since the bugs live in the
interaction between the browser's own insertion and our redirect; both were
confirmed to fail against the previous code before being kept.
Not reproduced, and NOT fixed here: the report also mentions Ctrl+A + Backspace
failing to clear the field and a paste doing nothing. Both work in Firefox 153
before and after this change. An early test of mine appeared to show the paste
failing, but that was the synthetic ClipboardEvent delivering no data — a real
Ctrl+C/Ctrl+V round trip replaces the selection correctly. The `yyellow` state
in the video is explained by the selection bug above, so these may well be the
same defect seen from the other side; if it recurs after this lands, it needs a
fresh repro.
`overrides N` was wrong in both directions.
**Inflated.** Several call sites fan out — a derivation writes once per branch,
a fixed_values once per row — because which branch fires is not knowable
statically and every reachable `target_var` has to appear in the var list.
Counting each of those as an override meant a rule with twelve branches all
targeting `$env_fx` reported "overrides 11", when at most ONE branch fires.
Worse, it reported it when nothing upstream wrote `$env_fx` at all: the module
that CREATES a variable was described as overriding eleven writes that never
existed.
`shadowed` now counts distinct PRODUCERS. Identity is passed in by the caller
rather than derived from the producer record, because `moduleId` is the library
uuid — the same module dropped into two Context nodes shares it while being two
genuinely competing writers. Callers key on the node plus the module's
per-instance `_uid`. Injector rows and loop vars have no module and fall back to
the node plus kind, so two rows of one injector binding the same name read as a
single writer; that is the honest summary, since the injector as a whole is what
binds the name.
**Lost.** The sibling producer map added for same-node attribution counted only
siblings and started from zero, and the merge was a plain object spread — which
replaced the upstream entry outright, taking its count with it. With `$outfit`
written by an upstream wildcard, rewritten by an upstream derivation, then
rewritten again by a module in this node, the row showed no badge at all. A
sibling that displaces an upstream writer has overridden that writer plus
everything it had already overridden, and the merge now says so.
Also: `WP_DEBUG_MAPS=1 pnpm build:extension` links the sourcemaps. They are
built either way, but `sourcemap: "hidden"` writes no `sourceMappingURL`
comment, so browsers never load them and every canvas stack trace arrives as
frame after frame of minified Vue runtime naming no component of ours. Off by
default — the comment ships to every install and the maps are large.
The node-vs-library marker landed on the ref chip and the filter header, but
not on the suggestion rows — which is the one place it is actually load-bearing.
By the time the chip carries it you have already chosen; the point of the mark
is to tell you WHICH of two same-named wildcards you are about to reference,
and whether it will resolve against this node's snapshot or the library row.
`@` rows carry it now, styled exactly like the filter header's so the fact
reads the same in all three places.
Injected `$var`s had no icon. `collectUpstreamProducers` reports WP_ContextInjector
rows as `kind: "injector"`, and `KIND_ICON_MAP` had no entry for it, so every
one of them fell through to the generic `pi-circle` and rendered as an empty
ring next to properly-marked siblings. Added `pi-sign-in` — the arrow-into-a-
door mark, matching "inject a value into the context". `--wp-kind-injector`
already existed in the canvas palette, so the tint was there waiting for a
glyph to put it on.
Two guards on the icon map itself, which had none:
- Every entry must name a glyph the installed PrimeIcons actually ships. A
missing glyph renders an empty ring, which reads as "this kind has no icon"
rather than as a mistake, so nobody reports it — exactly how `brush` shipped
broken in the icon picker. The stylesheet is the authority, parsed rather
than mirrored in a list that would go stale on the next upgrade.
- Every kind a canvas producer can emit must resolve to something other than
the fallback circle. That is the assertion that would have caught `injector`.
Three things the canvas could not say that the SPA could.
**$var suggestions were bare.** `collectUpstreamProducers` walks the node
chain and deliberately excludes the point-of-view node, so it can only
attribute vars produced further upstream. In the normal shape — one Context
node carrying most of the modules — nearly every name in the dropdown had no
writer at all, and the rows rendered as a bare list while the SPA showed a
full attribution line for the same names. It looked like the canvas was not
walking the graph; it was, and then discarding the half that mattered.
The node's own modules now produce a matching map, built in the same pass as
the sibling name list so the two cannot disagree about which module owns a
name. Siblings override upstream writers, which is what the engine does, so
the row names the module whose value actually survives. Their tail reads
"this node" rather than a node label, because every sibling would give the
same answer.
Separately, the combine template editor never received producers at all —
`ModuleEditModal` forwarded them only to the derivation modal — so that one
was bare regardless of where the vars came from. Threaded through.
**Nested refs never said whose pool they use.** A ref resolves against this
node's snapshot of a wildcard when it has one, and that snapshot can hold
different options from the library row of the same uuid. Until now the only
way to discover that was to open the hover card. The chip carries a small
marker when the node supplies the pool, and the filter panel's header carries
the matching one, so "this is the node's copy — these counts describe it"
reads the same in both places. The library case stays unmarked: it is the
default, and marking both turns a signal into decoration. Origin is decided by
presence in the node's pool map, which is exactly how `resolvePoolFor` already
picks the winner for the hover card.
**One more unbounded preview.** A wildcard option's value in the pool list had
no line cap, so a paragraph-length option grew taller than the rest of the
pool put together and pushed every other option off the panel. Clamped to
three lines with the full value on hover — with `overflow: hidden`, without
which `-webkit-line-clamp` silently does nothing.
Four things, all in the way of editing a wildcard with a real tag vocabulary.
Escape threw away the edit. The editor pages run a window-level Escape
shortcut that cancels the edit and routes back to the list. It opts out when
focus sits in an `input, textarea, [contenteditable]` — which covers the filter
panel's expression field but NOT its tag buttons, so pressing Escape after
clicking a tag navigated off the page. That is why it only happened sometimes.
The picker now takes Escape in the capture phase and stops it there, so while
it is open the key cannot reach anything else.
The per-option tag menu was clipped. It was `position: absolute` inside
`.wp-editor__body`, an `overflow: auto` scroller, so rows past that container's
edge were simply cut — measured 34px lost near the foot of the page. It is
teleported to <body> now and positioned from the trigger's rect, which is what
every other popover here already does. It re-anchors on scroll and resize
rather than closing: closing was the first attempt and was wrong, because the
browser scrolls a partly-visible button into view as part of clicking it, so
opening a menu near either edge closed it in the same gesture. Once the trigger
leaves the viewport entirely there is nothing to anchor to, and it does close.
Scrolling it moved the page. The menu's list now carries
`overscroll-behavior: contain`, so reaching either end stops there instead of
handing the leftover delta to the editor behind it. Same fix applied to the
filter panel's tag list. The cap and the scrolling also moved off the menu and
onto the list inside it, so the new search box stays pinned while the tags
scroll under it.
Everything is searchable, and the axes fold. 30+ checkboxes in a menu is
not something you scan; the picker gains type-to-filter, and the sub-categories
editor gains a per-axis fold so you can shut the four axes you are not working
on. A folded axis still shows its tag count, so folding never hides the fact
that something is there. The caret is its own button rather than the whole
header, because the header also holds the rename input and making the row the
toggle would fold the group every time you clicked in to edit the name.
The option-tag tests now query the document: teleporting the menu puts it
outside the wrapper's element tree, so `w.get()` cannot reach it.
The panel had an expression field, a reads-as line and a flat chip palette.
Authoring anything real with it meant holding the wildcard's tag vocabulary in
your head, and the two states that matter most were invisible.
The expression is now syntax-coloured: terms in accent, operators in blue,
parens dim, and an undeclared word underlined in red AS you type rather than
after the validator finishes the sentence. A textarea cannot colour its own
text, so the paint is a mirror element beneath a textarea whose glyphs are
transparent; every metric that decides where a glyph lands is declared once
and inherited by both layers, because if they disagree the colours slide off
the characters. The field also wraps, grows and drags — a single line clipped
anything past ~40 characters, and a real expression is longer than that.
The palette is grouped by axis, each foldable, with a search over the tags.
A folded axis still reports "2 used" / "1 negated", so folding never hides
state. Chips take their state from the parsed AST — lit when included, struck
when negated, dashed when the wildcard declares a tag that no option carries —
so the palette stays a VIEW of the expression rather than a second source of
truth for it. Only the tag list scrolls; putting the scrollbar on the popover
would push the expression and Apply out of view exactly when a long list makes
them most useful.
Two states that were previously silent:
- Valid but matching nothing. `skin-tone and pastel` is well-formed over
declared tags; it just happens no option carries both. That applied silently
and you found out at run time with the ref resolving to nothing.
- An unknown term now offers the nearest declared tag, and applying it
rewrites that word in place rather than re-serialising the expression, so a
one-character typo fix does not reformat the line you are writing.
The count now includes the null option and drops it when Exclude null is
ticked. `optionTagSets` carries only non-null options, so the popover
advertised "132 options" while this panel counted against 131, and ticking the
flag changed nothing on screen.
Also: a header naming the wildcard being filtered — a breadcrumb back to the
suggestions on the insert flow, a plain title on chip-edit — with Escape
matching what that header promises. The whole Exclude null row is a click
target, not just the 13px box.
Popover rows gain the same treatment: the glyph sits in a tile tinted with its
OWN kind's colour, since a `$var` can be written by a fixed_values or a combine
as easily as by a wildcard; facts are discrete tiles; and the producer line
keeps the module name separate so it can be highlighted, because that name is
the identifying half of the sentence.
Both popovers rendered one line of text per hit — a name, and for `@` a
trailing "12 opts · a1b2c3d4". That distinguishes entries whose names already
differ, and nothing at all when they don't, which is precisely the case that
sends someone to the popover in the first place. A library here has two
wildcards called `act_plan`; the old rows were byte-identical.
Rows are now built from what the thing actually is:
- `@` rows carry the wildcard's option count, its axes and its tag count,
with the uuid kept as the last-resort tiebreaker for entries that match on
every other fact. A funnel marks rows where Tab opens a filter, shown on
the active row only — on every row it is a column of noise, and the
affordance is unreachable for rows you are not on.
- `$` rows name the writer. The canvas walked a graph so it reads "written by
Style FX · ember-marten" and can honestly say a write "overrides 2"; the
library has no execution order, so the same count reads "2 others bind
this" instead. That distinction is resolved in one place, so the popover
and RefChip's hover card cannot drift into telling different stories about
the same variable.
The header now reports how many entries MATCHED, and says "· showing 50" when
the row cap hid the rest. It first reported `acRows.length`, which is the
post-cap figure — "50 matches" for a query that hit 89. A silent truncation is
how you conclude the wildcard you are looking for does not exist.
Row models live in `utils/suggestion-rows.ts`: pure data-to-data, out of the
2.8k-line editor that hosts them, and directly assertable.
Bundle budget 468 -> 490 KB. The previous bump left 179 bytes free, so every
change since has had to argue with the gate; this one is sized to also cover
the filter panel that follows.
The picker built its rows as `{ value: id, label: name }`, so a library
holding two pools both called "Lighting" — which is what you get, because it
is the obvious name for the indoor one and the outdoor one — rendered two
identical lines with no way to tell which was which. The fields that would
have distinguished them were projected away one computed earlier, where
`filteredItems` narrowed whole rows down to `{ id, name }`.
Rows now stay whole, and each option carries its category, its payload
summary, and — only when the bare name is genuinely ambiguous — a short uuid,
appended last so it reads as a tiebreaker rather than as the row's identity.
The detail comes from `entitySubtitle`, the same function the Import and
Export pickers use, so a row reads the same wherever it is offered.
The builder lives in `utils/entity-select-options.ts` rather than inline in
the view: it is pure data-to-data, and when a uuid appears is worth asserting
directly instead of through a mounted component.
Two fixes in Select itself, both about the same failure:
- `meta` now repeats in the CLOSED trigger. Disambiguating rows only while
the menu is open solves half the problem — pick one of five identical
"Outfit" rows and the trigger collapses back to "Outfit", so the choice you
just made carefully becomes unverifiable again.
- The icon/dot gutter is reserved for every row in a list where any row has
one. Mixed lists rendered a ragged left edge, and that indent reads as a
hierarchy that does not exist. Width is measured off the widest marker
actually present, so a dots-only list does not pay for icon width.
Categories are fetched OUTSIDE the `Promise.all` that loads modules and
bundles. Joining them would let a failure fetching what is purely icon-and-
colour reject the whole batch and leave the runner with an empty module list.
The four histograms put a label, a bar and a count on one row, several rows
deep, with nothing between them. Rows are also variable height — a clamped
label is one line or three — so there is no steady rhythm to help the eye
carry a label across to its own count.
Banding, not highlighting. Two details decide which one it reads as:
- The container's `gap` is gone. With a gap, tinted rows cannot touch their
neighbours, so each one floats as a discrete filled block and the fill
reads as "this row is selected". The spacing now lives inside each row as
padding, so the stripes are contiguous. This is the change that matters;
contrast alone cannot fix a gapped stripe.
- No border-radius, and a negative inline margin matching the card body's
14px so each stripe bleeds to the inner edge. A rounded, inset fill is a
pill, and a pill on a row is the universal shape of selection.
The tint is `color-mix` against `--wp-text`, so it inverts with the theme
for free — verified rendered in both wp-theme-dark and wp-theme-light.
Swept the project for user text rendered with no bound on its size, after the
Test Runner histogram turned a paragraph-length option value into a forty-line
label that pushed every other bar off the screen.
Static analysis flagged 168 interpolation sites, but most are fixed labels or
sit inside a parent that already clips — the useful signal was 54 genuinely
unbounded free-text renders, of which three are reachable today:
* TestRunner `.wp-hist__template` — used by three of the four histogram
types; only the fourth had ever been given `wp-truncate`.
* Templates `.wp-tpl-full` — `max-width` but no height bound, so one long
template pushed every row below it away.
* InjectorRow `.wp-inj-summary__template` — a collapsed one-line summary
that a long template silently stretched.
Each gets the treatment its ROLE calls for rather than one blanket rule:
* histogram label — a preview beside a bar, so a two-line clamp (three for
bundle rows, which show several modules at once) plus `title` for the rest.
One line loses the difference between near-identical option values.
* template detail pane — opened deliberately to READ it, so cap and scroll;
clamping would defeat the point of expanding.
* injector summary — one line is the whole contract, so a hard ellipsis.
Caught while verifying the BUILT css, not the source: a later rule reset
`.wp-hist--bundle .wp-hist__template` to `overflow: visible`, which silently
disables `-webkit-line-clamp` — the clamp would have shipped doing nothing.
That rule exists to let bundle labels wrap, which `white-space: normal` already
handles, so it keeps the wrapping and drops the overflow reset.
Two follow-ups to the grip.
**Shape.** The replacement grip was a filled square of hatching, which read as
a button. Clipping it to a bottom-right triangle puts the stripes parallel to
the hypotenuse — the shape the browser's own resizer draws, and the one users
already recognise as "drag me".
**Floor.** The canvas fixed-values rows never declared a `min-height`, so the
computed value was `auto`, which `parseFloat` turns into NaN and the old
`|| 0` turned into a floor of zero. With the native resizer that was masked by
the browser's intrinsic minimum; taking it over exposed it, and the rows could
be dragged away to a sliver with no way to see what you were editing.
Fixed at both levels, because they answer different questions. `.row__value`
now declares `min-height: 28px` — CSS stays authoritative about what a given
field's floor should be. `useGrowableField` additionally falls back to a hard
28px whenever CSS declares nothing usable, so a future caller that forgets can
not reach zero either.
Your detail — "it gets stuck when the bottom edge touches the first character"
— was the box reaching one line, i.e. its `min-height`. Same fight as the
`max-height` cap fixed in the previous commit, at the other end, and the reason
three earlier attempts all missed it.
The native `resize` computes `startHeight + (pointerY - startY)` from an origin
it captures at pointerdown, and clamps to nothing. Drag past a limit and that
sum keeps running while the rendered box stays pinned, so dragging back moves
nothing until the invisible total walks all the way home.
Measured, collapsing past a 34px floor then expanding:
native resize, floor 34px ........ 13 / 23 frames dead
native resize, floor lifted to 0 . 10 / 23 (intrinsic minimum remains)
rewriting style.height each frame 13 / 23 (browser ignores it)
own grip, clamped ABSOLUTE math .. 13 / 23 (input already accumulated)
own grip, incremental delta ...... 0 / 23
Nothing outside the resizer can fix it: writes to `style.height` are discarded
because the browser recomputes from its own origin, and clamping the result
does not help when the accumulated input is what overshot. So the native
resizer is gone, replaced by a grip that applies each move's DELTA to the
current height and clamps to the CSS floor. No history, nothing to unwind — the
first pixel back off a limit moves the box.
Verified on the live SPA field with the reported sequence (scroll to the end,
over-collapse, expand): 0 / 19 dead frames.
The grip sits in the corner the overflow fade already leaves clear, and is
drawn like the native one it replaces. Also removes the `clampInlineHeight`
helper from the previous commit — disproven by the table above, and its
docblock claimed a fix it did not deliver.
Measured this one instead of guessing at it. A real Playwright drag on a
capped field versus an uncapped one, sampling height against pointer position:
capped down: 60 70 … 190 192 192 192 192 192 192 192 192 192 192 192
up: 192 192 192 192 192 192 192 192 192 192 192 190 180 …
frozen while dragging up: 10 / 25 frames
uncapped frozen: 0 / 25
`max-height` and `resize` fight each other. Drag past the cap and the inline
height keeps climbing while the rendered box stays pinned; drag back and
nothing moves until the inline value falls under the cap again. That dead zone
is the reported "gets stuck, then starts working", and it bites exactly AT the
cap — which is also where the overflow fade appears, which is why the fade kept
looking like the culprit.
It was never the fade, the pointer events, or the ResizeObserver. My three
previous attempts all treated symptoms.
The cap exists to stop AUTO-grow eating the screen; a deliberate drag is the
user overriding that, so it now yields. On a pointerdown in the grip zone the
current rendered height is pinned and `max-height` is dropped — pinning first
because removing the cap from an `auto`-height box would otherwise let it leap
to full content height the moment the handle is touched. Grip-zone detection
keeps a plain click in the text from pinning the box and killing auto-grow.
Same harness re-run against the fix: 0 / 25 frozen frames, tracking identical
to the uncapped control.
Also restores live grip-follow. Deferring it to pointerup was part of the
previous wrong theory and just made the field slide off-screen for the whole
drag; scrolling by the overshoot moves the element up by exactly that much,
landing its bottom edge where the pointer already is.
The drag still seized the moment the fade appeared, on both targets. The fade
was the tell, not the cause: crossing the overflow threshold is simply when the
observer callback starts doing work, and the work was the problem.
Two things ran synchronously inside the ResizeObserver callback:
* `updateOverflowHint` read `scrollHeight` / `clientHeight` and wrote a
reactive ref, so every frame of a resize dirtied layout inside the very
callback the browser uses to report layout. That is the ResizeObserver-loop
case: the engine throttles and skips delivery for a frame, which the user
feels as the drag locking up until they release and re-grab.
* `followGrip` scrolled the container mid-drag, sliding the element out from
under a pointer the browser anchors its resize tracking to. My own fix from
the previous commit, adding a second stall on the way out.
The callback now only schedules; all measuring, state writes and scrolling
happen in the following animation frame. Grip-follow additionally waits for
`pointerup` — the field still ends up on screen after a drag past the fold,
without anything moving while the handle is held. Listeners sit on `window`,
since a resize drag routinely ends with the pointer outside the field.
The regression test asserts the invariant that actually matters rather than the
symptom: with rAF stubbed out, invoking the observer callback must read layout
zero times.
Three defects in the same field, two of which never reached the canvas because
I fixed them in the wrong component. `RichTextInput` and the fixed-values
`ValueRow` had each grown their own copy of "capped, resizable, auto-growing
text field", and the copies had diverged.
**Auto-grow stomped the manual resize.** `ValueRow.autosizeValue` wrote
`height = scrollHeight` on every input AND on every external value change, so a
box the user had dragged smaller sprang straight back open on the next
keystroke. That is the reported "hold it to collapse, it gets stuck, then
starts working" — the drag was working, the auto-fit was undoing it.
`useGrowableField` now records that the user has taken control and stops
auto-fitting from that point on, distinguishing its own writes from a drag with
an `autoDriven` guard so the first fit does not lock the field immediately.
**The fade hid the grip.** The bottom hint band is exactly as tall as the
native resize handle and sat right on top of it, so the handle was invisible:
aim, miss, re-grab. It is `pointer-events: none`, so it never blocked the drag
— it hid the target. The band now stops 16px short of the right edge. Fixed in
both components; previously only `RichTextInput` got it, which is why the
canvas fixed-values modal still looked wrong after a rebuild.
**Nothing followed the grip off-screen.** Dragging a field taller than the
space below it moves the box, not the pointer, so the handle slides out of view
and the drag goes blind. The shared helper scrolls by exactly the overshoot,
pinning the bottom edge to the viewport. Walks computed `overflow-y` for the
real scroller rather than assuming the page scrolls — on the canvas it does
not, and `window.scrollBy` would have been a no-op. Deliberately not
`scrollIntoView`, which this project bans for moving every ancestor.
Extracted rather than fixed twice: a third copy was about to be written for the
sub-category filter's expression box.
Groundwork for the sub-category picker redesign. The palette's chips need to
show what the expression currently does with each tag — and that has to be read
from the parsed AST, not from what the user clicked, or the chips desync the
moment an expression is typed, pasted or hand-edited. The palette is a view of
the expression, never a second source of truth for it.
`collectTermPolarity` walks the AST tracking `not` parity, so `not (warm or
cool)` marks both negative and `not (not warm)` comes back positive. A tag
appearing both ways lets positive win: the chip reads as participating, and the
negation stays visible in the expression text.
`livingTags` separates DECLARED tags from tags any option actually carries.
A declared tag no option uses is offerable and guaranteed to match nothing —
the exact shape of the nested-ref bug — so it gets its own `dead` state rather
than looking selectable. It does NOT outrank `in`/`negated` though: once a tag
is in the expression the chip shows that, because the zero-match warning
already covers the consequence and two alarms for one mistake is noise.
`nearestTerm` backs the validator's did-you-mean with a length-scaled edit
budget — `colde`→`cold` yes, `magenta`→anything no. A wrong guess is worse
than no guess.
Scrolling inside a capped, resizable field and reaching either end let the
remaining delta chain to the ancestor, so the modal — or the whole editor page
— lurched while the pointer was still over the field. Worst at the TOP edge,
where a small upward flick past the first line jumps the page.
`overscroll-behavior: contain` on every field that both caps its height and
scrolls: RichTextInput's `--wrap` and `--multi` hosts plus the nine other
resizable textareas across the assembler, cleaner, combine, fixed-values,
push-to-library, injector, bulk-add and import surfaces.
Applied per-rule rather than as one `textarea { … }` global: an unprefixed
element selector is exactly what `pnpm check:css-isolation` blocks, and on the
canvas it would reach into ComfyUI's own DOM. The pattern already exists in
five places (SelectionToolbar, UnmetDepsDialog, PickerSection…) — this brings
the input surfaces in line with it.
Two halves of the same gap, left over from the nested-ref fix.
**The sub-category picker offered the wrong pool's tags.** Its checkbox list
came from `buildWildcardRefData(catalog)` — a library fetch — while the engine
filters the ref against THIS node's snapshot whenever the uuid is a module
here. On a drifted snapshot the picker listed a tag no option in the running
pool carries: pick it, and the ref resolves to nothing, with the checkbox list
itself being the thing that misled you.
`overlayContextPools` applies the same precedence `resolvePoolFor` already
gives the hover card, so card, picker and engine now describe one pool.
`ContextPool` grew the declared vocabulary (`subCategories`, `tagGroups`,
`hasNull`) the picker needs — distinct from `tagSets`, which is what options
actually carry; a declared tag no option uses is offerable but matches
nothing. `uuidToName` is deliberately NOT overlaid: it holds the variable
binding a chip labels itself with, not a display name.
Only the derivation modal needed it. The constraint modal already builds from
node modules, and the SPA editors have no node, where the overlay is a no-op.
**"Matched no options" told you nothing.** The engine emitted
`ref_subcategory_empty_pool` all along, but `WARNING_LABELS` had no entry, so
Debug rendered the raw slug — and even read, the message could not distinguish
a wrong filter from a right filter aimed at a stale copy. That ambiguity is
exactly what made this bug a hunt.
`_stamp_pool_provenance` records, per catalog entry, whether the pool came
from this node or the library, plus the library's option count when a node
copy has drifted. The warning now reads:
@{05c54db9:test} matched no options — searched this node's copy
(1 option); the library now has 2
with `pool_origin`, `pool_total` and the pool's `available_sub_categories` in
`detail` — the tags it DOES offer being the whole explanation. Labels added
for the two nested-ref warnings and `ref_out_of_surface`.
Provenance is runtime-only: `__wp_catalog__` is stripped at the socket and the
workflow-embedded snapshot is built elsewhere, so neither key reaches saved
JSON. The extra reads are one per embedded wildcard on an already-open
connection, and the stamping never raises — diagnostic garnish must not take a
graph run down.
Follow-up to the pool-source card. Naming the library as the source is honest
but leaves the obvious question unanswered: the pool is right there on the
canvas, in a node the user can see, so why isn't the ref using it?
Because a `@{}` ref only ever sees its OWN node's modules plus the library —
`__wp_catalog__` is rebuilt per node and is not among the cross-node internals,
so a catalog never crosses the socket. That is the exact opposite of how
`$vars` behave, which is what makes it a trap: move a pool one node upstream
and the ref silently switches to the library with nothing to explain it.
The card now says "also in dusk-marten — other nodes don't share pools" (or
"N other nodes" past one), in info blue rather than the drift amber, because
nothing is wrong — the ref is behaving correctly and the user simply cannot
see why from anywhere else.
`findWildcardHomesElsewhere` walks the whole graph, subgraphs included: a node
holding the uuid off to one side is exactly as irrelevant to the ref, and just
as confusing to look at. It is injected as a FUNCTION and called once per card
open rather than exposed as a reactive map — the walk is graph-wide and only an
open card ever reads the answer, so polling it on the 400ms cadence would burn
work nobody reads.
Wired through the same reader-prop path the other graph walkers use
(`wildcardHomesReader` in the mount glue), so the component stays mountable
headless with no graph.
The exclusion test — the asking node must not report itself, since its own
modules ARE the ref's pool — was checked to FAIL when the guard is removed.
Hovering a chip raised two popups at once: the chip's own hover card, and the
native tooltip belonging to whichever container it sat in — the derivation
rule/branch summaries put the full row text on a `title` so a clamped value
stays readable. They landed on top of each other.
The chip only rendered a `title` when it was filtered, so an unfiltered chip
had none and the browser walked up to the container's. An EMPTY title is not
the same as no title: per HTML it means "this element has no advisory
information" and stops that walk. So the chip now always carries `title=""`.
Nothing is lost — the filter's "reads as" and the excluded-null note already
render inside the hover card, so the native tooltip was duplicating them. The
seven tests that asserted the old title now assert the card instead, which is
where a user actually reads it.
The card read the live library unconditionally, but the engine resolves a
nested ref against the Context node's own frozen snapshot whenever the uuid is
also picked there, and only falls back to the library otherwise. So a node
holding a drifted snapshot reported the library's numbers while the graph ran
the snapshot's — "the SPA says 1 of 11 options match, the graph says 0 of 10".
Both counts were right about a different pool, and nothing said which, so
neither could be checked against what actually happened.
`extension/context-pools.ts` mirrors the engine's precedence: the node's pool
wins when present, the library answers otherwise. The card now counts against
whichever won, and names it — "pool: this node · Pose pool" vs "pool: library".
When the loser disagrees it adds "library has N — refresh to use it", so a
differing number is explained rather than hidden; silently showing only the
effective pool would have left the original confusion intact, just quieter.
Disabled modules are deliberately KEPT in the map. Disabling a module stops it
binding its own `$var`; it does not remove the pool the engine still resolves
nested refs against, and dropping it here would make the card disagree with the
engine in precisely the case where a user is already unsure where a value came
from.
Wired by provide/inject rather than a seventh threaded prop: RefChip sits six
components below the widget (row → edit modal → section → value chips →
preview → chip) and not one layer between has any business knowing about
option pools. Absent injection — the SPA library views — every ref reads the
library, which is correct there since there is no node.
The three tests that pin the precedence were checked to FAIL when the context
branch is disabled.
Type a space after a `$style_fx` chip, delete it, and the caret settles flush
against the chip's trailing edge — which reopened the suggestion popover even
though nothing was being filtered and the chip already existed. Both surfaces.
A committed chip serialises back into raw text as exactly what the user would
have typed to create it, so `probeAutocomplete` — which works on raw text —
scans back from the caret, finds the chip's own `$`, and reports a live query.
From the string alone the two cases are identical; only the DOM distinguishes
them, because a chip is an atom element and in-progress text is not.
`chipRawSpans` carries that distinction into the raw coordinate space by
measuring each rendered chip with the SAME `childRawLen` the caret mapping
uses (hoisted rather than copied — two measurements of the same thing drift).
A trigger landing inside one of those spans suppresses the popover.
Surfaced by the earlier deletion re-probe fix: before it, deletion never
re-probed at all, so this path could not fire. The regression test asserts
zero suggestion rows after the exact reported sequence, and was checked to
FAIL (2 rows) with the guard disabled — otherwise it proves nothing.
Two previous attempts solved the wrong problem. The rule/branch summaries were
forced onto a single line — first with a gradient mask, then with
`text-overflow: ellipsis` — and both destroyed the thing that made the row
useful. The mask faded every pixel including the ref chips; the ellipsis
version was worse still, because the children were `inline-flex` and an
inline-flex box is ATOMIC: the browser cannot clip through it, so a value that
did not fit whole was dropped entirely and replaced by a bare `…`.
The layout was never the problem. Wrapping is what lets a four-chip branch
show all four chips, and that is the readable, wanted behaviour. The only
actual complaint was that one paragraph-length override ran to dozens of lines
and pushed the rest of the modal off screen.
So the layout goes back to exactly what it was (`display: flex; flex-wrap:
wrap`), byte for byte, and the cap moves to the VALUE: `clampPreviewValue`
cuts at 120 characters. Normal rows are untouched — every chip value in a real
derivation is well under the limit — and only the outlier gets cut. `title`
still carries the full text on hover.
The clamp never splits a `@{...}` token: half a token renders as literal text
rather than a chip, which reads as corruption rather than truncation, so a
token that would straddle the limit is dropped whole.
A nested ref in a derivation resolved to empty whenever the wildcard it points
at was not ALSO picked into the same Context node — no matter what the live
library held, and no matter how the ref was filtered.
Root cause is discovery, not resolution, which is why it looked like a
resolution bug. The catalog is synthesised from wildcard modules only, and
`walk_transitive_refs` was seeded from those uuids and followed refs found in
wildcard payloads only. A `@{uuid}` is legal on other surfaces too — most
importantly a derivation rule's action value, and the per-instance
`action_value_overrides` the edit modal writes when a user retargets a branch
on the canvas. Neither was ever scanned.
So such a ref's target reached the catalog only by coincidence: when the user
happened to also have that wildcard picked in the node. Removing it — a
reasonable thing to do once a derivation references it by uuid — dropped it
with nothing to put it back, and the ref became `unknown_ref` → empty string.
`ref_seed_uuids` (engine/modules/snapshot.py) now collects refs from every
module's `payload` AND `instance`, and both catalog builders seed the walk
with them. The instance half matters on its own: a canvas-side retarget lives
there and is not part of the library payload the walker would otherwise see.
Both builders are fixed, not just the graph one. `wp_api/preview.py` had the
same seeding, so the SPA preview resolved against a pool the engine would not
use — that is precisely how "the SPA says 1 of 11 options match, the graph
says 0 of 10" arose. Fixing one and not the other would have left the two
disagreeing in the opposite direction.
Embedded-first precedence is unchanged: a picked module still shadows the
library, so drift detection and workflow reproducibility hold. This only adds
targets that were previously absent entirely. An unresolvable uuid still warns
and resolves to empty rather than raising.
The gradient mask was the wrong tool. `text-overflow: ellipsis` is ignored on
a flex container, so the previous fix reached for `mask-image` to signal "cut
off" — but a mask fades every pixel under it, chips included, so the tail of
each summary went unreadable rather than merely clipped. The user could no
longer see the ref chips that are the most informative part of the row.
Switching the summary to `display: block` puts it in an inline formatting
context, where the browser draws a real `…` at the clip point and leaves
everything before it at full opacity. Children become `inline-flex` so they
still sit on one line, with a margin standing in for the flex `gap`.
Four things the user caught in one screenshot pair.
**`brush` is not a PrimeIcons glyph.** It rendered as an empty grid cell, which
reads as a layout bug rather than a typo — an unknown `pi-` class produces no
warning and no error, just nothing. Replaced with `sliders-h` ("tune the look";
the set has no brush/paint glyph at all, and `palette` already carries "art
style").
The durable part is `icon-catalog.ts` + its test: the curated list moved out of
the SFC so a spec can check every name against the installed `primeicons.css`,
which is the authority. Parsing the stylesheet beats hard-coding a name list
that would go stale on the next PrimeIcons bump. Verified live afterwards —
all 40 cells resolve a glyph.
**Category icons sat above their label in Select options.** The option row is
`align-items: flex-start` (deliberate — a 2-line label must keep the tick at
the top), so a 14px icon aligned to the TOP of an 18.75px label box rather than
to its first line. Measured 2.38px high before, 0 after. Fixed by centring the
icon and the colour dot against one line box, published as
`--wp-select-line-h` and used by both the label's `line-height` and the icon's
`height` — a `1.5em` on each would have meant two different heights, since the
icon runs at 12px and the label at 12.5px. Scoped to the option: the trigger
row is `align-items: center` and would be thrown off by the same rule.
**The icon-picker trigger jumped when a glyph was picked.** An em-dash and an
icon have different advance widths and baselines; both now share one fixed
16px slot. Grid cells got `line-height: 1` for the same reason — the icon
font's line box is taller than the mark and pushes it off centre inside an
otherwise centred flex cell.
**Import quick-select presets had no icons** where Export's do. Wiring them up
exposed that `category` had no row in `KIND_ICON_MAP` and was falling through
to the generic `pi-circle` on BOTH tabs; it now maps to `pi-bookmark`, matching
the Categories page's own empty state.
Categories have carried an `icon` column since the picker landed, but only the
Categories page ever showed it. Everywhere else a category still reduced to an
8px colour dot — which stops disambiguating anything once a library holds more
categories than there are hues a user can tell apart at that size.
Icons now render in the category dropdowns (filter + bulk-assign), in the row
chips on every list view, on the dashboard, and in both import/export pickers.
The icon replaces the dot rather than sitting beside it, tinted with the
category's colour so nothing is lost; a category with no icon still shows the
dot exactly as before.
Getting there meant collapsing three sets of copy-paste, because each would
otherwise have needed the same edit applied by hand N times — the failure mode
being that one gets missed and quietly renders the old way:
- `utils/category-options.ts` replaces thirteen identical
`categoryStore.items.map(...)` expressions across nine files. The two
variants differ only in the null choice ("All categories" vs "(none)"), so
that is the only parameter.
- `components/CategoryChip.vue` replaces ten hand-written
`<span class="wp-cat-chip" :style="catChipStyle(...)">` blocks.
- `ui/select-types.ts` holds `SelectOption`, which lived in `<script setup>`
and so was invisible to plain `.ts` importers (they see the `*.vue` ambient
shim, whose only export is the component). Select.vue re-exports it, so every
existing `from "./Select.vue"` import keeps resolving. ModuleListView's
hand-mirrored copy of that shape is gone with it — the copy had already gone
stale against `icon`.
Also reorders the Categories page: icon and colour now come before the name, in
the form and in the table. They compose the chip the user is building, and
left-to-right now matches how the chip actually renders.
The export picker grew a search box and subtitle lines when a 261-item
library made it a scroll-hunt. The import picker had the same problem the
moment anyone re-imported a whole-library export: duplicate display names,
and no way to jump to a known id.
Both sides now share the machinery instead of carrying two copies:
- `picker-subtitle.ts` — the per-kind detail line (`$outfit · 12 options`,
`3x4 matrix`, `2 modules · 1 nested`). Extracted from ExportTab verbatim.
Typed structurally rather than against `api/types`, because Export feeds
it live library rows while Import feeds it migrated payload rows that are
shape-validated but never narrowed to those interfaces; both satisfy the
loose shape, so neither side needs a cast. Adds `entitySubtitle(kind, row)`
for Import, which walks all 8 buckets in one v-for and so cannot pick the
right function at the call site the way Export's per-bucket builders can.
- `PickerSearch.vue` — the box itself. Presentation only; each host owns its
query and decides what "matches" means for its own rows.
Filter scope follows the same split Export settled on, because it is a
correctness question rather than a cosmetic one:
- section select-all acts on VISIBLE rows, so deselecting a filtered
section cannot silently drop picks the user can no longer see;
- quick-select presets stay unfiltered — "select all wildcards" means the
kind, not the current search result;
- a section with matches force-opens, since a hit hidden behind a
collapsed header reads as no hit at all.
Test fixtures for the new specs nest `variable_name` / `options` under
`payload`, matching what the server actually exports — `_row_to_module`
nests them and every migrator preserves that nesting. A first draft
invented a flat shape and produced empty subtitles.
The truncation fix did not work. Setting `white-space: nowrap` on
`.rule-head__summary` was necessary but not sufficient: the value chips render
through RichTextPreview, which declares `white-space: pre-wrap` on `.wp-rtp`
and `.wp-rtp__text` THEMSELVES. A direct declaration beats what those elements
would inherit from an ancestor, so the paragraph kept wrapping to hundreds of
lines. `ui/Select.vue` already carried this exact workaround for its trigger
label; the derivation summaries needed the same `:deep(...) !important` push
down the tree.
Diagnosed from a live DOM dump rather than assumed: the `title` attribute
added by the previous commit was present in it, which ruled out the stale-
bundle theory I had reached for and pointed at cascade instead.
Also accents the context-menu action that matches the row's current state, so
the menu points at the fix for the badge the user just saw:
missing -> Push to library (re-link or add)
drifted -> Reset / Refresh from library (pull the newer version)
modified -> Push to library (save local edits up)
States are ranked so exactly one library action accents — a row can be several
at once, and two competing accents say nothing. Each accented item also gains
a subtitle naming the reason.
Reported: a bundle showed MODIFIED while the push modal said it wasn`t linked
to any library entry. Modified against what?
`isBundleMissingFromLibrary` early-returned false when the bundle had no
`library_id`, so MISSING only ever meant "had a link and it is gone" — an
unlinked bundle could not raise it. That left MODIFIED as the only badge, and
MODIFIED compares the children against `snapshot_fingerprint`, a baseline
captured from a library entry that is not there. It was diffing against a
ghost. Same class of gate as the re-link bug: a check that assumed the
library_id case was the only way to lose a link.
MISSING now covers both shapes — a `library_id` the poll no longer knows, and
no `library_id` at all. MODIFIED is suppressed for the second: with no insert,
there is nothing for the children to have diverged from. The deleted-entry case
keeps MOD, where the local snapshot IS a real baseline.
Badge tooltip and the context-menu subtitle stop asserting the entry was
DELETED — an absent id reads identically whether it was deleted, re-imported
under a new id, or arrived in a shared workflow. They now state the observable
fact and name Re-link before save-as-new, which is the recovery the old copy
steered users away from.
Bundles already had a re-link path — my earlier claim that they were scoped
out was wrong, twice: I read a comment about bundle FINGERPRINT VERIFICATION
during import as if it covered re-link. What they actually had was the same
gate modules had, requiring a stored `inserted_at_hash`, so a bundle that lost
its link had nothing to match on.
`computeBundleFingerprint` cannot serve here: it folds in per-instance `_uid`,
`meta` and `instance` to answer "have MY children been edited since insert", so
a fresh insert never matches the library row it came from. Adds
`bundleContentKey`, the ordered list of children`s `(type, payload_hash)` —
only what survives an insert, so a workflow bundle and its library row agree.
Child order is significant (a bundle IS an ordered range) and a hash-less child
still occupies a slot rather than vanishing from the shape.
Gate widened to `needsRelink` to mirror the module modal, and the "deleted
upstream" note replaced with the observable fact plus a pointer at Re-link,
in an informational rather than danger tone.
Re-link was gated on the row carrying a `payload_hash`. A row without one was
read as "never library-tracked, nothing to re-link to" — true for a module
authored in the widget, wrong for the cases that actually bite: a workflow
shared by someone else, or a row whose stored hash was lost. Those still
correspond to a library entry, and the user was pushed to "Save as new entry",
which is how duplicates got made.
`moduleFingerprint` cannot help here — it takes `payload_hash` as an INPUT, so
it says nothing about a row missing one. Adds `localPayloadFingerprint`, which
hashes the payload CONTENT instead. It deliberately does not mirror the
engine`s hashing: both sides are computed locally from live payloads, so
self-consistency is the only requirement and cross-language canonicalisation
never enters the picture. Object keys are sorted recursively (JSON key order
is not meaningful and payloads round-trip through APIs that reorder them);
array order is preserved, since option and rule order IS meaningful.
Matching now runs strongest-signal-first: server `payload_hash`, then the
local content key (hash-less drafts only), then name. A present-but-different
hash still reads as "content differs" — a stale content key must never upgrade
a real difference to identical. The cross-kind gate is unchanged. Matches made
without a server hash are tagged `matchedByContent` and labelled
"identical (content)" so the UI never implies the authoritative hash agreed.
The note also stops asserting a cause it cannot know. "has been deleted
upstream" was one explanation among several that look identical from here; it
now states the observable fact — the id isn`t in the library — and points at
Re-link when a match exists, in an informational rather than danger tone. Red
plus a "Save as new entry" recommendation was actively steering users into the
duplicate.
Bundles still have no re-link path; that is the remaining half of this issue.
Canvas var chips gained producer attribution; the SPA still said only
"binds at runtime". It has no chain to walk, but it does have the catalog —
and with several near-identical modules binding the same name, "which module
is this?" is exactly the question the library editors raise.
Adds `buildLibraryVarProducers`: the same per-kind extraction
`collectLibraryVarHints` already does, but keeping module identity instead of
deduping it away. A module that binds one var from several places — a
derivation with three branches writing `$pose`, a fixed_values sheet with a
repeated row name — counts ONCE, otherwise the card claims three modules bind
a name only one does.
Deliberately no ranking. The library has no execution order, so which producer
wins depends entirely on how they are later arranged in a Context node. The
card names the first and reports how many others share the name, via a
`siblingLabel` that swaps the canvas`s "overrides N earlier writes" for
"N other library modules bind this name". Same reason `nodeLabel` is now
optional: with no graph there is no node to name, so the clause is omitted
rather than filled with something invented.
Wired into the Derivation and Combine editors, the two SPA surfaces with
`$var` chips.
The var-chip hover could only confirm a name existed. With near-identical
modules bound to the same var across several nodes, that is not actionable —
the question is always WHICH one wins.
Adds `collectUpstreamProducers`: the same chain walk and last-write-wins
ordering as `collectUpstreamKinds`, widened to keep identity instead of
discarding it. Covers all three producer sources — WP_Context modules,
WP_ContextInjector rows, and the WP_ContextLoop iteration vars (`$name` +
`$name_total`). Muted / bypassed nodes are skipped, matching runtime.
Node identity follows what each node actually has: WP_Context nodes report
their stable `adjective-noun` codename, the same one their header shows;
the Injector and Loop have no codename scheme, so they use a user-set title
and fall back to a plain kind label.
The card now reads "wildcard · Outfit · in dusk-marten" with the module id,
and adds two states worth surfacing: "overrides N earlier writes" (runtime is
last-write-wins, so it names the winner and says others exist) and "internal —
stripped from the final prompt", which is the most confusing state a var can
be in.
`graphAware` is an explicit prop rather than inferred: a graph-aware host that
finds no writer must say "no upstream producer", while the SPA — which has no
chain to walk — must not make that claim at all.
Raises the bundle budget 461 -> 468 KB. Approved standing: the maintainer
asked for the budget to move rather than features to be trimmed to fit.
Rule head + branch summary: the two-line max-height clamp stopped the modal
blowing out but sliced the last line through the middle, which read as broken,
and there was no way to see the rest. Now a clean single line with a fading
trailing edge (flex containers ignore `text-overflow`) plus a `title` carrying
the full plain-text rendering — `branchSummaryText` / `ruleSummaryText`.
Hover cards moved to their own tier (10030) above the popover tier (10020).
Raising popovers earlier put dropdown menus ABOVE these cards, so an `@ref`
chip inside a constraint-exception Select option had its hover card drawn
underneath the very menu it belongs to. A chip can live inside a popover, so
its card has to clear it. Applies to RefChip and PairBadge.
Select option rows now wrap to two lines instead of clipping at one. An
unscoped `white-space: nowrap !important` was forcing single-line rich content
in the menu, which cut exception values — a phrase plus a nested `@ref` —
exactly where they stop being distinguishable. The trigger keeps its
single-line clip: it has a fixed height and wrapping there blows up the row.
Fixed values: Enter inserts a newline again. Swallowing it was parity with the
single-line `<input>` this replaced, for its own sake — the engine stores the
value verbatim, multi-line round-trips, and the modal saves on Cmd/Ctrl+Enter,
so plain Enter was free all along.
Update dialog: release bodies end with a `<details>` block holding the raw
per-commit list. GitHub collapses it behind a click; `normalizeReleaseHtml`
unwrapped it inline and dumped every commit message into the preview, burying
the human-written "What`s new" the dialog exists to show. It is now stripped
before render, along with the `---` that introduced it. Matched on the summary
text rather than stripping every `<details>`, so a future collapsible still
unwraps as before. The dialog already links out to the full changelog.
Derivation rule previews: a rule head and a branch summary are PREVIEWS, but
neither was clamped, so one paragraph-length action value wrapped to hundreds
of lines and pushed every other rule, the runtime row and the footer buttons
off screen. Capped at two / three lines; the expanded body and the override
inputs still hold the full value.
Overflow fade: it only appeared once a field was typed into — never on a box
the user can scroll but not edit. A mount-time measure runs before the
max-height cap applies, reads `scrollHeight === clientHeight`, and concludes
there is nothing below. Measurement now happens after layout via rAF, and a
ResizeObserver keeps it honest across manual resizes and reflows. Applied to
both RichTextInput and the ComfyUI fixed-values row, and the fixed-values row
gained the fade it was missing entirely.
Dead CSS: drops the `.wp-tpl__menu*` selectors — Combine`s TemplateSection has
no insert menu, so they matched nothing (`.wp-tpl__reset` IS still live and
stays). Removing them exposed that their `.ibm__menu*` partners were only
passing `check:css-isolation` because a wp-prefixed selector shared the rule,
so those are now `.wp-ibm__menu*` and the check passes on its own merits.
The "more below" fade read wrong on both counts it was meant to get right.
Its 1px side insets left a visible seam down the left edge where the band
stopped short of the border, and blending toward the field background painted
an opaque strip that washed out the line underneath instead of hinting at it.
Now full-bleed (`inset: auto 0 0 0`), clipped by the wrapper`s own overflow +
radius so there is no seam, and the gradient runs to a TRANSPARENT accent so
text keeps showing through. A 1px inset accent line along the bottom does the
actual attention-getting, which lets the wash stay light.
Derivation branch headers (SPA) now toggle from anywhere on the bar. The
chevron was a ~14px target on a full-width header that already looked
pressable. Clicks originating inside a control are ignored, so the chevron
does not double-toggle and the enable checkbox / delete action keep their own
behaviour.
Templates: drops the Template column. A template string is a whole prompt
skeleton, so a table cell only ever showed a truncated fragment while stealing
the width the name needed; the row expansion already shows it in full. The
column now carries length + distinct `$var` count.
Nav: Wiki loses its sidebar entry — it duplicates Documentation`s content on
GitHub and sat directly above View Source. It now lives at the foot of the
Documentation view`s own nav. "Report an issue" becomes "Feedback & support",
opening a modal that offers Discord (noted as faster) and GitHub, since most
feedback is a feature request rather than a bug. Discord also gets a permanent
topbar icon.
Export: sections with search matches auto-expand — a filtered but collapsed
section gave no clue whether the query had found anything. Every entity kind
now carries row detail, not just wildcards: values / rules / matrix size +
exceptions / children + nested / template length. Combine reads `output_var`
and `input_vars` (an earlier guess of `output_variable` matched nothing, so
combine rows showed nothing at all). Detail is right-aligned in the name
column so it forms one scannable run. Kind presets carry their kind glyph.
Constraints: source/target dropdown meta gains tag + axis counts — that IS the
matrix about to be built, so the grid size is worth knowing before picking.
Inputs: max auto-grow drops from 40vh to 12rem (wrap) / 14rem (multiline) —
40vh let one field eat half the viewport before it scrolled. ComfyUI
fixed-values gains the manual resize handle it was missing, and the SPA
derivation value fields gain `wrap`, so both match combine/derivation
behaviour. Adds a restrained accent-tinted bottom fade when a capped box is
hiding content below the fold.
Wildcards (SPA): per-option tag chips cap at 4 behind a `+N`, mirroring the
canvas OptionRow, and the Sub-Categories section collapses via a `+`/`x` in
its header with a tag/axis count while shut. A fully tagged wildcard pushed
the options table off screen.
Select: hover titles on the trigger and option rows, so a value clipped by a
fixed-width trigger is still readable — constraint exception sources run long.
Two separate defects, both making a visible dropdown unusable.
Scrolling closed the list. `onWindowScroll` was a capture-phase listener on
window that closed the popover on ANY scroll — including scrolls originating
INSIDE the popover. So wheeling over the list closed it, and dragging its
scrollbar closed it mid-drag, leaving a half-typed reference behind. It now
ignores scrolls inside the popover, and a genuine outside scroll re-anchors
via `positionPopup` instead of closing: losing an in-progress token because
the page moved is a worse outcome than following the input. Matches what the
injector menu and VarAutocompleteInput already do.
Popovers rendered behind modals. Every teleported popup sat at z-index 9999
while modal overlays run from 9999 (ModalShell) to 10010
(InjectorBindingModal). At equal z-index the popover won only on DOM order,
so inside any 10000+ modal it was buried — the reported "injector ref
dropdown appears behind the modal". Moves the whole popover tier to 10020:
the autocomplete popover, the shared `.ibm__menu` / `.wp-tpl__menu` insert
menu, the subcategory filter picker, `ui/Select`, and IconPicker.
Also: the Pool collapse chevron was a 9px glyph with no hit area, so nobody
could tell it was pressable — now an 18px target with a hover box. And the
seed-list modal goes 486px to 560px, since its toolbar and per-row toggles
were being squeezed into near-square boxes to fit.
Reported repro: type `@act` (4 matches), narrow to `@act_` (2), delete the
`_`, and `@act` still shows 2. The list never followed a deletion, on either
surface.
Backspace and Delete both `preventDefault()` and perform the deletion
themselves via `deleteRawRange`. Suppressing the native delete means no
`input` event fires — and `onHostInput` is the only other caller of
`refreshAutocompleteFromHost`. So `acQuery` kept its pre-deletion value and
`acItems`, computed off it, stayed frozen at whatever it had narrowed to.
That is also the real cause of the earlier "type something unmatched and you
must clear the whole field" report: the field was fine, the list was stale.
Both delete branches now re-probe. The call sits in a SECOND `nextTick`
because `restoreCursorAtChar` ends with `host.focus()` and `onHostFocus`
schedules its own tick that can reposition the caret — probing in the first
tick reads the pre-settled caret at offset 0, the probe returns null, and the
popover closes instead of re-filtering. Verified: probing one tick earlier
left the list empty where an equivalent input event produced 3 rows.
Also reverts the earlier partial-brace / space handling in
`probeAutocomplete`. That was built on a misreading: `@{uuid#name}` is an
internal serialisation the user never types, wildcards are addressed by
variable binding rather than display name, and a space is the settle
delimiter that commits a chip — so neither is a valid query shape and the
bare-identifier scan was already correct.
The 60s freshness window was the only thing invalidating cached snapshots, so
after editing a wildcard in the SPA you sat and waited for the canvas to
agree. The window was arbitrary — it existed because the canvas and the SPA
are separate pages with no shared invalidation event to subscribe to.
There IS an observable signal: the user coming back. They edit in the SPA
tab, switch to the ComfyUI tab, and expect the canvas to be current.
`markAllStale` now runs on `focus` (clicking between windows) and on
`visibilitychange` (tab switch), so the refresh happens exactly when they
look at it.
The mark is cheap and the refetch stays lazy — driven by whatever `ensure()`
the next reactive tick makes — so a focus event on a graph with no `@{}` refs
costs nothing. Only the freshness stamps are dropped, never the cached
values, so nothing flickers back to a raw uuid mid-refresh. Transient failure
tombstones clear too, since an explicit "check again" should retry rather
than wait out RETRY_TTL_MS; permanent 404s stay.
The 60s timer stays as a backstop for the case where focus never changes —
two visible windows on one desktop.
Copy exists so a module can be shared WITHOUT walking the Export tab, which
means what lands on the clipboard has to be paste-able into Import. It was a
bare engine row, and `parsePayload` rejects that outright — it requires
`{schema_version, bundles, wildcards, fixed_values, combines, derivations,
constraints, categories}` and never gets as far as looking at the entity.
`buildCopyableRow` now emits a complete export envelope carrying the one
entity in its own bucket, with the siblings empty. Bundles (which have
`children` and no `type`) go to `bundles`. `schema_version` still comes from
the same `schemaVersionForPayload` the publish paths use, so a copied entity
and a published one can never disagree about their shape.
An unrecognised entity kind is now refused rather than copied: an envelope
with every bucket empty reads as "copy worked" and then imports nothing,
which is worse than a visible failure.
Scope: this carries the one entity, not its dependency closure. A wildcard
nesting `@{uuid}` refs still imports with those dangling, and the Import
tab`s missing-dependency UI reports them; shipping the closure stays the
Export tab`s job since it has the UI to show what is being dragged along.
Tests round-trip the copied JSON through the REAL `parsePayload` rather than
asserting a hand-written shape.
The extension rendered in light mode on top of a dark ComfyUI. Not a broken
light theme — it was STUCK in light.
ComfyUI moved the `dark-theme` class between frontend releases. Verified
against two live builds on this machine:
1.45.21 -> <body class="litegraph grid dark-theme ...">, <html> bare
1.47.10 -> <html class="dark-theme">, body no longer carries it
`hasDarkClass` only read `document.body`, so on any current build the check
returned false and `detectInitialTheme` reported "light" — the extension then
painted its light tokens onto ComfyUI`s dark chrome. Evaluated against the
live 1.47.10 DOM, the old predicate returns false where the new one returns
true.
Now checks EITHER element and observes both, so a theme switch is caught
whichever element the running frontend mutates and older builds keep working
unchanged. Light is still the genuine signal when neither carries the class.
Tests pin both eras plus the html-side switch.
The canvas and the SPA disagreed about the same derivation: the SPA reported
"1 of 11 options match" while the ComfyUI instance reported "0 of 10".
`ensure()` short-circuited on `cache.has(u)` and nothing but the test seam
ever cleared the map, so a SUCCESSFUL snapshot lived for the lifetime of the
page. Failures already had a 30s retry TTL; successes had none. The canvas
therefore kept whatever a wildcard looked like the first time it was
referenced — add an option in the SPA and the canvas reported the old count
until a full reload. The two surfaces are separate pages with no shared
invalidation event, so freshness has to be time-based.
Adds a 60s freshness window, tracked in a sibling `cachedAt` map so the
public `PreviewLookup` shape stays free of bookkeeping. The stale entry is
deliberately KEPT while the refresh is in flight, and kept even if the
refresh fails, so a resolved label never flickers back to a raw uuid. The
permanent-failure check moved ahead of the staleness check so a stale entry
whose refresh 404s cannot re-enter the queue on every 400ms reactive tick.
Also switches the SPA wildcard option value to `wrap`. It was a fixed 34px
single-line field with a horizontal scroll, so a long option value — the
paragraph-length ones users actually write — was effectively invisible.
Seed-list modal: a locked row carries three fixed-width toggles plus a hard
178px seed input and a roll button. On the 486px modal that overran the panel
— the input clipped at the right edge and the roll button was pushed out of
view entirely. The value column now shrinks (`min-width: 0`, 178px as a max
rather than a fixed width), and a long derived seed ellipsis-clips instead of
shoving the DERIVED tag off the edge.
Module picker: the selected-module chip rendered its name as a bare text
node, so a long name like "Accent piece (color-neutral)" wrapped onto a
second line inside a chip fixed at 22px tall and spilled out of its own pill.
Wrapped in a span that ellipsis-clips, with the full name on hover.
Display playground banner: the header scrim was hardcoded to a near-black
rgba over the brand gradient. Under the light theme the band stayed dark
while `--wp-text` flipped to a dark ink — dark text on a dark banner. The
scrim now follows the theme, keeping the same 0.85 knock-back either way.
Two problems in the canvas wildcard modal, both worst on exactly the
well-authored wildcards the extension is for.
Option rows: a fully tagged option carries 8+ sub-categories (hue,
temperature, tone, saturation, several suitability flags). Wrapped inside the
96px CATEGORY column they stacked into eight lines, making ONE row taller
than the option list was worth. Shows the first three behind a `+N` pill that
expands per row — the tags stay reachable, they just stop dominating.
Tag pool: 40-odd pills pushed the option list, the thing the user came to
edit, most of a screen down. The section now collapses from the header, and
reports how many tags are ticked while collapsed. Starts open so the pool
stays discoverable.
Probability: the modal rendered `Math.round(p * 100)`, so with 30+ options
every entry below 0.5% read as a flat "0%" — a legitimately weighted option
looked impossible. Now delegates to the SPA`s `formatProbability`, which
already existed for exactly this reason, so both editors agree digit for
digit.
The `icon` column has existed end-to-end — engine column, `_UPDATABLE_FIELDS`
in wp_api/categories.py, `CategoryRow.icon` in the TS types — with no UI to
set or display it, so every category rendered under the same generic bookmark.
Adds `IconPicker`, a teleported grid of curated PrimeIcons grouped by the
kinds of things people actually categorise prompt modules by (subject, style,
scene, structure, signals), plus a "No icon" reset. PrimeIcons ships ~300
glyphs; offering all of them would need its own search UI and most of the set
is chrome (chevrons, spinners, media transport) that means nothing as a
library label.
Glyph names are stored unprefixed ("palette"), matching what the column
already held. Wired into both the new-category form and the row editor, with
an Icon column in the table.
Users routinely paste an entire sentence into a value, and the fields showed
a sliver of it with no way to see the rest.
- Fixed values, ComfyUI modal: the value was a single-line `<input>`. Now an
auto-growing `<textarea>` that wraps, sized to content and capped at 30vh
before it scrolls. Enter is swallowed — a fixed value is one string and the
engine has no meaning for an embedded newline — so it still behaves like the
input it replaced.
- Fixed values, SPA: swaps the fixed 2-row `multiline` box for `wrap`, the
existing grow-to-fit mode (one row minimum, 40vh cap, manual resize handle).
A fixed height either wasted space or hid most of a long value.
- RichTextInput `--multi`: adds the 40vh cap + scroll that `--wrap` already
had. Uncapped, pasting a paragraph grew the box to thousands of pixels and
pushed every control below it off-screen.
- Combine editor: the output variable moved out of its 220px column beside the
template to its own full-width row ABOVE it. That column squeezed the field
that actually needs room to grow, and read as a footnote to the template
rather than as the thing the combine produces.
A 261-item library made the export picker a scroll-hunt, and because many
entities share a display name (five wildcards all called "Outfit"), scrolling
was the only way to find a specific one — and it still could not tell you
which was which.
Adds a search box matching name, short id, and the new row subtitle, plus a
`subtitle` on PickerRow rendering "$outfit · 31 options" — the two facts that
actually distinguish same-named modules. Mirrors what the canvas
ModulePickerModal rows already show.
Section counts and select-all read the VISIBLE rows so the header checkbox
describes what the user is looking at, but select-all leaves rows hidden by
the search untouched: silently dropping a filtered-out selection on a
"deselect all" click would lose work the user cannot see. The footer counter
still reports the true export size.
A long Context chain produces dozens of upstream vars and the picker menu was
an unfiltered scroll — the only dropdown in the extension without search.
Adds a sticky filter field that focuses on open, matching with or without the
leading `$` so typing `see` finds `$seed`. Enter picks the sole remaining
match (the common case after a few characters) and Escape closes without
changing the selection. An empty result now says so rather than rendering a
blank menu.
A library routinely holds several wildcards under one display name — five
"Outfit" entries authored at different times — and the constraint source /
target dropdowns offered five identical rows with no way to tell which was
which.
Adds an optional `meta` to `SelectOption`, rendered dim and right-aligned,
and wires the constraint editor to pass "N opts · <short uuid>". The
type-to-filter now matches `meta` as well as `label`, so pasting a uuid jumps
straight to its row — without that the duplicates stay unreachable by typing,
since their labels are identical.
Also gives the option label `min-width: 0` + ellipsis so a long module name
clips inside the row instead of forcing the menu past its max-width and
pushing the meta and tick off the edge.
A 66-child scene-composer bundle dumped every child inline on expand, so one
row buried the rest of the list.
Caps the rendered children at 8 behind a "Show all N" / "Show fewer" toggle,
and leads with a kind breakdown ("15 wildcards · 5 constraints", dominant
kind first) so a collapsed list still says what the bundle is MADE of rather
than only how many rows it has.
Expanded-in-full state is keyed by bundle id rather than a per-row flag, so
it survives re-sorting and re-filtering the list.
The Discord invite existed ONLY inside the community embed`s offline
fallback, so it was reachable exactly when the community failed to load and
invisible the rest of the time. There was no route to the issue tracker at
all.
Adds both to the Get Started section, with `GITHUB_NEW_ISSUE` joining the
link registry so a repo rename keeps touching one line. The issue link lands
on the chooser rather than a prefilled template — picking bug vs feature is
the reporter`s call, and a wrong prefill is more friction than none.
Also stamps `data-nav-id` on the external-anchor branch, which the button and
parent branches already carried.
The var-chip hover read `resolved ? "produced upstream" : "binds at
runtime"`, but for a var `resolved` is merely `name.length > 0` — deliberately
permissive in `atomIsResolved` so a legitimate runtime-bound var never renders
as a broken red chip. The upshot: EVERY var claimed an upstream producer.
Meaningless in the SPA, which has no graph at all, and unverified on the
canvas.
Adds an explicit `inScope` prop bound from the host`s suggestion pool
(upstream + siblings on the canvas, the library catalog in the SPA) and
reworded to "in scope" / "binds at runtime" — surface-neutral, and it claims
membership rather than production, which is the only thing the chip can
actually know.
`resolved` keeps its permissive meaning so chip STYLING is untouched.
`inScope` defaults to false, so a caller that passes no pool makes no claim
and falls back to "binds at runtime", which is always true.
Copy Payload wrote the bare engine row, which says nothing about which
payload shape it is in — and the shape is what decides whether a consumer
can read it. Publish already stamped the version (buildPublishBody, and the
publishToCommunity hash), so a copied row and the same row published to the
community carried different information about themselves.
Adds `buildCopyableRow`, leading the JSON with `schema_version` derived from
the SAME `schemaVersionForPayload` the publish paths use, so the two can
never disagree — including the feature bumps (SP2b range syntax, SP3
non-default constraint reach).
Note this is a single engine ROW, not an import envelope: `parsePayload`
wants `{schema_version, wildcards: [], bundles: [], categories: [], …}`, so
the clipboard JSON remains for inspection, sharing, and the community
publish form rather than for pasting into the Import tab.
Selecting a dozen entities out of a 261-item library meant a dozen precise
clicks on an 18px checkbox. Worse, the constraint reach pick rows already
carried `cursor: pointer`, so they LOOKED clickable and silently were not.
Both surfaces now toggle on a click anywhere in the row. Clicks originating
inside an interactive descendant are ignored, so the control and the row
never double-toggle and cancel each other out — the picker excludes buttons,
inputs, the checkbox wrapper and `.wp-id` (whose `cursor: copy` advertises a
different action), and the reach list excludes `.wp-check`.
Keyboard behaviour is deliberately unchanged on both: the checkbox stays the
single focusable control per row, so this adds no second tab stop for
keyboard or screen-reader users.
Replaces the TargetReachSection comment that documented the old
checkbox-only behaviour as intentional.
The menu was `position: absolute` inside the binding modal, so the modal`s
scroll container CLIPPED it — open it from a row near the bottom and the list
vanished below the fold. It also had no outside-click dismissal at all: once
open, the only exits were picking an item or closing the whole modal.
Teleports the menu to <body> with `position: fixed` viewport coords measured
off the trigger button, flipping above when there is no room below, matching
the strategy RichTextInput`s autocomplete popover already uses. Adds a
capture-phase mousedown listener that closes on any click outside both the
menu and its button, keeps the menu positioned across scroll/resize, and
tears every listener down on close and unmount.
Escape now dismisses the menu before falling through to cancel, so a stray
open dropdown can no longer cost the user their whole draft. The teleported
node mirrors the host`s resolved theme class, since it escapes the
`.wp-theme-*` scope the tokens hang off.
Tests query the teleported node through the document and unmount their
wrappers between cases — clearing document.body under a live component
detaches Vue`s teleport anchor and the next patch throws on a null parent.
The popover capped matches at 8 rows. With 100+ wildcards sharing near
identical display names, a query like `pose` silently truncated to the first
8 and the rest were simply unreachable — and because 8 rows never overflowed
the popover`s 240px max-height, no scrollbar ever appeared. That reads to the
user as "the scrollbar does not work".
Raises the cap to 50 in both RichTextInput and VarAutocompleteInput so the
list genuinely overflows and `overflow-y: auto` earns its keep, and scrolls
the keyboard-selected row into view on every `acActive` change. Without the
latter, ArrowDown past the last visible row moved the selection but left the
popover scrolled at the top, so the highlight vanished and the list looked
frozen.
Typing the `{` that the canonical `@{uuid#name}` syntax calls for killed the
suggestion popover outright, and it only came back after deleting the entire
run — the reported "dropdowns break if you type something that cannot be
found and you need to delete the whole text and start typing again".
`probeAutocomplete` only scanned back through `[a-zA-Z0-9_]`, so `{`, and
every space or dash inside a display name ("Pose pool — presenting"), ended
the scan on a non-trigger char and returned null. The INSERT half of the same
feature already understood the form: `insertChipAtCursor`s cut regex allows
`\{[0-9a-fA-F:,_ -]*\}?`. The two halves simply disagreed about what a
half-typed ref looks like.
Probes the partial brace form first, before the bare-identifier scan. A `{`
not preceded by `@` stays an inline brace block (`{a|b|c}`), and a `}` already
present before the caret means the ref is complete so the popover stays shut.
Alt-tabbing mid-token in the ComfyUI edit modal froze the page with
`DOMException: Node.insertBefore: Child to insert before is not a child of
this node`, followed by a cascade of null derefs (`emitsOptions of null`,
`parentNode of null`) that left the editor dead until a page refresh.
Root cause: the host is `contenteditable`, so the BROWSER owns its child
nodes and may replace them wholesale — select-all + retype, IME commit,
undo, some paste paths. Vue then holds detached `el` pointers in its child
vnodes. Blur fires a full re-parse via `onHostBlur`, and patching the new
atom structure over the wreckage derefs a dead node.
The existing `renderEpoch` rebuild does NOT cover this — verified against a
repro probe: bumping the v-for key still walks every stale `el` during
teardown and throws on `nextSibling` of null. The only safe repair is
discarding the host ELEMENT vnode, which Vue unmounts with a single
`hostRemove(el)` on a node that is still attached, tearing children down
with `doRemove: false` so no stale child is ever touched.
Adds `hostDomIsStale()` (live `[data-atom-index]` count below
`atoms.value.length`) plus a `hostEpoch` key on the host element. The check
is deliberately `<` and not `!==`: EXTRA top-level nodes are the normal
typing case and must not remount, which would eat the caret mid-keystroke.
Covers both directions with regression tests — the destroyed-children crash
and the orphan-text-node non-regression.
`resetChildToBundleSnapshot` fetched `api.bundles.get(bundle.library_id)`
without checking the bundle is actually linked. An unlinked or broken-link
BundleInstance carries an empty `library_id`, so the request built
`/wp/api/bundles/`, whose trailing slash normalizes to the collection
route — surfacing as `Reset failed: No such API route: /wp/api/bundles`,
which reads like a missing endpoint rather than a missing link.
Adds the same up-front guard its sibling `resetBundleToLibrary` already
had, and routes both catch blocks through `bundleResetErrorMessage` so a
404 (library row deleted or re-imported under a new uuid) names re-linking
as the recovery instead of leaking raw API text.
The chip hover cards and the self-contained Select styles push the canvas
bundle past the previous 453 KB ceiling. Entry budget is untouched (main.js
stays ~4 KB of the 30 KB allowance); this only moves the total.
Raised deliberately rather than trimming further — the remaining headroom is
~8 KB, so new canvas CSS/JS still needs to stay lean.
Every search box was name-only, so pasting an 8-hex uuid — the one identifier
that is unambiguous when two entries share a display name — returned nothing.
Server side: the module, bundle and template `_build_where` clauses now match
`(name LIKE ? OR id LIKE ?)`. Client side: the remap-ref, bundle-reattach and
constraint-reattach pickers filter on uuid as well as name, which is the
reliable way to pick the right target among same-named candidates.
Hovering a `@{uuid}` chip now shows what it actually resolves to: the uuid,
the sub-category filter read back in plain language, and "N of M options
match" computed LIVE against the library via preview-resolver (extended with
per-option tag sets) rather than from a stale embedded copy — so the count
moves when the library changes. Variable chips show their binding state.
The popover teleports from INSIDE the chip span so the component keeps a
single root (a second root silently broke `wrapper.classes()` in every
existing RefChip test). "Not in library" is gated on the resolver actually
missing the uuid — constraints have no option tag sets, and keying off that
made valid entries claim they were missing.
Nested `@{uuid}` refs and `$vars` inside `{a|b}` braces rendered as raw text
on the derivation rule-value and constraint-exception surfaces. Root cause was
hand-rolled `tokenizeRich` renderers dumping `dp-brace` verbatim — the shared
`atomicEditorModel.parse` already decomposes those, so both surfaces now
delegate to RichTextPreview instead of re-tokenising.
Exception "extras" also regain a real picker: a Select of concrete option
values with chipped #label/#option slots, rather than free text.
Select.vue ships self-contained styles for this: its `.wp-select*` rules lived
only in the manager-global tokens.css, which is NOT in the canvas bundle, so
on canvas the control rendered unstyled with its menu behind the modal. Any
manager UI component reused on canvas needs its own styles. Also pins rich
content to a single line inside the trigger/options, gives the SPA exception
table a fixed layout so nowrap cells can't overflow, and isolates the matrix
grid's stacking context so its sticky headers stop painting over the dock.
Two debugging aids for the instance edit modals:
- InstanceIdChip: a click-to-copy monospace chip in every per-kind modal
header showing the library uuid (the id that @{} refs, constraint
source/target and library rows all match on), with the per-instance _uid
in the tooltip. Makes drift/linkage problems traceable at a glance instead
of requiring a workflow-JSON dig.
- RichTextInput gains a `wrap` prop so single-line surfaces wrap + auto-grow
instead of clipping. Applied to the derivation rule override boxes, whose
values were unreadable once they exceeded the field width.
Completes D3b. The mechanism landed in 5dbe7c3c but nothing could produce a
`link` decision, because a content duplicate raises NO uuid collision and so
never reached ConflictModal.
- findLinkableDuplicates: the subset worth offering a link for — content
matches an existing row under a DIFFERENT uuid AND the incoming id isn't
itself a collision (that's the batch-conflict path's question).
- New per-item issue kind `content-duplicate` (+ ContentDuplicateDetail),
built in ImportExport.buildPerItemIssues from the live library rows.
- ConflictModal renders it with a dim IN LIBRARY badge, names the existing
entry, and offers "Link to existing" / "Import anyway". Never auto-applied:
the row counts as unresolved until the user chooses.
- PerItemDecision gains kind "link" + target_id. partitionSelection drops a
linked row like skip; runCommit folds old->target into the same remap table
the renames use, so every @{} ref + constraint source/target follows to the
existing entry instead of dangling on a uuid that never lands.
An incoming entity whose uuid does NOT collide still installs as a brand-new
row even when byte-identical content already exists under a DIFFERENT uuid.
Re-importing an iterated pack that way multiplies duplicate rows and splits
references across two identical entries.
Adds the mechanism:
- findContentDuplicates (pure): maps incoming id -> existing library id when
EXACTLY ONE same-kind row shares the moduleFingerprint under a different
uuid. Zero matches = genuinely new; 2+ = ambiguous, left to the user. A
match at the SAME id is an ordinary collision classifyOne already handles.
- CollisionDecision gains { kind: "link", target_id }. applyCollisionDecisions
drops the incoming entity and records old->target in the SAME renameMap the
rename path uses, so the existing walkRemap pass re-points every @{oldId}
ref + constraint source/target at the row that's already there.
Never automatic and never overwrites — import still defaults to create-as-new
(spec decision #2). Additive: with no producer of a `link` decision yet, every
existing path is unchanged. Surfacing it in the ImportPicker (content
duplicates raise no uuid collision, so they never reach ConflictModal) is the
remaining last-mile step.
Bundle-side sibling of the module re-link. A workflow BundleInstance is
detached when its library_id is absent from the polled bundleHashes map (a
re-import minted a fresh uuid). Its `inserted_at_hash` IS the library bundle's
payload_hash at insert time, so a content-identical library bundle under a
DIFFERENT uuid matches on exactly that — letting the bundle side reuse the
same pure findRelinkCandidates/autoRelinkTarget helpers as modules.
PushBundleToLibraryModal gains the re-link section (auto-picks a sole
identical match, else a ranked picker searchable by name or id, with
identical vs "content differs" badges) and emits mode:"relink".
ContextWidget.onBundlePushSaved folds "relink" into the existing rebind
branch, swapping library_id + inserted_at_hash + name and re-snapping the
fingerprint. No write happens — it points at an entry that already exists.
resetBundleToLibrary fetched the library snapshot and replaced the live
children unconditionally. When the instance's library_id was empty (an
unlinked/detached bundle) or the fetch resolved to an empty/mis-shaped
children array, it committed an EMPTY replacement — wiping the bundle's
modules with no warning (reported as "reset gave me an empty wildcard").
Two invariant guards, before the destructive commit:
- refuse when the instance has no library_id (not linked) — tell the user to
re-link first, instead of fetching an empty snapshot;
- refuse when the fetched snapshot has no children (broken link / wrong shape)
— abort rather than wipe the live children.
Both surface an error toast and leave the bundle untouched. Valid reset (a
linked bundle with a populated snapshot) is unchanged.
matchStateOf bailed on any falsy payload_hash, so a workflow module whose uuid
IS in the live library but whose local payload_hash is "" (a malformed/legacy
copy, or one a builder emitted with payload_hash: "") was verdict-less — no
drift dot, no "Edit library entry in SPA", and re-link couldn't fire either
(isLibraryMissing needs a truthy hash). The library link was never lost, only
the local hash was blank.
Now: when the uuid is present in libraryHashes, an empty local hash reads as
drift (conflict) so the existing bulk "refresh drifted" button relinks it in
one click. A genuinely inline module (fresh uuid, not in the library) stays
verdict-less exactly as before. All truthy-hash paths (missing/drift/silent-
skip/type-conflict) are unchanged, so D3a re-link's detached detection is intact.
Surfaces a re-link path in PushToLibraryModal when a workflow module is
detached (library-tracked but its uuid is absent from the live library — a
re-import minted a fresh id) AND a content-identical library row exists under
a different uuid. Picks the sole identical row automatically, else shows a
ranked picker (identical vs "content differs", searchable by name or id).
Confirming emits mode:"relink"; both save paths apply it:
- right-click -> ContextWidget.onPushSaved: applyRelink swaps the row id +
payload_hash and walks every module so sibling @{} refs + constraint
source/target follow the library uuid.
- edit-modal -> ModuleEditModal stamps _relinkFrom (old id) before the swap;
ContextWidget.saveEditedModule runs the same ref remap once committed.
Import stays create-as-new (no install.ts change) — re-link is the reconnect
path, never a silent overwrite. Bundle re-link is a separate follow-on.
Two pure helpers for D3a module library re-linking:
- relink-match: findRelinkCandidates ranks live-library rows against a
detached draft by (type, payload_hash) content identity, then (type, name);
autoRelinkTarget yields the sole content-identical row or null (ambiguous /
none). Never auto-links on name alone.
- relink-apply: applyRelink swaps the detached instance's own id + payload_hash
and walkRemaps every module's payload + instance so nested @{uuid} refs and
constraint source/target follow to the new uuid. Reuses walkRemap verbatim.
A held wildcard copies its frozen value from the pipeline hold base pass and
early-returns before _record_pick, so its frame-0 pick never landed in the real
ctx. Constraints keyed on a held source then mis-fired (spurious source_missing
/ never_applied warnings), and a cross-node constraint whose source is held left
its held target UNCONSTRAINED across frames (held outfit drifted: kimono at
frame 0, unconstrained pick on frames 2+).
Fix: after the per-node hold base pass, merge the base pass's __wp_picks__ (for
held modules) + __wp_constraint_hits__ into the real ctx, before the module
loop. The held source is then registered for this node's constraints and the
registration flows downstream into the next node's base pass, keeping cross-node
held targets constrained. Value-freeze path untouched.
Four fixes to the in-app updater shipped in 2.10.0:
- DOWNGRADE (critical): Update Now sent ComfyUI Manager selected_version:'latest' + mode:'cache', so 'latest' resolved against Manager's STALE cached catalog and could install an OLDER version over a newer one. Now pins the exact target version the check found (e.g. 2.10.1), uses mode:'remote' for a fresh catalog, and hard-guards against installing anything not strictly newer than what's running.
- Check Now now lights the topbar pill immediately. useReleaseCheck kept per-consumer refs, so a manual check in Settings never reached the topbar until reload; the reactive state is now a module-level singleton shared by every consumer.
- Release notes render properly: the renderer unwraps <details>/<summary>/<b> into markdown instead of showing literal tags (raw HTML still escaped).
- Changelog is human-readable: .releaserc.js now prepends a curated, plain-language highlights section (docs/release-notes/next.md) above the collapsed per-commit list, cleared automatically on each release.
2026-07-22 01:11:29 +03:00
1833 changed files with 310088 additions and 43694 deletions
| Lint | `pnpm lint` (a11y rules and `!` assertions are errors outside `eslint-baseline.json`; after fixing old warnings run `pnpm lint:baseline` to drop those files) |
This release is waiting for notes: \`docs/release-notes/next.md\` on main is empty, and its text is the release body users see in What's new. Add the notes on dev and merge dev into main again; this PR then updates and merges itself."
fi
echo "::warning::docs/release-notes/next.md is empty; release PR #$number waits for notes."
git commit -am "chore: clear the release notes shipped in $TAG"
git push -u origin "$branch"
if [ "$kept" = "0" ]; then
body="Removes the notes that shipped in $TAG from \`docs/release-notes/next.md\` and adds that release to the top of \`CHANGELOG.md\`. Nothing was added to next.md since the release was cut, so this merges itself once CI passes."
else
body="Removes the notes that shipped in $TAG from \`docs/release-notes/next.md\` and adds that release to the top of \`CHANGELOG.md\`. $kept line(s) of next.md were not in the release and were kept (new notes, or shipped lines reworded on dev). Check them, then merge."
fi
number=$(gh pr create --repo "$GITHUB_REPOSITORY" --base dev --head "$branch" \
--title "chore: clear the release notes shipped in $TAG" --body "$body" | sed 's#.*/##')
--notes "Autocomplete data for ComfyUI-Wildcard-Pipeline. Rebuilt on demand; not a product release. Download it from the manager's Settings page rather than by hand." \
<img src="public/images/docs/flow-intro.svg" alt="Modules resolve inside WP Context, which emits named $variables that fill the WP Prompt Assembler template, which CLIP Encode turns into conditioning" />
</p>
## What it does
Plain wildcards pick every part of a prompt on its own, so you get a snowy beach
at noon under the stars. Wildcard Pipeline builds the prompt step by step, and
each step can see what the earlier ones picked. If the weather comes out as rain,
the mood can lean gloomy and the lighting can follow. Every Generate gives you a
fresh prompt that still hangs together.
Stock ComfyUI prompt nodes either take a single literal string or pick from a flat wildcard file. **Wildcard Pipeline** lets each module read what the previous modules picked — so `$mood` reacts to `$weather` via a constraint, a `combine` interpolates `$style $subject` into `$scene`, a derivation flips `$accent` based on `$mood`, and your final prompt is a coherent multi-element composition instead of a Frankenstein concatenation.
## Install
**One Generate. One coherent prompt. Re-roll until you stop laughing.**
Needs ComfyUI 0.11 or newer and Python 3.10 or newer. The canvas
side is built against ComfyUI frontend 1.42 (the
`@comfyorg/comfyui-frontend-types` version in `package.json`); it uses some
frontend internals, so a much older or newer frontend may break parts of it.
## Highlights
- **ComfyUI Manager (recommended):** search for **Wildcard Pipeline** by
**dumiflex**, click **Install** and restart ComfyUI.
unzip it into `ComfyUI/custom_nodes/` and restart ComfyUI.
- **Module stack inside a Context node** — drop in `wildcard`, `fixed_values`, `combine`, `derivation`, `constraint`, `bundle` modules and they each publish a `$variable` to the chain.
- **Constraints with carriers** — re-weight downstream wildcards based on what upstream picked. Matrix + per-option exceptions. Carrier-via-nested-ref so a constraint can reach a wildcard nested inside another wildcard's option.
- **Loops + per-iteration seeds** — `WP Context Loop` runs your whole chain N times from a single Generate; `WP Seed List` pairs N unique sampler seeds with the N prompts so every output is distinct.
- **Persistent library** — a manager SPA backed by SQLite stores reusable modules, frozen bundles, prompt templates, and a category tree. Browse / edit / fork / push from the canvas.
- **Inspector** — `WP Debug` shows the post-run snapshot, per-module trace, per-wildcard picks, and the conflict-scanner warnings.
- **Type-coercion helpers** — `WP Var → Int / Float / Bool` parse typed values out of any `$variable` so wildcards can drive image width, step count, sampler cfg, conditional switches.
<details>
<summary>Installing from source</summary>
## Installation
A git clone has no built frontend, so you need Node.js and pnpm:
4. Build the frontend assets (requires Node.js and pnpm):
```bash
pnpm install
pnpm run build
```
5. Restart ComfyUI.
</details>
## Quick start
1. Open the Wildcard Pipeline manager (sidebar → **Wildcards** → **+ New**). Name `subject`, variable binding `$subject`, three options: `a cat`, `a dog`, `a fox` at weight 1 each. Save.
2. On the canvas, drop `WP Context` → `WP Prompt Assembler` → `CLIP Text Encode` → `KSampler`. Add your wildcard to the context. Type `a $subject` into the assembler template. Queue.
1. Open the **Wildcard Pipeline** manager from the ComfyUI sidebar and create a
wildcard called `subject` with three options: `a cat`, `a dog`, `a fox`.
2. On the canvas, chain **WP Context** → **WP Prompt Assembler** →
**CLIP Text Encode**. Add your wildcard to the Context node and type
`a photo of $subject` into the Assembler.
3. Queue a few times. Each run picks a new subject.
Each Generate rolls a fresh subject. Full walkthrough: [Quick Start wiki page](https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline/wiki/Quick-Start).
The [Quick Start wiki page](https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline/wiki/Quick-Start)
walks through a fuller example.
## The nodes
### Example workflows
Prefer to start from something that already runs? Open **Workflow › Browse
Templates** and pick **Wildcard Pipeline**. Four workflows ship in
[`example_workflows/`](example_workflows/), all built on one family of
packs that describe people in plain words and name no style, so they suit any
model (Person, Location, Wardrobe, Light, Camera, Direction, and a Render pack
that writes the quality words for Illustrious / NoobAI by default, Pony or Flux):
| Workflow | Shows |
|---|---|
| **1 - One image** | The core chain, WP Debug, and WP Toggles as the switchboard: LoRA switches that bypass their loaders and swap in trigger words (Context Injector, derivations), and a switch for the group that reads size, sampler and CFG from the model (Model Info, Var → Int / Float / Choice, passed on by a Mode Relay to a Node Group). |
| **2 - Batches and grids** | A Context Loop sweep (3 shots × 3 lights, one held person) laid out as an XY plot with Label & Grid, a Quick / Full pick in WP Toggles that sets the steps (Var → Int) and the image size (Var → Bool, If/Else Switch), and an optional Seed List. |
| **3 - Pick and refine** | Four drafts of one held person, a pause at Image Filter to pick the keepers, then an upscale and a second pass on the picks only. |
| **4 - Sets and stories** | One loop, three ways, picked in WP Toggles (Pick one mutes the other canvas groups): every frame different, a photo shoot (one held person, outfit and place, a shot list per frame) and a storyboard (four six-beat scripts written by a derivation on `$story` and `$iteration`), each pausing at Image Filter so you pick what goes on the sheet. |
They run on an empty library: every list is stored on its WP Context as
bundles and sub-bundles. The packs are generated by
| `WP Var → Int / Float / Bool` | Parse typed values out of any `$variable` to drive ComfyUI INT / FLOAT / BOOLEAN inputs. |
| **WP Context** | Holds your module stack and outputs the picked variables. Chain several together. |
| **WP Prompt Assembler** | Fills `$variables`in a template and collects their negative words into a second output. One button hides the variables no Assembler prints. |
| **WP Context Loop** + **WP Seed List** | Run the whole chain N times from one Generate, each with its own prompt and seed, or sweep every combination of chosen wildcard options. |
| **WP Context Injector** | Turns any ComfyUI output (text, a number) into a `$variable`. |
| **WP Model Info** | Reads the loaded checkpoint into `$model_family` / `$model_variant` (Pony, Illustrious, …) so rules can pick LoRAs and tags per model. |
| **WP Toggles** | Several on/off switches in one node: each writes a true/false `$variable` for rules, can have a BOOLEAN output, and can mute or bypass the nodes wired into it. Merges existing Boolean nodes. |
| **WP Node Group** | Gathers nodes so one WP Toggles switch mutes or bypasses them all. With nothing wired in, it stands for the canvas group it sits in (frontend only, never runs). |
| **WP Mode Relay** | Watches nodes' mute / bypass and passes a mode on to a WP Node Group, for chains (frontend only, never runs). |
| **WP Bookmark** | Marks a spot on the canvas to jump back to with a shortcut or from the Bookmarks dock: pick the corner, edge or centre it lands at and the zoom; the shortcut field shows clashes with ComfyUI and other extensions. Can hide itself from the canvas (frontend only, never runs). |
| **WP Image Filter** | Pauses the run so you pick which images go on to the upscaler. Their latent, conditioning, prompt text and Context are filtered with them, and you can edit a prompt or paint a mask before they go on. |
| **WP Label & Grid** | Writes labels on images and lays them out in one labelled grid, or an XY plot sorted by each image's sweep options. Works on one image, a batch, a list or a loop's frames; grid presets follow the shape of the run. |
| **WP Prompt Cleaner** | Tidies the final prompt: spacing, stray commas, empty `()`, nested weights, LoRA tags, duplicates, a blocklist. |
| **WP Debug** | Shows what happened during a run (see below). |
| **WP Var → Int / Float / Bool** | Use a variable to drive a number or switch, like image size or steps. |
| **WP Var → Choice** | Use a variable to pick from a dropdown, like the checkpoint or sampler. Matches it against the real list. |
| **WP Note** | A frameless note that explains a workflow: numbered steps, warnings with an icon, or a small label, with links into the built-in docs and pictures (pasted, dropped or shipped). Never runs. |
Full node reference: [Nodes wiki page](https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline/wiki/Nodes).
Select a WP node and the indigo **?** in ComfyUI's selection toolbar opens
its page of the built-in docs over the canvas (WP Toggles, WP Note and WP
Bookmark also get an indigo pencil there that opens their editor, in
place of a pencil on the node). Most
nodes also have a help page in ComfyUI's node info panel, and the
| **Combine** | `$<name>` | Templated string that interpolates earlier `$vars` into a single output `$var`. |
| **Derivation** | `$<name>` | IF / ELIF / ELSE rules that read picked `$vars` and rewrite others. |
| **Constraint** | *(none)* | One-shot re-weight of a downstream wildcard's pool based on an upstream pick. |
| **Bundle** | *(group)* | Frozen group of modules — drop into any Context as a reusable unit. |
| **Template** | *(asm side)* | Saved Prompt Assembler template string in the library. |
Full module reference: [Modules wiki page](https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline/wiki/Modules).
## Looping a chain — one click, N coherent prompts
Open it from the ComfyUI sidebar. It's where your modules live between workflows.
<p align="center">
<img src="public/images/docs/flow-loop.svg" alt="WP Context Loop + WP Seed List → KSampler — both lists fan out in lockstep" />
<img src="public/images/docs/spa_manager.png" alt="Wildcard Pipeline manager dashboard with module counts, quick create buttons and recently opened items" />
</p>
Drop `WP Context Loop` before your `WP Context` and pair it with `WP Seed List` for distinct sampler seeds. Both lists fan out in lockstep so iteration N's prompt always pairs with seed N. Each iteration carries its own `$iteration` / `$iteration_total` for in-template labelling (`frame 1 of 4 — a fox`). See [Concepts → Seeds and loops](https://github.com/DumiFlex/ComfyUI-Wildcard-Pipeline/wiki/Concepts#seeds-and-loops).
- **Library:** create, edit and search your modules, bundles and prompt
templates. The **Tags** page groups them into collections, and you can rename
or merge a tag across the whole library.
- **Library health:** one page that finds broken references, constraint rules
for options that are gone, variables nothing sets, duplicates and unused
items, with a way to fix or ignore each, and checks how varied a bundle's
prompts are.
- **Test Runner:** try a set of modules over many seeds without generating
images. See how often each option comes up and which rules fired, save a
baseline, and after an edit see exactly which outputs changed.
- **Community:** browse and install modules other people have shared on the
[community site](https://wp.dumiflex.dev/?utm_source=github&utm_medium=readme), and publish your own.
- **Import / Export:** move modules between machines as JSON files, or bring in
wildcard packs from A1111 or Forge (Dynamic Prompts, PPP, Impact Pack and Umi AI
`.txt`, `.yaml`, `.json` or a `.zip`, or an installed extension's wildcard folder)
on the **Wildcard packs** tab. Variables, template arguments and if-conditions
become stacks. You review the plan and sample prompts before anything is imported.
- **AI assistant (optional, off by default):** connect a model you run yourself
(Ollama, LM Studio, llama.cpp) or your own Claude or OpenAI key. It drafts and
edits modules in every editor, answers questions about your library in a chat,
explains Test Runner runs, organizes your library and builds whole packs from a
description. Every change comes back for you to review, and nothing is saved
until you apply it. A short **About my library** note in its settings (your
naming, style, model, what to never add) is read by every request.
- **Constraint preview:** a table of each target option's chance for every
source option, so you can see what a constraint does before running it.
- **Themes:** six colour themes (Orbit, Native, Nebula, Tide, Ember, High
contrast) and seven looks (Orbit, Crisp, Soft, Terminal, Editorial, Compact,
TUI) in **Settings › Appearance**. Mix any colours with any look, in dark or light.
- **Documentation:** the full guide, built into the app.
## The manager (SPA)
## Checking a run
A dedicated single-page app for browsing + editing the library. Open it from the ComfyUI sidebar.
Connect **WP Debug** to a Context node and generate. It shows:
<p align="center">
<img src="public/images/docs/spa_manager.png" alt="Wildcard Pipeline manager — Dashboard view with module counts, Quick Create row, and a list of recently opened library entries" />
</p>
- **Variables:** every value, and which step set it.
- **Trace:** each step, and why it did what it did: which derivation rule fired,
a wildcard's odds and what re-weighted them, where a nested pick came from.
- **Warnings:** anything that went wrong, linked to the step that caused it.
Active development. Versioned releases with [semantic-release](https://github.com/semantic-release/semantic-release) — every merged commit on `main` either ships a release or stays as `next` until the next breaking / feature change rolls one. Bundle-size + test gates run on every PR.
Everything runs locally. The extension only goes online to check for updates
(you can turn this off in Settings), when you open the Community page, or when
you choose to download the optional tag list for autocomplete. The optional AI
assistant is off until you turn it on, and then talks only to the model server
you choose (a local one keeps everything on your PC), plus the search engine,
page reader or Danbooru lookup if you set those up. Details are in
[docs/network-access.md](docs/network-access.md).
## Contributing
PRs welcome. See [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for the dev loop (`pnpm install` → `pnpm dev` for the extension watcher, `pnpm test` for vitest, `pytest` for the engine, `ruff check .` for lint).
PRs are welcome. [CONTRIBUTING.md](.github/CONTRIBUTING.md) explains the dev setup.
## License
[GPL-3.0-or-later](./LICENSE). Free to use, modify, fork. If you ship modifications, ship the source too.
Copyright (C) 2026 DumiFlex.
Wildcard Pipeline is free software, released under the [GNU General Public License v3.0 or later](LICENSE).
For a quick pass or fail check of every AI flow, see the [AI smoke pack](smoke/README.md) instead.
The AI assistant's bench as a [Watchwright](https://github.com/DumiFlex/watchwright) test pack. Its tests are the bench page's tests, copied into `meta.json` with the same titles, prompts and attempts per model. It clicks through each one in a browser the way a person would, against a running ComfyUI with the AI assistant set up. For every attempt it keeps:
- shots of the answer, and the answer's text;
- every AI call from the debug log (`collectors/ai-debug/debug-NN-*.md` and `.json`);
- times, flags and the step log.
You score the attempts on Watchwright's review page.
## Run it
1. Start ComfyUI with this extension and set up the model you want to test under **Settings › AI assistant**.
2. Start Watchwright (`watchwright serve`), open it, and add this folder under **Packs › Add pack**.
3. Press **New run** and pick the pack. The pack's settings are:
| Setting | What it does |
|---|---|
| `model` | The model you set up (`q9`, `q35`, `q27`, `haiku`, `sonnet`, `opus`, `fable`). It picks each test's attempts from the bench page's recommendation. It doesn't change the model. |
| `reset` | Loads the bench library (`bench-library.json`) before the first test. Use it for a run that should match earlier runs. The first time it imports the file; after that it restores a pinned copy, as long as the file hasn't changed. |
| `putBack` | On by default. Puts your library and AI settings back when the run ends (see [Putting your library back](#putting-your-library-back)). |
| `web` | Includes the optional web tests (N1 to N5). They need web search set up. |
Pick tests by section or tag. A test that uses an item an earlier test saves brings that test along (K2 needs K1's Adventurer line).
Before the first test, the setup:
- checks that the assistant is on and saves the model's name and the extension's version with the run;
- backs up your library, pinned, and loads the bench library when `reset` is on;
- turns **Let the assistant delete items** and **Apply small changes automatically** off (the delete tests turn deleting on for their own turn);
- tests the connection twice, so loading the model doesn't land in the first test's time.
The site address is `http://127.0.0.1:8189/wp/`. A run waits while another run against the same site is going. The browser is Firefox with a dark page, 1600 × 960. On a machine without Playwright's Firefox, set `WP_BENCH_BROWSER=chromium` before starting Watchwright.
## What the results mean
Most tests make, describe or edit an item with an editor's AI panel, or send one chat message. A few run inside another test and show up as its children:
- W4 refines W3's answer;
- W21 goes on with W20's chat;
- C12 goes on with C1's chat;
- P3 to P5 change P2's plan;
- P12 presses **Fix all with AI** in the first pack whose check shows problems.
Changes a later test needs are saved only on a test's last attempt.
A finding flag fails the attempt, because the app or the model did something wrong:
| Flag | Meaning |
|---|---|
| `model-loop` | The model wrote nothing new for 10 minutes. |
| `deleted-while-off` | The chat deleted something while deleting was off. |
| `build-blocked` | The pack builder wouldn't build. |
| `not-installed` | Install didn't finish, or stayed greyed out after the build. |
| `fix-changed-nothing` | **Fix all with AI** left the same findings. |
| `problem-fix-did-nothing` | A problem's **Fix** left the problem there, after up to three presses. One flag per problem, with the number of presses. |
| `unusable-answer` | An editor panel's answer had nothing to apply. The bench saved a stand-in so the tests that use the item still run (T1 saves a stand-in Bench Flux for T2 and T6). |
A robot flag breaks the attempt, meaning the bench couldn't do a step and the result says nothing about the model. **Redo broken** runs those attempts again.
| Flag | Meaning |
|---|---|
| `not-saved` | A new item didn't save. |
| `no-card` | The chat turn ended without a card to apply. |
`research-skipped`, `dismissed-findings`, `forced-click`, `fake-answer` and `fix-is-plan-change` are notes only. `fix-is-plan-change` lists build problems on items the code writes from the plan: their row offers **Change the plan** instead of **Fix**, so the bench doesn't press anything there. On the fake model (below) a turn or panel with nothing to apply flags `fake-answer` instead of `no-card` or `not-saved`, since the fake's made-up answers rarely make a card.
Tests tagged `changes-library` delete or change items for good. Each attempt of one starts with a database backup. The backup is kept (pinned) and named in the attempt's notes only when the attempt didn't pass.
Attempts keep a video only when they fail or break.
## The dashboard
The pack's **Dashboard** tab shows the runs, filtered by `model`: pass rate and findings, a model leaderboard (pass rate, the three rubric scores, AI seconds, findings), AI time against quality, pass rate and quality per section, the pack builder's plan, build and fix times, and lists of what to look at (unreviewed attempts, the lowest quality, the slowest AI, failures, flaky tests). The score tiles stay empty until attempts are reviewed.
## Putting your library back
The bench changes the library, so the pack puts yours back. All three packs here (the bench, the [smoke pack](smoke/README.md) and the [library safety pack](library/README.md)) do it the same way, through the app's backups, restored live with no restart (`lifecycle.ts`):
- **A new run** pins your unpinned backups for the run, so the run's own backups can't push them out (Backups to keep counts them), backs up your library (pinned, noted "Watchwright: your library before run …") and saves your AI settings.
- **When the run ends** your AI settings and your library come back, and the pins come off. A run that was **stopped** keeps its library as a pinned backup first, so a resume gets it back.
- **While a run is paused**, press **Put my library back** on the pack's **Tasks** tab to use the app with your own library. When the run goes on, it gets its library back, and your library as it was then is the one put back at the end.
All three packs have these tasks on their **Tasks** tab. A task doesn't run the pack's setup, so it works on a real ComfyUI as well as on the fake server, with or without a run going:
| Task | What it does |
|---|---|
| Put my library back | Restores the library from before the latest run. A run that is mid-way keeps its library for when it goes on. |
| Load the bench library | Backs your library up, then loads the bench library. **Put my library back** undoes it. |
| Back up now | A pinned, noted backup of the library as it is. |
| Library report | What is in the library, whose library is live, the backups (and which the pack made) and the AI settings. |
| Put the AI settings back | Deleting, auto-apply and the tool format as before the latest run. |
| Clean up the bench's backups | Deletes the backups the pack made and unpins what it pinned. It refuses while a run is mid-way or a run's library is live. |
With `putBack` off, the run's library stays when it ends (the AI settings still come back).
## Reference images
W7, C10, P10 and Z20 to Z22 attach an image. See [images/README.md](images/README.md).
## Change it
- `pack.ts`: the pack's settings, setup, flags and rubric.
- `shared.ts`: the collectors and the library reset, shared with the smoke pack.
- `lifecycle.ts`: setup, teardown and the tasks that put your library and AI settings back, shared by all three packs.
- `bench.ts`: the helpers the tests use. Examples: `h.panel`, `h.chat`, `h.aiIdle`, `h.applyCard`.
- `shapes.ts`: the shapes most tests share. Examples: `make`, `describe`, `edit`, `chat`, `organize`, `pack`.
- `tests/`: one file per section, in the bench page's order.
- `meta.json`: a copy of the bench page's tests. Keep it in step with the bench page.
Watchwright reloads the pack when a file changes, even in the middle of a run.
To try the clicks without ComfyUI or a model, run the manager on a fake model:
```bash
python bench/dev/serve.py
```
It serves the manager at `http://127.0.0.1:8189/wp/` on a fresh library, with a fake OpenAI-style model that answers every JSON step with a made-up value of the requested shape. Run the bench with `reset` on. The answers are nonsense, but every step runs, so a broken attempt points at a click that no longer works.
The fake model also takes a script of exact answers, which the smoke pack uses. See the docstring of `bench/dev/serve.py`.
Some bench tests attach an image to the request (W7, C10 and P10 a safe one; Z20, Z21 and Z22 an NSFW one). Put them here:
- `sfw.png` (or `.jpg`, `.jpeg`, `.webp`): any safe picture of a character or a scene.
- `nsfw.png` (or `.jpg`, `.jpeg`, `.webp`): an NSFW picture, for the Z tests.
The images stay on your machine: `.gitignore` keeps everything in this folder but this file out of git. A test whose image is missing skips itself and says which file it wanted.
The library's safety net, clicked through the way a person would: backups with notes, pins, pruning, live restore and its Undo, and the Library health page. No AI. It's a [Watchwright](https://github.com/DumiFlex/watchwright) test pack like the [bench](../README.md), and every test checks itself: a failing test means the app did something wrong.
## Run it
On the fake server, with no ComfyUI:
```bash
python bench/dev/serve.py
```
or on a real ComfyUI with this extension. Add this folder in Watchwright under **Packs › Add pack** and press **New run**. A run takes under a minute.
| Setting | What it does |
|---|---|
| `reset` | Off by default. Loads the bench library (`../bench-library.json`) first, after backing your library up. |
| `putBack` | On by default. Puts the library back when the run ends ([Putting your library back](../README.md#putting-your-library-back)). |
Each test deletes the backups it made, unpins what it pinned, removes its marker wildcard and puts **Backups to keep** back. The pack's teardown restores your library on top of that. The site key is the bench's, so it never runs while a bench or smoke run changes the library.
## The tests
| Test | Checks |
|---|---|
| D1 | **Back up now** with a note: the toast says Backup saved and the new row shows the note. |
| D2 | The bookmark pins a backup (pressed, the pinned count goes up, never "Removed at next backup") and unpins it. |
| D3 | With **Backups to keep** at 2, three more backups remove the oldest unpinned one and never a pinned one. |
| D4 | **Restore** from Settings › Library with no restart: the toast says Backup restored, a "Before restore" backup is kept, and a wildcard only the backup had is on the Wildcards page, reached without a page load. |
| D5 | The restore toast's **Undo** puts back the library the restore replaced. |
| D6 | Restoring a backup that isn't there answers 404, a name with a path in it is refused, and the library stays as it was. |
| D7 | Library health shows a group for each kind of finding the scan returns. |
`check-failed` (finding) names the check that failed. The pack has the bench's tasks ([the list](../README.md#putting-your-library-back)). They work on a real ComfyUI as well as on the fake server.
## Change it
- `pack.ts`: the pack's settings, flags, dashboard and lifecycle.
- `library.ts`: the Backups panel helpers, the marker wildcard, and `libraryTest`, which cleans up after each test.
description:"Backups with notes, pins, pruning that keeps pins, live restore from Settings › Library with the toast's Undo, a refused restore, and the Library health page.",
// The bench's site key, so this never runs while a bench or smoke run changes the library.
description:"Load the bench library first. Your library is backed up first and, with putBack on, put back when the run ends. Off, the tests run on the library as it is.",
},
putBack:{type:"boolean",default:true,description:"Put the library back when the run ends."},
check(h,label.includes(note),`its row's label is the note ("${label}")`);
});
},
);
libraryTest(
"D2",
{title:"Pin and unpin a backup",description:"The bookmark pins a backup (pressed, the pinned count goes up, never Removed at next backup) and unpins it again."},
async({h})=>{
constname=awaith.step("Make a backup to pin",()=>apiBackup(h,"Watchwright D2"));
h.log(`Put Backups to keep back to ${keepBefore}.`);
}
},
);
libraryTest(
"D4",
{
title:"Restore a backup live",
description:"Restore from the panel, with no restart: the toast says Backup restored, and a wildcard only the backup had is on the Wildcards page, reached without a page load.",
},
async({h},made)=>{
constname=awaith.step(`Back up with a ${MARKER} wildcard, then delete it`,()=>markedBackup(h,"Watchwright D4"));
constsaid=awaith.step("Restore it from Settings › Library",()=>restoreFromPanel(h,name));
constsaid=awaittoast(h,/before the restore|Could not restore/,60_000);
check(h,/before the restore/.test(said),`the second toast says the library is back to before the restore ("${said.replace(/\s+/g," ").slice(0,160)}")`);
});
check(h,!(awaitmarkerId(h)),`${MARKER} is gone again`);
},
);
libraryTest(
"D6",
{title:"A restore that can't run changes nothing",description:"Restoring a backup that isn't there answers 404, and a name with a path in it is refused; the library stays as it was."},
h.log(`Restored ${name} (the library it replaced is backup ${pre}).`);
awaith.visit("wildcards");
returnpre;
}
if(r.status===409&&/busy/i.test(r.text)&&i<6){
awaith.wait(5000);
continue;
}
if(r.status===404)thrownewStepError(`Backup ${name} is gone, so it can't be restored (deleted by hand, or the folder moved).`);
thrownewStepError(`Restoring ${name} was refused (${r.status}): ${r.text.slice(0,300)}. An older build needs a ComfyUI restart to restore; update the extension.`);
}
}
/** The extension's version, from the X-WP-Version header every API answer carries. */
h.log(`An earlier run never put your library back; backup ${String(state.get(K.original))} still has it (pinned). This run saves the library as it is now.`);
state.delete(K.runData);
// Forget backups that are gone (deleted after passing attempts, pruned), so the list stays small.
state.set(K.original,awaitbackup(h,state,`${NOTE}: your library before run ${run.id}`,{pin: true}));
state.set(K.holds,"run");
}elsestate.delete(K.holds);
if(params.reset===true){
// With putBack on, the person's library is already saved above; with it off, save it anyway
// (pinned), so a reset on a real ComfyUI never loses a library.
if(params.putBack===false)h.log(`Saved your library first as backup ${awaitbackup(h,state,`${NOTE}: your library before the bench library (run ${run.id})`,{pin: true})} (pinned).`);
"Restores the library you had before the latest run, with no restart. When a run is mid-way (paused or stopped), its library is kept first and given back when it goes on, so pause a run, use the app, and resume.",
run: async({h,state,run})=>{
awaitgiveOriginal(h,state,run!==null,run?`run ${run.id} is ${run.status}`:"no run is mid-way");
if(!run)awaitputAiBack(h,state);
},
},
"bench-library":{
title:"Load the bench library",
description:`Backs your library up (pinned), then loads bench-library.json: from its pinned backup when the fixture hasn't changed, else by importing it. Put my library back undoes it.`,
run: async({h,state,run,packDir})=>{
if(state.get(K.holds)!=="run"){
state.set(K.original,awaitbackup(h,state,`${NOTE}: your library before Load the bench library`,{pin: true}));
state.set(K.holds,"run");
}
if(run)h.log(`Run ${run.id} is ${run.status}: it gets the bench library as it is now.`);
awaitloadBenchLibrary(h,state,fixture(packDir));
},
},
"backup-now":{
title:"Back up now",
description:"A backup of the library as it is, pinned and noted, so nothing prunes it.",
readOnly: true,
run: async({h,state})=>{
constname=awaitbackup(h,state,`${NOTE}: backed up by hand`,{pin: true});
h.log(`Saved backup ${name} (pinned).`);
},
},
"library-report":{
title:"Library report",
description:"What is in the library, whose library is live, the backups (and which this pack made) and the AI settings, as a log.",
description:"Deleting, auto-apply and the tool format as they were before the latest run.",
run:({h,state})=>putAiBack(h,state),
},
"clean-up":{
title:"Clean up the bench's backups",
description:
"Deletes the backups this pack made (the bench library's too) and unpins what it pinned for a run. Refuses while a run is mid-way or while a run's library is live: Put my library back first.",
run: async({h,state,run})=>{
if(run)thrownewStepError(`Run ${run.id} is ${run.status}; finish or delete it first, it may still need these backups.`);
if(state.get(K.holds)==="run")thrownewStepError("A run's library is live, and its backups hold yours: run Put my library back first.");
description:"The AI assistant's bench: wildcards, fixed values, combines, derivations, constraints, templates, bundles, library tidying, chat and the pack builder, run against one model.",
description:"The model set up in Settings › AI assistant. It picks how many attempts each test gets (and the Fable subset).",
},
reset:{type:"boolean",default:false,description:"Load the bench library (bench-library.json) before the first test. Your library is backed up first either way."},
putBack:{type:"boolean",default:true,description:"Put your library and AI settings back when the run ends (a stopped run keeps its library for a resume). Off leaves the run's library in place."},
web:{type:"boolean",default:false,description:"Include the optional web tests (N1 to N5); they need web search set up."},
},
flags:{
"not-saved":"robot",
"no-card":"robot",
"model-loop":"finding",
"deleted-while-off":"finding",
"build-blocked":"finding",
"not-installed":"finding",
"unusable-answer":"finding",
"problem-fix-did-nothing":"finding",
"fix-changed-nothing":"finding",
"dismissed-findings":"info",
"research-skipped":"info",
"forced-click":"info",
"fake-answer":"info",
"fix-is-plan-change":"info",
},
rubric:[
{id:"correct",title:"Correct",description:"Does the answer work in the app: valid items, right variables, nothing broken?",scale: 5},
{id:"follows",title:"Follows",description:"Does it do what the prompt asked, and only that?",scale: 5},
{id:"quality",title:"Quality",description:"Would you keep it: good options, sensible weights, readable text?",scale: 5},
{id:"ui",title:"UI problems",description:"Anything wrong on screen while it ran.",choices:["none","minor","major"]},
],
// Video only for attempts that fail or break: a run with video on every attempt was 1.1 GB.
awaith.step(`Ask ${panelName(button,mode)}${files.length?" with an image":""}: ${said(t.P)}`,()=>h.panel(button,{...(mode?{mode}:{}),prompt: t.P,images: files}));
awaith.step("Keep the answer",async()=>{
awaith.keep("answer",PANEL);
awaith.panelShot("answer");
});
if(button==="cn-ai")awaith.step("Show the constraint's grid, tabs and preview",()=>constraintShots(h));
if(planOnly.length)h.flag("fix-is-plan-change",`${planOnly.length} problem(s) on items the code writes from the plan: ${planOnly.map((x)=>x.slice(0,80)).join(" · ")}`);
Every AI entry point of the manager once, checked pass or fail, in a few minutes. It's a [Watchwright](https://github.com/DumiFlex/watchwright) test pack like the [bench](../README.md), but where the bench keeps answers for you to score, the smoke pack checks them itself: a failing test means the app did something wrong.
On the fake model (`bench/dev/serve.py`) the chat tests script the model's exact answer, so each one knows which card it should get and what Apply and Undo must do to the library. On a real model the scripted tests skip and the rest still run.
## Run it
On the fake model, with no ComfyUI:
```bash
python bench/dev/serve.py
```
Add this folder in Watchwright under **Packs › Add pack** and press **New run**. The defaults (`fake` on, `reset` on) fit the fake server. A run takes about 6 minutes.
On a real ComfyUI with a model set up under **Settings › AI assistant**, turn `fake` off. `reset` works there too: your library is backed up (pinned) before the bench library goes in, and with `putBack` on it comes back when the run ends.
| Setting | What it does |
|---|---|
| `fake` | The manager is `bench/dev/serve.py`. Off, the scripted tests skip. |
| `reset` | Loads the bench library (`../bench-library.json`) before the first test, after backing your library up. |
| `putBack` | On by default. Puts the library and AI settings back when the run ends, like the bench ([Putting your library back](../README.md#putting-your-library-back)). |
| `format` | The chat's tool format: Auto, Native tool calls or JSON steps. Run the chat tests once with each. |
The site key is the bench's, so a smoke run and a bench run never change the library at the same time. Attempts keep a video only when they fail or break, and the pack has the bench's tasks (**Back up now**, **Put my library back**, **Library report** and the rest). They work on a real ComfyUI as well as on the fake server. The **Dashboard** tab shows pass rate, a test-by-run grid and pass rate per section for each tool format, failures and flaky tests.
## The tests
| Test | Checks |
|---|---|
| A1 | Test connection says Connected, with JSON answers working. |
| C1 to C9 | Chat: a plain reply, a create card and an edit card (Apply, then Undo leaves the library exactly as before), deleting refused while it's off, a Delete card with deleting on, an `@` mention reaching the model, questions with Decide for me, `open`, and one unscripted question. |
| E1 to E14 | Every editor's AI panel: the wildcard panel in each mode, describe, fixed values, combine, derivation, constraint, template, bundle split and Organize. Each answers, offers its answer to apply, and applies it to the editor. Only E1 saves, and deletes what it made. |
| P1 | Pack builder: plan, build, install, then Undo leaves the library as it was. |
| G1, G2 | Safety guard: a pack request for minors is refused before any model call, and an option that names a minor in a sexual context is never offered. |
A finding flag fails the test:
| Flag | Meaning |
|---|---|
| `ai-error` | The AI showed an error. |
| `no-answer` | Nothing came back, or the panel had nothing to apply. |
| `no-card` | The chat turn ended without the card it should have. |
| `wrong-card` | The card doesn't show what the model asked for. |
| `undo-left-changes` | Undo didn't bring the library back exactly. |
| `deleted-while-off` | The chat deleted something, or offered to, while deleting was off. |
| `guard-missed` | The safety guard let something through. |
`script-left-over` (info) means the app asked the model fewer times than the test expected.
## The fake model's script
`smoke.ts` wraps the fake's script API (`bench/dev/serve.py` has the details):
- `script(h, ...answers)` queues answers: `{ calls: [{ tool, args }] }` for a chat step that calls tools, `{ text }` for a reply, `{ json }` for the next request that asks for a JSON schema (an editor panel, the pack builder).
- `fakeLog(h)` lists the calls the manager made since the queue was cleared. The pack clears it before every test.
A panel answer must be valid for the item: wildcard edit modes name options by number (from 1), and a panel drops what doesn't fit the library, so a made-up answer often ends as "nothing to change".
## Change it
- `pack.ts`: settings, flags, setup and the hooks around each test.
- `smoke.ts`: the script helpers, library snapshots and `check`.
- `tests/`: one file per area. `smoke(id, meta, body)` declares a test; `scripted: true` skips it on a real model.
The tests use the bench's helpers (`../bench.ts`: `h.panel`, `h.chat`, `h.applyCard`, …) and its collectors (`../shared.ts`), so each attempt keeps the same AI debug log, console errors and failed requests.
description:"Every AI flow of the manager once, pass or fail: editor panels, chat cards with Apply and Undo, deleting, questions, mentions, the pack builder and the safety guard.",
// The same site key as the bench, so a smoke run and a bench run never change the library at once.
description:"The manager is bench/dev/serve.py: chat tests script the fake model's answers. Off, scripted tests skip and the rest run on the model in Settings › AI assistant.",
},
reset:{
type:"boolean",
default:true,
description:"Load the bench library (bench-library.json) before the first test. Your library is backed up first and, with putBack on, put back when the run ends, so it is safe on a real ComfyUI too.",
},
putBack:{type:"boolean",default:true,description:"Put the library and AI settings back when the run ends."},
{title:"To look at",tiles:[{failures: true,width: 2},{flaky: true,width: 2},{flags: true,kind:"finding",title:"Findings",width: 2},{links:[{compare:"last",label:"Compare with the last run"}],width: 2}]},
if(params.fake===true&&!fake)thrownewStepError("fake is on, but the manager isn't bench/dev/serve.py (no /fake/script). Start it, or turn fake off for a real model.");
// The library and AI settings saved (teardown puts them back), then the bench library.
{title:"Test connection answers",section:"Connection",description:"Settings › AI assistant › Test connection says Connected, with JSON answers working."},
async({h})=>{
consttext=awaith.step("Settings › AI assistant › Test connection",async()=>{
check(h,!!made&&["crimson","teal","amber"].every((o)=>options.includes(o)),"apply-did-nothing",`Apply made Smoke colours with ${options.length} option(s)`);
awaith.step("Undo the card, then compare the library",()=>h.undoCard());
check(h,(awaitsnapshot(h))===before,"undo-left-changes","Undo left the library exactly as before");
awaitnoAiError(h);
},
);
smoke(
"C3",
{
title:"Edit card: add options, Apply, Undo",
section: SECTION,
scripted: true,
tags:["changes-library"],
description:"An add_options call on Weather becomes a change card; Apply adds the option, Undo takes it out again.",
},
async({h})=>{
constbefore=awaitsnapshot(h);
awaitscript(h,{calls:[{tool:"add_options",args:{id:"Weather",options:[{text:"smoke test haze"}]}}]});
awaitsend(h,"Add a hazy option to Weather.");
awaith.step("Apply the Weather change card",()=>h.applyCard());
check(h,gone,"apply-did-nothing","Weather copy is deleted");
awaith.step("Undo the card, then compare the library",()=>h.undoCard());
check(h,(awaitsnapshot(h))===before,"undo-left-changes","Undo brought Weather copy back exactly");
}finally{
awaith.setAiConfig({allow_delete: false});
}
},
);
smoke(
"C6",
{title:"A mention reaches the model",section: SECTION,scripted: true,description:"An @Weather picked from the menu goes to the model with the message."},
/** The fake model's answer, valid for this item (option numbers count from 1). */
answer?: unknown;
}
constpanels: Panel[]=[
{id:"E2",title:"Wildcard: add options",kind:"wildcards",name:"Outfit",button:"wc-ai-draft",mode:"add",prompt:"5 more outfits for a fantasy adventurer"},
{id:"E3",title:"Wildcard: remove options",kind:"wildcards",name:"Outfit",button:"wc-ai-draft",mode:"remove",prompt:"remove the modern clothes",answer:{remove:[{id: 10,reason:"modern streetwear"}]}},
{id:"E4",title:"Wildcard: rewrite options",kind:"wildcards",name:"Outfit",button:"wc-ai-draft",mode:"rewrite",prompt:"make the first option more vivid",answer:{options:[{id: 1,text:"faded denim jacket over a crisp white t-shirt"}]}},
{id:"E5",title:"Wildcard: retag options",kind:"wildcards",name:"Outfit",button:"wc-ai-draft",mode:"retag",prompt:"tag the first option formal",answer:{options:[{id: 1,tags:["formal"]}]}},
{id:"E6",title:"Wildcard: reweight options",kind:"wildcards",name:"Outfit",button:"wc-ai-draft",mode:"reweight",prompt:"make the chainmail rarer",answer:{options:[{id: 6,weight: 0.2}]}},
{id:"E7",title:"Describe an item",kind:"wildcards",name:"Weather",button:"identity-ai",prompt:""},
{id:"E8",title:"Fixed values panel",kind:"fixed-values",name:"Anime style",button:"fv-ai",prompt:"add a soft lighting line",answer:{values:[{name:"lighting",value:"soft diffused lighting",negative:""}]}},
{id:"E9",title:"Combine panel",kind:"combines",name:"Character phrase",button:"cb-ai",prompt:"put the mood first"},
{
id:"E10",
title:"Derivation panel",
kind:"derivations",
name:"Light from weather",
button:"drv-ai",
prompt:"cold blue light when it snows",
answer:{rules:[{edits: 1,summary:"cold light in snow",branches:[{match:"all",conditions:[{var:"weather",op:"contains",value:"snow"}],actions:[{target_var:"light",mode:"replace",value:"cold blue light"}]}],else_actions:[]}]},
},
{id:"E11",title:"Constraint panel",kind:"constraints",name:"Race → class",button:"cn-ai",prompt:"orcs are never mages",answer:{rules:[{source:"orc",target:"mage",effect:"exclude",factor: 0,reason:"orcs don't study magic"}]}},
{id:"E12",title:"Template panel",kind:"templates",name:"Bench portrait",button:"tpl-ai",prompt:"add the weather at the end"},
];
for(constpofpanels){
smoke(p.id,{title: p.title,section: SECTION,description:`${p.name}› AI${p.mode?`›${p.mode}`:""}: the panel answers, the answer applies to the editor, and no AI error shows. Nothing is saved.`},async({h,params})=>{
{title:"Organize with AI",section: SECTION,description:"Wildcards › select all › Organize with AI: the panel answers with changes to apply. Nothing is applied."},
async({h})=>{
awaith.step('Select all wildcards › Organize with AI: "file each into the right category"',async()=>{
awaith.visit("wildcards");
awaith.tap('[aria-label="Select all"]');
awaith.tap("bulk-ai-organize");
awaith.panel("bulk-ai-organize",{prompt:"file each into the right category"});
awaith.keep("answer",PANEL);
awaith.panelShot("answer");
});
check(h,awaith.shows("ai-apply",5000),"no-answer","Organize shows changes to apply");
description:"Pack builder › describe › Plan it (questions left to Decide all) › Build › Install: each step shows no error, Install adds to the library and Undo leaves it as it was.",
},
async({h})=>{
constbefore=awaitsnapshot(h);
awaitplanPack(h,"A small pack for fantasy tavern scenes: a patron, their drink and the mood.");
if(awaith.shows("pack-decide-all"))
awaith.step("Answer the questions with Decide all",async()=>{
check(h,asked===0,"guard-missed",`the model was asked ${asked} time(s) with the request`);
}
},
);
smoke(
"G2",
{
title:"Guard: a blocked option is never kept",
section:"Safety guard",
scripted: true,
description:"The add panel gets one fine option and one that names a minor in a sexual context: only the fine one is offered, and the panel says it skipped one.",
},
async({h})=>{
awaitscript(h,{
json:{
options:[
{text:"silk robe tied at the waist",weight: 1,tags:["casual"],negative:""},
{text:"nude, no clothes, loli",weight: 1,tags:["casual"],negative:""},
],
},
});
consttext=awaith.step('Outfit › ask the wildcard panel (add): "2 more outfits" (the fake adds one blocked option)',async()=>{
awaith.open("wildcards","Outfit");
awaith.panel("wc-ai-draft",{mode:"add",prompt:"2 more outfits"});
constanswer=awaith.keep("answer",PANEL);
awaith.panelShot("answer");
returnanswer;
});
check(h,/silk robe/.test(text),"no-answer","the fine option is offered");
check(h,!/loli/i.test(text.replace(/skipped[^\n]*/gi,"")),"guard-missed","the blocked option is not offered");
check(h,/skipped/i.test(text),"guard-missed","the panel says it skipped one");
Every custom control in the extension follows these rules. The [wp-kit site](https://dumiflex.github.io/wp-kit/) shows each one live; the App pieces page (Settings › Advanced › Component kit, route `/wp/kit`) shows the few that only the extension has. Build screens from the kit. When nothing fits, make a new kit component that follows this page, in the same PR as the screen that needs it.
## 1. Where it lives
| Folder | What goes there |
|---|---|
| `@/kit/` | The shared kit, the npm package [`@dumiflex/wp-kit`](https://www.npmjs.com/package/@dumiflex/wp-kit) from [DumiFlex/wp-kit](https://github.com/DumiFlex/wp-kit) (the community site uses it too). `@/kit/<file>` points into the package's source. To change a piece, change it in wp-kit, release it, then bump the dependency here. It holds the pieces both the canvas and the manager use: overlays (`Popover`, `DropdownMenu`, `ContextMenu`, `tooltip.ts`, `ModalShell`, `Modal`, `ConfirmModal`), controls (`SearchInput`, `WpNumber`, `Checkbox`, `WpSelect`, `Button`, `WpIconButton`, `WpSwitch`, `WpTabs`, `WpSegmented`, `Disclosure`, `Banner`, `CopyButton`, `Slider`, `ColorField`, `TagInput`, `InlineEdit`, `DropZone`, `Toolbar`, `Combobox`, `DatePicker`, `RadioGroup`), display and layout pieces (`Badge`, `Kbd`, `DescriptionList`, `CodeBlock`, `Separator`, `Stepper`, `Pagination`, `ResizeHandle`, `SplitPane`, `SortableList`, `Avatar`, `Timeline`, `DiffView`, `ImageGrid`, `VirtualList`, `VisuallyHidden`), the `Lightbox` overlay, feedback (`ProgressBar`, `Skeleton`, `WorkingLine`, the `motion.css` entrances) and the toast look (`ToastCard`). It also holds the manager controls (`Input`, `Select`, `Drawer`, `DataTable`, `ChoiceCards`, `useToast` + `ToastHost` and the rest) and the theme sheets in `theme/`. Kit pieces style themselves with scoped `wp-*` CSS, never Tailwind classes. |
| `src/components/shared/` | Canvas pieces that are not shared with other apps: the seed list, frame chips, the toast stack, `useHostDialogGuard`, and the canvas colour sheet `theme.css`. |
A component anywhere else is a part of one screen, not a control. If a second screen needs it, move it into wp-kit first. Only a piece that calls the app's API, store or router stays in the app, built from kit pieces.
## 2. Kit entry and demo
- A kit piece gets its entry and demo on the wp-kit site, in the same wp-kit PR: an entry in `site/src/registry.ts` and the demo in `site/src/demos/<id>.vue`. The entry has:
- `id`, `name`, `group`, `file` and `surfaces`;
- a `use` line saying when to reach for it;
- an `instead` line naming what it replaces;
- a `KIT_EXAMPLES` line.
- The demo shows every variant and every state that applies: default, disabled, invalid, loading, empty.
- wp-kit's `site/src/coverage.test.ts` fails when a piece has no entry, or a demo has no entry.
- An app piece (built from the kit but wired to the extension's stores, like `RichTextInput`, or `SelectionToolbar`, the kit `SelectionBar` with the wildcard editor's menus) gets the same entry in `src/manager/kit/registry.ts` and its demo in `src/manager/kit/demos/<id>.vue`. They show on the App pieces page (`/wp/kit`). `kit-coverage.test.ts` fails when a component in `src/components/shared/` has no entry.
## 3. Prop names
Use one name per meaning, everywhere:
| Prop | Values | Meaning |
|---|---|---|
| `size` | `sm` / `md` / `lg` | Control height (see 4). |
| `variant` | `primary` / `secondary` / `ghost` / `danger` / `link` | What the control is. An icon-only button is any variant with `icon` and an `aria-label`. |
| `tone` | `neutral` / `info` / `success` / `warn` / `danger` / `accent` | What it means. Chips, banners and badges use it. |
| `disabled`, `readonly`, `invalid`, `loading` | boolean | States. |
| `v-model` (`modelValue`) | | The value. |
| `v-model:open` (`open`) | boolean | Whether an overlay is open. |
Don't add synonyms such as `kind`, `small`, `busy` or `visible` for these meanings. (ModalShell and ContextMenu keep `visible` until they are next touched.)
## 4. Sizes
- Controls come in three heights: 24 px (`sm`), 32 px (`md`) and 40 px (`lg`). Buttons, inputs, selects, number fields and segmented controls share these heights.
- The canvas defaults to `sm`, the manager to `md`.
- Button, Input, Select and WpNumber are on it (`size` sm/md/lg). The manager's Density setting scales all three heights together through `--wp-density`. `SearchInput` takes `size` on the scale too (canvas `sm`, manager forms `md`).
- Hit targets are at least 20 px on the canvas and 24 px in the manager. An icon inside a chip may draw smaller, but its click area must not be.
- The one control below the scale is `WpIconButton`, the 20 px icon button inside a canvas row, where 24 px does not fit.
## 5. Tokens only
- Colours, radii, spacing, shadows and type come from `--wp-*` tokens. kit-guard counts raw hex colours, and a file's count may not go up.
- A kit piece (`@/kit/`, and the shared pieces left in `src/components/shared/`) uses only the names both surfaces define. The list is `SHARED_TOKENS` in the kit's `tokens.ts`; wp-kit's `tokens.test.ts` fails when a kit piece reads a name outside it, and `src/components/shared/shared-tokens.test.ts` fails when either side stops defining one. That is how one component wears the canvas colours in a node and the manager colours on a page.
- Shadows follow the floating thing's size: `--wp-shadow-sm` for resting cards, `--wp-shadow-md` for menus, popovers, tooltips and dropdown lists, `--wp-shadow-lg` for dialogs, `--wp-shadow-xl` for drawers and full-page panels. A small menu never gets a dialog's shadow.
- Every component must work in both light and dark.
- Every component must work in every manager look and colour theme (`kit/theme/looks.css`, `kit/theme/palettes.css`). A fixed corner is written `min(6px, var(--wp-radius-cap, 999px))` and a pill `var(--wp-radius-cap, 999px)`, so Terminal and TUI square it and Crisp nearly squares it. On the canvas a pill with a visible border gets a finite radius a little under half its height instead (`min(12px, var(--wp-radius-cap, 999px))` on a 26 px pill): Firefox draws a bordered full pill in pieces that seam at canvas zooms like 0.64 and 0.8 (`components/shared/canvas-pill-seams.test.ts` fails otherwise; overlays drawn at scale 1 are exempt) (`scripts/theme-audit/theme-audit.test.mjs` fails on a raw `border-radius: 6px`). A circle inside a control (switch knob, slider thumb, step mark, round icon button) is `min(50%, var(--wp-radius-cap, 999px))` so it squares with its box; a dot, avatar, swatch or radio that stays round in every look carries `/* round: <why> */` on the same line (the test fails on a bare `50%`). A selected item uses `[data-active="true"]` (or `aria-current`) and gets its rule in each look that draws selection its own way. A checkbox is `ui/Checkbox` (`field` for a filter in a form grid), never a hand-drawn `.wp-check` with an inline style on its tick.
- The theme audit (`scripts/theme-audit/`, CI job `theme-audit`) opens every manager screen in every look and palette and fails on spills, sideways scroll, wrapped one-line controls, a checkbox drawing its state twice, a TUI radio not reading `( )` / `(*)`, a circle inside a squared control, corners or fonts a look doesn't allow, and text under 3:1. Run it locally with `python scripts/theme-audit/serve.py &` then `node scripts/theme-audit/audit.mjs --shots`. Add a screen to its `SCREENS` list when you add a page.
- A component never `@import`s `theme.css`: the canvas loads it once from the boot chunk (`extension/settings.ts`), so its tokens and `.wp-*` classes are always there.
- A component never writes to `:root`. The canvas colour sets in `theme.css` skip `html.wp-manager`, and a canvas piece shown in the manager puts `wp-canvas-scope` on its own root.
## 6. Accessible by default
- Everything a mouse can do, the keyboard can do. Tab moves between controls. Inside a group (tabs, menus, radios, segmented controls), the arrow keys move and Home/End jump to the ends.
- Overlays:
- close on Escape;
- give focus back to whatever opened them;
- dialogs keep Tab inside (use `useDialogFocus`).
- an overlay that can open on top of a ComfyUI dialog (the Display playground opens from Settings) also uses `useHostDialogGuard`: ComfyUI's reka dialogs turn off clicks outside themselves, trap focus and close on an outside click or Escape.
- Hints use `v-tooltip`, not `title=`.
- Icon-only buttons have an `aria-label`. The × that closes something is `Button variant="ghost" icon="times" aria-label="Close"`; the `aria-label` is its tooltip (Button never sets `title`); a copy is `CopyButton` (or `copyText` from `kit/clipboard.ts` behind a menu item), never `navigator.clipboard` directly, which is missing over plain http.
- Shared pieces style themselves in `<style scoped>`, not in `@layer wp-extension`: the manager's Tailwind reset is unlayered and would beat a layered rule on `<button>`.
- Motion respects `prefers-reduced-motion`.
## 7. Overlays go through the kit
Anything that floats goes through the kit's overlays and positions with `floating.ts`:
| What floats | Use |
|---|---|
| Panel next to a control | `Popover` |
| Menu behind a button | `DropdownMenu` |
| Menu at the pointer | `ContextMenu` |
| Hint | `v-tooltip` |
| Side panel | `Drawer` |
| Dialog | `Modal` / `ConfirmModal` (both sides), `ModalShell` for a panel of its own |
Anything that floats next to a trigger follows it when the page scrolls or resizes; a menu opened at the pointer closes on scroll. Never write another Teleport with its own placement maths, scroll handling or outside-click handler.
A panel closes once its trigger has scrolled out of view. A scroll inside the panel itself changes nothing.
## 7b. Loading, empty and disabled
- Loading: `LoadingMark`. A page or panel that is loading gets the full logo (`block`); a tight inline spot (a text row, a button, a list item) gets the sparkle, which is the default below 24 px. A busy button keeps its own colours and draws the sparkle in its label colour.
- Empty: `EmptyState` with `size``page` (an empty list page), `panel` (the default, in a card or panel) or `inline` (one row).
- Disabled: 45% opacity and a not-allowed cursor, with no hover change. A ticked checkbox or picked radio turns grey, so it can't be mistaken for a live one.
- Readonly: dashed border, dimmer fill, no focus ring, and a lock on Input.
## 8. Canvas twins share a stylesheet
When the canvas needs its own version of a manager control (Button, Switch, Select, Number), both versions use the same stylesheet in the kit (`button.css`, `WpSwitch.vue`). A change to one then changes both. The kit shows each shared piece in both looks (`kit/KitLooks.vue` draws a demo twice, at the canvas size `sm` and the manager size `md`; the manager never loads the canvas colours, so both wear the manager's).
Better still is one component for both sides, with only `size` changing. `WpSwitch` is the on/off switch everywhere (`size="md"` in the manager), and `WpTabs` and `WpSegmented` are the tabs and value pickers everywhere. A canvas widget never draws its own `role="switch"`, tab strip or joined-button group.
`Button` is the one button on both sides: variants, sizes and `button.css` pulled in scoped, with a PrimeIcons `icon` (with or without `pi-`) and `iconRight`. It is `md` by default, so canvas buttons pass `size="sm"`. Every canvas dialog footer, toolbar, reset, retry and launcher button is a `Button`; never another `__btn` class with its own colours. It also has:
- `variant="add"`: the dashed "Add a row" button at the end of a list, with `block` for full width.
- `pressed`: a toggle (`aria-pressed`), such as "favourites only" or a filter panel trigger.
- `hint` (Button, WpIconButton): a tooltip, `kbd` (Button) its key chip. Don't put `v-tooltip` on the component, which would fight the button's own.
Inside a row (module, injector, bundle and Model Info rows, the Context toolbar), the icon actions are `WpIconButton`: 20 px, a `tone` that tints the icon on hover and the box while `pressed`, `pressed="mixed"` for a bundle's "some children" state, and `variant="bare"` for the fold caret. Every × that closes a canvas dialog is `Button variant="ghost" icon="times" size="sm"`. Every checkmark box is `Checkbox`, including the 12 px on/off box of module, bundle and injector rows (`size="sm"`). The Settings live preview (`components/settings/`) uses the same pieces as the nodes it previews.
## 9. Isolation
- Every class starts with `.wp-`.
- Standalone CSS sits in `@layer wp-extension`.
- Litegraph state goes in WeakMaps.
- Saved state goes on `node.properties`.
See CLAUDE.md, "Extension isolation".
## 10. Reuse first
kit-guard (`scripts/kit-guard.mjs`) counts hand-built controls per file: native select, number, checkbox and range inputs; inline SVG; own dialogs; raw `<button>` in the manager; raw hex colours.
- A file's count may not go up.
- When a file's count goes down, run `pnpm kit:baseline` and commit the new baseline.
- A raw control needs a reason the kit can't cover. Usually the fix is to add the missing piece to the kit.
## 11. One component per job
Each of these jobs has exactly one component. Don't build a second one, and don't style a native element to look like it.
| Job | Use | Not |
|---|---|---|
| Search or filter a list | `SearchInput` (with `visible` / `total` for "3 of 12"); `ListFilter` in an editor card | `Input` with a search icon, a hand-made box |
| A number | `WpNumber` (`nullable` when empty means "default") | `<input type="number">`, `Input type="number"` (removed) |
| A tag, status or category | `Chip` (`tone` for meaning, `color` + `icon` for a category) | `CategoryChip` (merged), a pill `span` |
| A toast | `useToast()` (manager) or `pushToast()` (canvas); both draw `ToastCard` | a toast styled per surface |
| Look at a picture closely | `WpImageZoom` (`v-model:zoom`, Fit / 100% / 200%, wheel, drag) | an `<img>` with `max-width: 100%` called a zoom, a hand-made transform with its own wheel and drag code |
| Ask before acting | `ConfirmModal` (both sides; `tone="danger"` for what can't be undone) | `window.confirm()` |
| How far a job is | `ProgressBar` (no `value` while unknown) | a div with a width set by hand |
| Content about to land | `Skeleton`; a whole page or panel: `LoadingMark block` | `wp-skel` classes, a "Loading…" flash |
| A count or a status dot | `Badge` (`dot` + `text` or `label`) | a coloured span, a count pill |
| A number on a range | `Slider` (`with-input` for the exact value) | `<input type="range">` |
| A list of words | `TagInput` | a comma-split text box |
| Rename in place | `InlineEdit` | a pencil that swaps in an `<input>` |
| Take files | `DropZone` (`overlay` over a panel) | own `dragover` / `drop` handlers |
| Put rows in order | `SortableList` | HTML drag and drop with its own handle |
| Drag a panel's size | `ResizeHandle`, or `SplitPane` for two panels | own mousemove maths |
| Steps of a job | `Stepper` | numbered circles per wizard |
| A long list in pages | `Pagination` (`mode="more"` for Load more) | own Prev / Next |
| Label and value rows | `DescriptionList` | a grid per panel |
| Text kept as written | `CodeBlock` | a bare `<pre>` |
| A shortcut | `Kbd` (`Mod+K`) | `<kbd class="wp-kbd">`, a hard-coded ⌘ |
| A divider | `Separator` | `<hr>`, a bordered div |
| A row of tool buttons | `Toolbar` (`attached` for a button group) | a flex row with a Tab stop per button |
| Pick from a long list | `Combobox` (`multiple` for several) | a search box over a hand-made list |
| A calendar day | `DatePicker` | `<input type="date">` |
| A low and high number | `Slider` with a `[low, high]` v-model | two Sliders that can cross |
| One of a few explained options | `RadioGroup` (`cards` for big choices) | `.wp-radio` inputs with own hint text |
| One of a few options that need a picture | `ChoiceCards` (`compact` for a side panel) | a grid of `role="radio"` buttons with their own selected border |
| A person or bot | `Avatar` | an initials circle per screen |
| Events in order | `Timeline` | a list with its own dots and line |
| What changed | `DiffView` | two boxes side by side, colour alone |
| Images in a grid, full screen | `ImageGrid`, `Lightbox` (`zoom` puts each in `WpImageZoom`) | `<img>` wraps with own zoom overlay |
| Thousands of rows | `VirtualList` | rendering every row |
| Text for screen readers only | `VisuallyHidden` | another 1 px clip rule |
| A settings list | `SettingGroup` + `SettingRow` (the manager's `settings/SettingRow.vue` only adds the route-hash flash as `highlighted`) | a bordered card per setting, own narrow-width rules |
| Rows are ticked | `SelectionBar` (actions in the default slot, `sticky` over a scrolling list; `BulkDeleteToolbar` / `SelectionToolbar` are built on it) | a count, spacer and Clear row per editor |
| Pick an icon | `IconPicker` (`all` for every glyph with search, `inline` for the list in a panel, `color`, `allow-none`); glyph names in `pi-icons.ts` | a hand-made icon grid (`NoteIconGrid`, removed) |
Marks a spot on the canvas so you can jump back to it with a shortcut or from the **Bookmarks** dock. Frontend only: it never runs and is left out of the prompt; its settings are saved with the workflow.
## Adding one
- From the node search (`WP Bookmark`), or right-click the empty canvas ›**Add WP Bookmark here**.
- **Bookmark this view** (in the dock's edit mode, or as a command) adds one at the top-left of the screen with the zoom you're at, so jumping to it brings back this exact view.
- A new bookmark gets the first free shortcut (Alt+1, Alt+2…).
A **WP Note** can be a bookmark too: turn on **Also a bookmark** in its editor (see WP Note). It gets the same settings and shows in the dock, but never hides.
## On the canvas
A bookmark has no node frame and can't be resized: it is a small pill with its icon, name and shortcut (a warning mark when something else uses the key, a pin when it is pinned). Hover it for where it lands. A double-click, or the indigo pencil in ComfyUI's selection toolbar while it is selected, opens the editor, and **Done** closes it. A new bookmark opens in the editor.
<!-- fields:start -->
## On the node
- **Icon, colour, name**: The icon opens the full icon list. The colour marks the pill and its dock row.
- **Lands at**: A 3×3 grid: the corner, edge or centre of the free part of the screen (what ComfyUI's toolbar, the open side panel and the bottom panel leave, following them as they open and close), 24 px in. A jump that would land under the dock, the minimap or the zoom controls moves just enough to clear them all (the dock only while its Land clear of the dock switch is on). It lands in the same place however often you press the key, selected or not. Only the layout counts: what pops up on its own (the job progress panel while a workflow runs, the error card, toasts, menus, tooltips, dialogs) never moves it.
- **Use this view**: Lands on the view on screen now, at its zoom, instead of a grid spot.
- **Zoom**: Set jumps to that zoom (0.1–10×; the magnifier takes the zoom you're at). Keep current leaves it alone.
- **Shortcut**: Record, then press the keys (Esc cancels, Backspace clears). The bolt picks a free one, a new one on each press.
- **Show on canvas**: Off hides the node when you press Done: not drawn, not clickable, not selectable. The dock's eye shows it again.
- **Pinned**: ComfyUI's own pin: a pinned bookmark can't be moved by accident.
- **Go**: Tries the jump.
## The Bookmarks dock
- **Row**: Click to jump. Number (a Step note's in its circle), icon, name and shortcut; a mark for one hidden on the canvas or inside a subgraph, OFF for a muted one.
- **Back**: Return to where you were before the last jump.
- **↑ / ↓**: Step through the bookmarks that are on, in dock order.
- **Pencil**: Edit mode: drag the dock by its header and it snaps to the nearest spot of a 3×3 grid on the free canvas (a dashed outline shows where); drag the grips to reorder, the eye shows or hides a bookmark on the canvas, and Bookmark this view adds one. Land clear of the dock (on by default) moves a jump out from under the dock; off, bookmarks land where they would without it, behind the see-through dock. Done goes back. The dock follows the layout (side panels, the bottom panel, the top bar, the minimap and zoom controls, a floating run bar) and stays put when the job progress panel, the error card, a toast or a menu pops up; those float over it.
<!-- fields:end -->
## Shortcut clashes
While you set a shortcut the node lists who else uses it:
- **Refused**: keys the browser keeps (Ctrl+T, Ctrl+W, Ctrl+1–9, F5…).
- **Warning**: a ComfyUI shortcut (including ones you changed in Settings › Keybinding), another extension's shortcut, another WP Bookmark, or an rgthree bookmark in the same workflow.
- **Note**: a key with no Ctrl or Alt fires whenever the canvas has focus (never while you type).
Extensions that read keys themselves declare nothing a keymap could show, so the node also asks the page: when you record a key or press the bolt, it sends a pretend key press and watches for anything that claims it. A key something answers is listed as taken, and the bolt skips it. The pretend press carries the same key codes a real press does, so extensions that only read those (like ComfyUI-Easy-Use's Alt+0–9 node template keys) are found too. It stops a handler at the moment it claims the key, so nothing runs; a handler that acts without claiming the key can't be seen this way.
If an extension still takes the key first when you press it, the bookmark doesn't jump and a toast names the combo once, so you can pick another. The key is remembered: the clash check marks it from then on and the bolt never suggests it.
## Commands
**Next bookmark**, **Previous bookmark**, **Back**, **Bookmark this view** and **Show or hide the dock** are in Extensions › Wildcard Pipeline › Bookmarks. They have no keys by default: bind them in Settings › Keybinding.
The pipeline's module runner. Holds an ordered list of **modules** (wildcards, fixed values, combines, derivations, constraints) plus optional **bundles** that group related modules. Each queue, the engine executes every enabled module in order, building up a context of`$variable`bindings that downstream nodes consume.
The heart of the pipeline. Holds a stack of **modules** (wildcards, fixed values, combines, derivations, constraints and bundles), runs them top to bottom on every queue, and sends the resulting`$variables`downstream.
## Inputs
<!-- fields:start -->
## Inputs and outputs
- **upstream***(optional)* — chain another WP Context to inherit its bindings. Same-name bindings in this node override the upstream.
- **seed**— drives every random pick this run (wildcards, weighted lookups). `control_after_generate` rotates per queue. Per-row seed locks override per-instance.
- **modules***(widget)* — the ordered module list. Picked from the library or created inline.
- **upstream (in)**`context`: Optional. Another WP Context, an Injector, Model Info or a Loop. This node starts with their variables and can add to them or replace them.
- **seed**`INT`: Decides every random pick in this node. See Seeds & loops.
- **context (out)**`context`: The variables. Wire it into a WP Prompt Assembler, a WP Debug or another WP Context.
## Output
## Row markers
- **context** — `PIPELINE_CONTEXT` payload carrying all bindings + run trace + warnings. Feed into WP Prompt Assembler, WP Prompt Cleaner, WP Debug, or chain another Context.
## Module kinds
| Kind | What it does |
|---|---|
| **wildcard** | Picks one option from a weighted list. Roll changes each queue. Supports sub-categories, nested `@{uuid}` refs, null slots. |
| **fixed_values** | Assigns explicit `name = value` bindings — no randomness. Quick way to define static vars. |
| **combine** | Template-fills `$vars` into a string and writes the result to a new binding. E.g. `$mood $subject` → `subject_phrase = "sleepy cat"`. |
| **derivation** | IF/ELIF/ELSE conditional rules over the runtime context. E.g. *if `$mood == sleepy` then `$lighting = soft`*. |
| **constraint** | Re-weights a target wildcard's options based on a source wildcard's pick. E.g. *if `$hair == bald` then exclude `$style == braided`*. First-instance: fires on the first matching target downstream, then consumed. |
Bundles group modules that belong together (e.g. "final framing": all the wildcards + the combine that builds the final prompt). They're reusable across workflows.
- **Coloured dot or label**: Something to look at, such as MISSING VAR or a variable set twice. Blue is for your information, amber is worth a look. Hover for the message. Nothing here stops a run.
- **drift**: The library entry changed after you added it. Right-click → Refresh from library to take the change. On a bundle it reads library updated; right-click the bundle → Reset to library snapshot.
- **missing**: The entry isn't in your library (deleted, or the workflow came from someone else). The row still works from its own copy; right-click → Save to library to add it.
- **mod**: You changed this row on the node, so it differs from the library.
- **held**: Hold across run is on.
- **Lock / globe / bin**: The row buttons: lock the pick, hide the variable from the prompt, remove the row. Set Row buttons to On hover (ComfyUI Settings or the Display Playground) to show them only when the pointer is on the row; a pressed lock or globe always shows.
<!-- fields:end -->
## How to use
1. Click **+ Add module** to insert a row. Pick from the library, or create a Fixed Values entry inline.
2. Order matters — modules run top-to-bottom. A combine that reads `$mood` must come after the wildcard that picks `$mood`.
3. Wire the **context** output into a WP Prompt Assembler / WP Prompt Cleaner / WP Debug.
1. Click **Add module** and pick one from your library (or **Add Bundle** for a saved group).
2. Order matters: modules run toptobottom. A combine that reads `$mood` must sit below the wildcard that picks `$mood`, and a constraint sits between its two wildcards.
3. Wire **context** into a WP Prompt Assembler and write a template like `a photo of $subject`.
Drag a row by its handle to reorder. Drag onto another Context node to move it. Toggle the checkbox to disable a row without deleting it.
## Per-row indicators
- **MODIFIED** badge — the row diverges from its library entry (instance overrides applied).
- **MISSING VAR** badge — a combine/derivation references a `$var` no upstream module provides.
- **Conflict dots** — blue = overriding an upstream binding (info), amber = sibling collision in this Context (warning).
- **Bundle frame** — colored border grouping related modules. Click the bundle header to collapse / toggle the whole group.
Drag a row by its handle to reorder it, or onto another Context node to move it. Untick a row to switch it off without removing it.
## Tips
- Variables prefixed `__` are engine-internal and hidden from the assembler.
- Right-click a row for Edit / Duplicate / Save-to-library / Open-in-SPA.
- Run once with WP Debug downstream to see exactly what each module produced.
- Right-click a row for Edit, Duplicate, Hold across run, Push to library and more.
- **Hide from prompt** in a module's settings keeps its variable out of the prompt while later modules can still read it.
- Wire a **WP Debug** to the output to see exactly what each module picked.
- The manager's docs (**Docs** in the Wildcard Pipeline sidebar) explain every module in detail.
Lifts arbitrary ComfyUI outputs into named`$variable`bindings on the PipelineContext. Use when you want a value from a non-WP node (LoRA loader, prompt picker, CLIP text) available as `$var` downstream.
Turns any ComfyUI output (text, a LoRA name, a number) into a`$variable`the rest of the pipeline can use.
## Inputs
<!-- fields:start -->
## Inputs and outputs
- **upstream***(optional)* — chain another WP Context / Injector.
- **slot_0 … slot_9** — wire any ComfyUI output here. Each connected slot becomes a row.
- **upstream (in)**`context`: Optional. Another WP Context, Injector, Model Info or Loop to add to. Only nodes after the injector see its variables.
- **input_0 … input_9 (in)**: Wire any ComfyUI output (text, a LoRA name, a number) into the next free input_N. Each wired input becomes a row; a new free one appears as you wire, up to 10.
- **context (out)**`context`: The variables from before, plus one per row.
## Output
## Row options
- **context** — `PIPELINE_CONTEXT` carrying the injected bindings on top of any upstream values.
- **Name**: The $variable the value becomes. Letters, digits and underscores, starting with a letter.
- **Template**: Optional. Wrap the value in text, e.g. wearing $input_0. Leave empty to use the value as it is. $$ prints a dollar sign. Inline {a|b} picks need a seed, so they print as written (the editor warns).
- **Negative**: Optional negative words for this variable (it can use $input_0 too, so another node can write it). Only reaches an Assembler that prints the variable. Rows with one show a NEG badge.
- **Hide from prompt (globe)**: The variable still reaches combines and derivations, but prints nothing in the prompt.
<!-- fields:end -->
## How to use
1. Drag wires from external nodes into the slot sockets.
2. Each connected slot adds a row. Type the variable name (e.g. `style`).
3. Optionally tick **internal** to hide it from the assembled prompt while keeping it readable by Combine / Derivation rules.
4. Optionally write a template (`"I love $input_0"`) — the slot's raw value substitutes `$<slot_name>` before being written to ctx.
3. Optionally tick **internal** to keep it out of the prompt while combines and derivations can still read it.
4. Optionally write a template, like`I love $input_0`: the wired value goes where `$input_0` is.
5. Optionally write a **Negative** (row Edit panel, under Template) with the same `$slot` grammar. It replaces the variable's negative words and reaches only Assemblers that render the variable. Template rows take one too.
## Tips
- Rows reorder freely — engine reads by `slot_name`, not position.
- Names must match `^[a-zA-Z][a-zA-Z0-9_]*$`.
- Rows can be reordered freely.
- Names use letters, digits and underscores, and start with a letter.
- Capped at 10 sockets. Chain a second injector if you need more.
- Non-primitive values (LATENT/IMAGE/etc.) stringify via Python `str()` — typically used for STRING/INT/FLOAT only.
- Text and numbers work best. An IMAGE or LATENT is turned into text, which is rarely useful in a prompt.
Optional power-user node that loops a WP_Context chain N times in a single workflow run, producing N variations.
Runs the whole chain N times from one Generate. Put it in front of your WPContext: each pass (a **frame**) rolls your wildcards again, so one click gives N different prompts.
## Inputs
<!-- fields:start -->
## On the node
| Name | Type | Notes |
|---|---|---|
| `seed` | `INT` | Base seed widget. Has `control_after_generate` (randomize / fixed / increment buttons). Right-click → "Convert widget to input" to wire rgthree's Seed (or any INT source) instead. |
| `count` | `INT` | How many iterations. 1 = no loop. |
| `strategy` | chips | How to derive N seeds from base. `hash_index` (default) is independent per-iteration; `sequential` is `base, base+1, …`; `stride` is `base + i × 1,000,003`. |
| `override_seed` | switch | When OFF (default): `seed` is ignored. Downstream WP_Context widget seeds drive each node; loop iteration only adds XOR variation. When ON: `seed` becomes the base; derived N times via `strategy`; replaces downstream widget seeds. |
| `iteration var` | text | Stamps `$<name>` (0..N-1) and `$<name>_total` (N) into each iteration's context. Default `iteration`. |
| `bypass` | switch | Skip the loop. Behaves as `count=1`. |
- **seed**`INT`: The loop's own seed. Only used when Override Context seed is on.
- **count**`INT`: How many frames one Generate makes (1–999). 1 switches looping off without unwiring the node.
- **values**`STRING`: Optional text from another node: one frame per line (or per list entry), each writing its line to $iteration_value. The values set the frame count and count follows the last run; with a sweep on, every value runs every combination. Its dot sits beside the iteration variable (beside the values note once wired) and shows when you hover it.
- **Strategy**: hash, sequential or stride: how the frame seeds are worked out when Override Context seed is on. See Seeds & loops.
- **Per-iteration seeds**: The seed each frame will use. Lock single frames, Lock all, Copy / Paste, or Prev to keep the seed a frame used last run. Locks need Override Context seed on.
- **Sweep combinations**: Run every combination of the options you pick instead of random rolls. See below.
- **Edit frame**: The base / #1#2 … chips. Pick a frame to change just that frame (see Per-iteration overrides). Ctrl-click skips a frame, Alt-click locks its seed.
- **Override Context seed**: On: the loop sets every frame's seed from its own seed, so the batch can be repeated. Off (default): each WP Context keeps its own seed and the loop changes it a little per frame.
- **Iteration var**: The name of the frame-number variable ($iteration). The globe and Σ buttons hide or show $iteration and $iteration_total in the prompt.
- **Bypass loop**: Runs a single frame while the node stays wired.
- **context (out)**`context`: One Context per frame. ComfyUI runs the nodes after it once per frame.
- **loop_config (out)**`WP_CONTEXT_LOOP_CONFIG`: Wire it into a WP Seed List so each frame also gets its own sampler seed.
<!-- fields:end -->
## Outputs
## Frame variables
| Name | Type | Notes |
|---|---|---|
| `context` | `PIPELINE_CONTEXT` (list) | One payload per iteration. ComfyUI auto-iterates downstream nodes per item. |
Each frame sets `$iteration` (1, 2, 3 … up to the count) and `$iteration_total` (the count). They are hidden from the prompt by default; switch their internal flag off in the loop to print them, for example `frame $iteration of $iteration_total`.
## How it works
The **values** dot sits beside the iteration variable (beside the values note once wired) and shows when you hover it. With **values** wired, each frame also sets `$iteration_value` to its line. It prints by default, so `a picture of $iteration_value` works straight away.
Each iteration runs the downstream chain with a different seed. Locked modules (any wildcard with a locked seed) ignore the loop — they always roll their fixed seed. Everything else varies per iteration.
## Sweep combinations
Concrete example: `count=3`, `override_seed=ON`, `seed=42`, `strategy=sequential` → downstream WP_Context chain runs three times with chain seeds 42, 43, 44. PromptAssembler emits three prompts; KSampler renders three batches; SaveImage writes three files.
Open **Sweep combinations**, switch it on, pick wildcards from the WPContext nodes after the loop and tick the options to include. Sweeping `$hair` (3 options) against `$mood` (3 options) makes 9 frames, one per pair. The first wildcard changes slowest and the last fastest, so it reads like a grid.
- **Limit** (default 64, up to 999) caps the frames.
- **Hold other picks** (default on) keeps everything you didn't sweep the same on every frame.
- The menu lists every frame before you run, and **count** follows it.
## Per-frame control
- **Per-iteration seeds** opens the list of each frame's seed: lock single frames, **Lock all** / **Unlock all**, **Copy** / **Paste**, and **Prev** to lock the seed a frame used on the last run.
- **Edit frame** (the `base / #1 #2 …` chips) lets you give one frame its own settings in the module editors. Ctrl-click a frame chip to skip that frame, Alt-click to lock its seed.
## Tips
- The `seed` field is a stock ComfyUI INT widget with `control_after_generate` — same randomize / fixed / increment buttons KSampler exposes. Right-click → "Convert widget to input" to swap it for an rgthree Seed wire when you want its UI affordances.
- Set `override_seed=OFF` (default) to let each WP_Context's own widget seed drive that node's rolls; loop iteration still varies results via XOR with `loop_index`. Set `override_seed=ON` to take central control.
- Combine with `$iteration` in your prompt template for variation labels: `"variation $iteration of $iteration_total: ..."`.
- The `bypass` switch collapses the loop to a single run (`count=1`) while keeping the node wired — handy for A/B without rebuilding the graph. Native ComfyUI bypass (Ctrl-B) and mute (Ctrl-M) also work as usual.
- A module with **Lock pick** ignores the loop. **Hold across run** in a module's settings keeps its pick for every frame of one run, then rolls again next run.
- A plain KSampler gets the same seed on every frame. Add a **WP Seed List** if two frames could roll the same prompt.
- More in the manager's docs: WP Context Loop, Seeds & loops, and Per-iteration overrides.
Inspect every variable flowing through the WP chain at this point. Terminal node — no output.
See what happened at this point of the chain: every variable, which module set it, and any warnings. It has no output and changes nothing.
## Input
<!-- fields:start -->
## Inputs and outputs
- **context**— connect to any WP node's PIPELINE_CONTEXT output.
- **context (in)**`context`: Any WP node's context output. The node has no output and changes nothing; drag its corner to resize.
## Tabs
- **Variables**: Every $variable and its value at this point, with the module or node that set it (its icon and colour on the left edge say which kind: wildcard, derivation, Toggles, Model Info, Context Loop, Injector …). The quickest way to check what your wildcards picked. Negative words show under the value in red, with the module they came from when it isn't the variable's own.
- **Trace**: Every module and node row in the order it ran, grouped by the node it ran in. Open one to see why it did what it did: a wildcard's odds and the constraints that changed them, which derivation branch ran, the negative each one left, and for rows from other nodes where the value came from (a Loop frame and its seed, a Model Info detection, a Toggles switch set upstream).
- **Warnings**: What came up during the run, such as missing variables or a constraint that changed nothing. Look here first when something seems off.
- **Raw**: Everything as JSON, with a download button. Handy for bug reports.
<!-- fields:end -->
## How to use
1. Drop it anywhere in the chain.
2. Run the workflow.
3. The body shows tabs:
- **Snapshot** — every bound variable + value.
- **Trace** — per-module resolution history.
- **Picks** — what each wildcard rolled.
- **Warnings** — unknown vars, constraints that never fired, etc.
1. Wire it after a Context (or anywhere in the chain).
2. Run.
3. Read the tabs:
- **Variables**: every variable, its value and the module that set it. Negative words show under the value in red.
- **Trace**: every module in the order it ran, grouped by Context. Open one to see why it did what it did.
- **Warnings**: what came up during the run, such as a missing variable or a constraint that changed nothing.
- **Raw**: everything as JSON, handy for bug reports.
Drag the bottom-right corner to resize.
## Tips
- Always re-runs on queue (not cached) so seed-driven values refresh.
- Use the filter box at the top of each tab to narrow on a variable name.
- It updates on every run.
- The filter box at the top of each tab searches by variable name.
- Use several Debug nodes to see different points of the chain.
Pauses the run so you can pick which images go on. Everything that belongs to an image (its latent, masks, conditioning, prompt text and Context) is filtered with it, so the node can sit between the first KSampler and the upscaler and the upscaler only gets the picked images with their own prompts.
<!-- fields:start -->
## Inputs and outputs
- **images**`IMAGE`: The images to pick from. Required: this is what the picker shows.
- **latent, masks**`LATENT / MASK`: Sliced to the picked images. A mask you paint in the picker replaces that image's mask.
- **positive, negative**`CONDITIONING`: CONDITIONING. A batched conditioning is sliced with the images; a single one is kept for every frame that keeps an image.
- **positive_text, negative_text**`STRING`: The prompt strings, kept or dropped with their frame.
- **context**`context`: Each frame's WP Context, kept or dropped with it.
- **clip (in)**`CLIP`: Optional. Re-encodes a prompt you edit in the picker, so the positive/negative conditioning follows the edit. Without it, an edit changes only the text outputs.
- **extra_1, extra_2**`any`: Any type. The output takes the type of what you connect. Batched values are sliced, anything else follows its frame.
- **picks (out)**`STRING`: What was kept, as frame:image (1-based), for example 1:2, 3:1.
- **labels (out)**`STRING`: One label per item, in step with images: #3 · red · 2 by default, or the name you gave the image in the picker. An item with several images has one line per image.
## Settings on the node
- **Mode**: Pause & pick asks every run. Reuse last picks keeps the same picks without asking, and asks again when they no longer fit. Pass all lets everything through.
- **Send picks as**: Same shape keeps each frame's picks together as one batch. One per image sends every pick as its own item, with its own copy of its frame's prompt, conditioning and Context.
- **Timeout**: Seconds to wait; 0 waits until you answer. After a timeout it keeps all, keeps the first image, or stops the branch.
<!-- fields:end -->
## The picker
The picker has three modes, switched at the top or with **G**, **D** and **Z**. The window keeps its size in every mode, and the pick count and the Keep buttons are always in the footer. The picker opens in the mode you left it in.
- **Grid** (G) is for picking fast. Click an image to pick it, or press **Space** over it. Ctrl+A picks everything; a frame with several images says how many of its images are picked and has a **Pick frame** button (**Clear frame** once it is all picked). **Tile size** sets S, M or L; **Fit** (or **F**) makes the images as big as the picker allows. Double-click an image, or click the frame around it, to open it in Detail. Each image's label sits under it; click it to rename the image.
- **Detail** (D) shows one image next to its size and seed and its label (click the label to rename it; clear it to get the default back), with **Pick** / **Picked** (or **P**, **Space**, ↑), **Compare** and **Pick frame (N)** at the top of the side panel. Under them, three tabs: **Values** (the frame's variable values, each in the colour its words have in the prompt; the copy button copies them), **Prompt** (the prompt with each value marked in its variable's colour where it landed, hover a mark to see which variable set it, click to edit; the negative under it; each has a copy button) and **Mask**. Detail opens on Prompt, and painting switches to Mask. With no CLIP wired, a **text only** tag says an edit changes the text outputs only. Only what is wired shows: with no prompt text and no CLIP wired in, one line says how to get the prompt fields. ←/→ or ‹› step, and the strip under the picture jumps to any image; a loop's images sit together in the strip, one group per frame, with how many of each are picked (double-click one to zoom it, or click the picture). **C** or **Compare** pins the image; step to another and a slider compares the two. **M** or **Paint** paints a mask.
- **Zoom** (Z) shows only the picture, at real zoom levels: **Fit**, **100%**, **200%**, − and + (keys 0, 1, 2, − and +). Scroll to zoom toward the mouse, drag to move, double-click for 100% at that spot. Zoomed in, a mini-map in the corner shows where you are; click or drag it to move there. Keep the mouse still for two seconds and the bar, hint and mini-map fade; move it and they come back. **F** or the fullscreen button fills the screen with it (Esc leaves); in fullscreen a strip along the bottom shows the frame's images, the pick count and **Keep picked**. ←/→ step to the next image and keep the zoom and the spot, so you can check the same hands or eyes in every frame. **P** picks, and the picture's label says **Picked**. **C** pins the image: step to another and the two show side by side, locked to the same zoom and spot (←/→ change the right one, **P** picks it, **C** again stops). The pin carries over between Detail and Zoom.
- **Escape** steps back: Zoom to Detail, Detail to Grid, and from Grid it tucks the picker away. A "waiting" pill stays at the bottom of the screen and reopens it with your picks still there. The − button in the header tucks it away from any mode.
- **Enter** or **Keep N picked** sends the picks on. **Keep all** sends everything. **Stop branch** stops the nodes after this one; the rest of the run finishes normally.
- A short chime plays when the picker opens, and the tab title starts with **● Pick images** while something waits. Turn the chime off under **Settings → Wildcard Pipeline → Runtime behavior → Image Filter sound**. Turn on **Image Filter desktop notification** there to also get a system notification while the tab is in the background.
## Labels, sweep grid and Send to Loop
- With a Context Loop, each frame is labelled with its number and the options its sweep pinned, for example `#3 · red · pencil`. Hover a label for the frame's seed and prompt.
- A sweep of two or more wildcards opens in Grid as a **table**. The bar above it picks which wildcard goes on **Rows** and which on **Columns** (⇄ swaps them); any others **Split by**, one small grid per value. Click a row, column or group name to pick all of it. **Layout › Frames** switches back to the list.
- **Send to Loop** writes your picks back to the loop: picked frames get their seeds locked (when the loop overrides seeds) and every other frame is bypassed, so the next run repeats only what you kept.
## Refine before it goes on
In **Detail**, the side panel edits the frame's prompts and paints a mask for the upscaler. Tiles show ✎ for an edited prompt and ◐ for a painted mask.
- An edited prompt replaces the text output. With a CLIP wired into **clip**, the conditioning is re-encoded to match; without one it stays as it was, and the panel says so.
- With **Same shape** a frame's picks go on together, so a prompt edit covers the whole frame. With **One per image** it covers just that image.
- **M** or **Paint** opens the mask painter. **Brush** paints where you drag, **Lasso** fills the area you drag around, and **Fill** fills the area under a click up to the lines you painted (paint an outline, then fill its inside). **Paint** or **Erase** works with every tool (**X** swaps). **Size** is the brush (**[** and **]**), **Hardness** softens the edge of the brush, lasso and fill, and **Strength** masks part-way, which inpainting changes less; one stroke stays at its strength where it crosses itself. **Undo** and **Redo** (Ctrl+Z, Ctrl+Shift+Z), **Invert** and **Clear**. A ring under the mouse shows the brush (dashed when erasing, a dotted inner ring where a soft edge starts). The mask goes to the **masks** output, resized to the image. Images you don't paint keep the incoming mask, or an empty one when nothing is wired in. Once painted, the **Mask** tab shows a preview: **Over image** tints the masked part, **Mask only** shows it white on black as the **masks** output sends it.

## Tips
- The **LAST RUN** strip shows what the last run kept.
- Cancelling the run while the picker is open closes it.
- Use the **picks** output in a filename or a note to remember which images you picked.
Draws labels on images and lays them out in one labelled grid: compare runs, show a sweep as an XY plot, or just stamp each image with its seed. Takes one image, a batch, a list, or a list of batches (a Context Loop's frames). Labels are optional.
<!-- fields:start -->
## Inputs and outputs
- **images**`IMAGE`: One image, a batch, a list, or a list of batches (a Context Loop's frames). Required.
- **labels**`STRING`: Optional text, one entry per item and one line per image of its batch. One line covers the whole batch, and a single one-line label covers every image of every item. The Image Filter's labels output fits straight in. One typed text with a line per image works too.
- **label_text**`STRING`: Optional text from another node for what each image shows; {label}, {index} and the other tokens still work. A list gives one text per item, the last one covering any item past it.
- **title**`STRING`: Optional text from another node for the grid title. Once wired, the panel's Title box shows that it comes from the wire.
- **row_headers, column_headers**`STRING`: Optional text from another node, one header per line (a list gives one header per entry). Wiring one sets that side to typed headers and replaces its dropdown on the panel. Like a built-in widget's, each text input's dot sits beside the field it feeds and shows when you hover that field or wire it.
- **images (out)**`IMAGE`: The labelled images, in the shape they came in. A batch stays a batch.
- **grid (out)**`IMAGE`: Every image in one labelled grid. The node also shows it on the canvas, so it can end a branch.
## Label
- **Text**: What each image shows. {label} is the incoming label (the default), {frame} and {image} count from 1 per input item, {index} counts across all images, {count} is how many there are. \n breaks a line.
- **Place**: Above, below, left or right adds a strip beside the image. Over image draws a see-through band over the top or bottom and keeps the size. The last button draws no label.
- **Font and size**: Your system fonts plus any you drop into the extension's fonts folder; type to search. An empty size is automatic: a share of the image width, so labels read the same at 512 px and at 4K.
- **Colours**: Click a swatch for the colour square and a hex box. The strip or band also has an opacity, and None drops it.
## Grid
- **Layout**: Fit the run, one row or column per frame, fill rows (with a column count), all in one row, all in one column. Label-part headers set the layout themselves.
- **Rows, Columns**: No headers, typed (one header per line in the box that opens), or a label part. The list shows what each part held on the last run.
- **Title, Spacing**: A line of text above the grid; the gap between cells, the edge around the grid, and the cell width (empty keeps image sizes, a number scales every cell to it).
- **Colours**: The grid's background and the colour of headers and title. Reset puts spacing and these back.
<!-- fields:end -->
## XY plots from labels
A label can hold parts joined by ` · `. The Image Filter writes `#N · option · option · K`: the frame, the sweep options in the loop's axis order, then the image number when a frame has more than one. The **XY plot** preset picks the two parts that vary (here parts 2 and 3); set Rows and Columns by hand to choose others. The grid sorts the cells by those values, whatever order the images came in. The values become the headers and leave the cell labels, so the cells keep just `#N`. Two images on one spot (same options, another seed) repeat the row under the same header.
## Tips
- Without a labels input, use the text: `#{index}` numbers every image, `{frame}.{image}` shows where each came from.
- Mixed image sizes are centred in the largest cell on the background colour.
- Grids are capped at 16384 px on the longest side; very large grids are scaled down to fit. Use the cell width to keep them small.
Watches the nodes wired into it and, when what they do changes, mutes, bypasses or runs the nodes of the WP Node Group its output goes into. Frontend only: it never runs and is left out of the prompt.
<!-- fields:start -->
## On the node
- **watch dots (in)**: Wire the nodes to watch. A new free dot appears as you wire.
- **drives (out)**: Wire it into a WP Node Group: the relay sets that group's nodes.
- **All muted**: What to send when every watched node is muted: Run, Mute, Bypass or nothing (—).
- **All bypassed**: What to send when every watched node is bypassed.
- **Any runs**: What to send when at least one watched node runs.
Names the loaded checkpoint so your rules can branch on it. Writes three variables into the Context:
- `$model_family`: the architecture, read from the model itself (`sd15`, `sdxl`, `flux`, `sd3`, …).
- `$model_variant`: the fine-tune line, read from the file name by the variant rules (`pony`, `illustrious`, `noobai`, `animagine`, or empty when nothing matches).
- `$model_name`: the file name without folders or extension.
Pony and Illustrious are both SDXL underneath, so only the file name can tell them apart.
<!-- fields:start -->
## Inputs and outputs
- **upstream (in)**`context`: An existing Context to extend. Only nodes after Model Info see its variables, so it usually goes first.
- **model (in)**`MODEL`: The MODEL from your checkpoint loader. Gives the family, and the node follows the wire back to the loader for the file name, stepping over LoRA loaders and other model patches.
- **family, variant, name (in)**`STRING`: Optional text from another node, such as a switch that names the model you're testing. A wired value beats the pin and detection (an empty one is ignored); a wired name goes through the variant rules like the loader's. The row shows wired, and its value after a run. Each input's dot sits beside its row, like a built-in widget's, and shows when you hover the row or wire it.
- **Detected**: The three values and where each comes from. Variant and name update as soon as you change the loader's checkpoint; the family shows after the first run.
- **Globe**: Whether the variable can print. All three start hidden: rules and constraints read them, but the Assembler leaves them out. Click the globe to print one.
- **Pin**: Use your own value for a row instead of the detected one: a file name when no model is wired, or a variant to try your Pony rules without switching checkpoint. Click it again to go back to detection.
- **Variant rules**: Rows of variant and pattern. The first pattern found in the file name sets $model_variant, and its row lights up. Capitals don't matter; | separates alternatives (pony|pdxl). A broken row is outlined in red and skipped. Reset brings back the built-in rules.
- **context (out)**`context`: The upstream Context plus the three variables.
<!-- fields:end -->
## How to use
1. Wire **Load Checkpoint → MODEL** into **model**, and Model Info's **context** into your first WP Context.
2. Branch on `$model_variant` in a derivation. The derivation editor's **LoRA by model** button adds a ready-made rule that sets `$loras` per variant; put `$loras` in your Assembler template.
3. To drive a **constraint** from the model, make a wildcard (say "Model") with options `pony` and `illustrious`, and in its node settings set **Match variable** to `model_variant`. It then picks the option equal to the detected variant, and any constraint can use it as its source.
## Tips
- If a node that loads LoRAs from the prompt sits on the model, take MODEL from **before** it, or the graph loops.
- A wildcard set to **Match variable** uses its fallback option when no option matches; without one it rolls as usual and WP Debug says why.
- WP Debug's trace shows each value and where it came from (model, loader, rules, pinned or wired).
Gathers nodes so one WP Toggles switch mutes or bypasses them all. Frontend only: it never runs and is left out of the prompt.
<!-- fields:start -->
## On the node
- **node dots (in)**: Wire any node's output in. A new free dot appears as you wire; a freed one goes. Each shows its node's title.
- **nodes (out)**: Wire it into a WP Toggles control dot: that toggle then mutes or bypasses every node here.
- **Whole group**: With nothing wired into its dots (a WP Mode Relay doesn't count), the node gathers every node of the canvas group it sits in, the smallest one when groups nest, and the bar names that group. Nodes a wired-in relay watches stay out. Wire any node in and it goes back to only the wired ones.
- **Covers**: Shown while it stands for a canvas group. Its group: the smallest group it sits in, inner groups included. Not inner: that group, leaving out the nodes of groups inside it. Every group: every group it sits in, outer ones too.
- **Run / Mute / Bypass**: Set every node in the group at once.
- **Mode chip**: Each row's chip shows its node's mode. Click it to go Runs → Muted → Bypassed.
A note that explains a workflow. It looks like a panel, not a node: no title bar, no frame, no sockets, in both the classic renderer and Nodes 2.0. The selection outline hugs the panel. It never runs and is left out of the prompt; its text is saved with the workflow.
## Using it
- **Add** it from the node search (`WP Note`). A new note opens in its editor and starts pinned.
- **Edit** by double-clicking the note or with the indigo pencil in the selection toolbar while it is selected. **Done** goes back to reading.
- **Move** it by dragging like any node (unpin it first).
- **Resize** a Card or Sticky note from its corner: the width is yours, the height follows the text. A Label sizes itself to its title.
- **Hover** a Label to see its text and links in a card. Move onto the card to click a link or **Edit**. Marks on the pill show that it has text (lines) or a link (chain).
- **Links** in a note open in a new tab: a docs link opens that page (and section) of the built-in docs, a community link opens that pack in the manager's Community tab.
- **Add to library**: a `wp:library` button puts the workflow's bundles and modules into your library after a review (below).
<!-- fields:start -->
## Editing
- **Tone**: Step (a numbered circle), Icon (pick any icon from the list next to it) or Plain (no badge).
- **Colour**: Presets that follow the theme (Accent, Tip, Info, Warning, Danger, Teal, Violet, Neutral), or any colour from the picker.
- **Look**: Card, Sticky or Label (above).
- **Pinned**: ComfyUI's own pin: a pinned note can't be moved or resized by accident. New notes start pinned.
- **Title**: Shown in bold at the top, or on the pill of a Label.
- **Text**: Its first line and length on the node; Edit text opens the text window, with the editor beside a live preview. Done (Ctrl+Enter) puts it on the note, Cancel or Escape leaves the note as it was. Markdown, with the formatting bar below over it: headings (# to ####), bold, italic, strikethrough, code, bulleted, numbered and nested lists, task lists (- [x] / - [ ]), quotes and callouts (> [!TIP], > [!WARNING]), tables with column alignment (:--, :-:, --:), rules (---) and code blocks.
## The formatting bar
- **Undo and redo** (Ctrl+Z / Ctrl+Y): Step back or forward through your changes, typing and the bar's own edits alike (Ctrl+Shift+Z and the right-click Undo and Redo work too). Typing counts as one step until you pause, move the caret or start a new line. The steps last while the text window is open.
- **Bold, italic, strikethrough** (Ctrl+B / Ctrl+I): Wraps the selection in **, * or ~~.
- **Code**: Wraps it in backticks, for a $variable.
- **Lists and quote**: Puts - , 1. or > before each selected line (press again to take it off).
- **Link** (Ctrl+K): A Docs page (type to find any page of these docs, then pick a section or the whole page), a Web address, a Library button (below) or a Community pack (owner/pack, or paste the pack's address), drawn as a Button with an icon or as a Text link, in its own colour or the note's. The selected text becomes the link's text. It goes where the caret is when you press Insert link, so you can click in the text after opening the panel.
- **Icon**: Any PrimeIcons icon, searchable, in a colour or the text's own, inserted where the caret is.
- **Pictures**: Add a picture from a file, or paste or drop one into the text; it goes on a line of its own where the caret is. Or pick one the extension ships (the node toolbar with its ? help button, or any docs screenshot), with a search box to find it. The panel stays open after adding and lists the note's pictures with a Width slider (a share of the note), Own size and Remove.
<!-- fields:end -->
Keys you type in the editor stay in the editor: Delete, Ctrl+Z and the other ComfyUI shortcuts don't reach the canvas.
## Pictures
Open **Pictures** in the bar and press **Add a picture…**, or paste or drop a picture into the text. Or pick the picture the extension ships of the node toolbar with its **?** help button. A picture is never wider than the note: its width is a share of the note's (the **Width** slider), or **Own size** up to the note's width, so it never makes the note bigger. Pasted and dropped pictures are saved in the workflow, made smaller first (at most 1280 px, about 400 KB, camera and location data dropped); a note holds up to six and 2 MB. Pictures never load from a web address.
## Add to library
A `wp:library` button lets someone who opened a shared workflow keep its lists. Its tooltip says what it would add; with everything there already it stays off. Pressing it opens a review listing every item:
- New items go in under their own id.
- An item your library holds with other content: **Use mine** (default, nothing changes), **Replace**, or **Keep both** (added as a copy; the workflow points at the copy).
- An id another kind of item holds: **Keep both** or **Leave out**.
**Add** installs it all in one step with the Import tab's checks (one refused item and nothing goes in). EXAMPLE and MISSING marks clear, and the message has **Undo**. Nothing is added before you press Add, and the button only reads the workflow's own rows.
## Also a bookmark
Turn on **Also a bookmark** at the bottom of the editor and the note joins the **Bookmarks** dock: pick where it lands on screen, its zoom and a shortcut, the same settings and clash check as a WP Bookmark. A new one gets the next free shortcut. The dock shows it in the note's colour and icon, and a small bookmark mark on the note (its tooltip names the key) says it is one; a pinned note shows a pin mark next to it. A note can't be hidden on the canvas, and muting it turns its shortcut off without fading it.
## Syntax
| Write | Shows |
|---|---|
| `[Read more](https://example.com)` | A link that opens in a new tab |
| `[Seeds](docs:seeds-and-loops)` | A link to that docs page |
| `[The grid](docs:wp-label-grid#s-the-grid)` | A link to a section of it |
| `[Start here](docs:quick-start){button pi-play}` | The link drawn as a button with an icon (`{button}` for none) |
| `{button pi-play #22c55e}` / `[Read more](https://example.com){#22c55e}` | A button or a text link in its own colour (without one it takes the note's) |
| `[Add the pack](wp:library){button pi-download}` | A button that adds this workflow's bundles and modules to your library |
| `[Add these](wp:library#node-12){button}` | The same for one WP Context (its node id) |
| `[Get the pack](wp:community/owner/pack)` | That published pack in the Community tab |
| `:pi-heart:` / `:pi-heart:{#ef4444}` | An icon, optionally coloured |
| `` | A picture saved in the note (the Pictures panel, a paste or a drop writes it) |
| `` | A picture the extension ships |
| `{width=60%}` | The picture as wide as 60% of the note (10 to 100); without it, its own size, never wider than the note |
Fill-in-the-blank prompt template. Anywhere you write`$variable`, the assembler substitutes the matching value from the upstream Context.
Write a prompt with`$variables` in it and get the finished prompt, plus a matching negative.
## Inputs
<!-- fields:start -->
## Inputs and outputs
- **context**— `PIPELINE_CONTEXT` from any WP node.
- **template**— your prompt text. Use `$varname` to reference bound values.
- **context (in)**`context`: The variables from a WP Context (or anything that ends in one).
- **template**`STRING`: Your prompt with $variables in it.
- **negative_template**`STRING`: Optional, in the collapsible negative section. Your standing negative, with $negatives where the collected negative words go. New Assemblers start with $negatives; without it the negative is only your own text (empty = no negative).
- **prompt (out)**`STRING`: The finished prompt. Wire it into CLIP Text Encode or a WP Prompt Cleaner.
- **negative (out)**`STRING`: The negative words of the variables this template printed, plus your negative template. Wire it into your negative CLIP Text Encode.
## Output
## On the node
- **prompt** — the resolved STRING. Feed into CLIP encoders, WP Prompt Cleaner, etc.
- **Load / Save (toolbar)**: Load a template from your library into both boxes, or save this one (prompt and negative) to it.
- **Mark unused internal (toolbar)**: The eye button. Marks every upstream variable that neither box reads as internal, so it stops showing here; combines and rules still read it. Variables another Assembler on the same context reads are kept, and so is a module that also writes a variable in use. Undo in the message puts it back.
- **Clear (toolbar)**: Empties the template and the negative template, after asking.
<!-- fields:end -->
## How to use
1. Wire a WP Context (or chain) into the context input.
2. Write your template:
```
A $style portrait of $subject, $lighting
```
3. Run the workflow. Each `$var` gets replaced with its current value.
1. Wire a WP Context into **context**.
2. Write the template. Type `$` to pick a variable, or click a chip in the **variables** strip.
3. Run. Each `$name` becomes its value.
## Helper widget
In the preview, picked values are highlighted. A variable nothing sets gets an amber wavy underline and prints nothing.
Below the template, the **Variables** strip lists every value available from upstream — click any chip to insert `$name` at the cursor.
Wildcard options, fixed values, combines, derivations and Injector rows can carry negative words. The negative output only takes the words of variables this template printed, so a face-detailer Assembler that prints just `$face` gets only the face words. Hidden variables add nothing.
## Save / Load template
- `lowres, bad anatomy, $negatives` puts the collected words at that spot.
- An empty negative template gives just the collected words.
- Without `$negatives`, the collected words go at the end.
- Repeated words are dropped, also when written differently: `(blurry:1.2)` counts as `blurry`.
Two toolbar buttons next to **Clear template**:
## Toolbar
- **Load** — opens a library picker with search plus category / tags / favorites filters. Click a template to load it; this replaces the current template (confirms first if you've already typed something). The assembler remembers which template you loaded.
- **Save**— opens a save dialog (name, category, tags, description, live preview). When the name matches an existing template — or you loaded one — you get two actions: **Update existing** (overwrite that library entry) and **Save as new entry** (create a fresh copy, auto-suffixed). Otherwise it's a plain **Save**. After saving, the assembler tracks that entry so the next Save defaults to updating it.
- **Clear template** empties the template and the negative template.
- **Load**picks a saved template from your library (it asks first if you've typed something).
- **Save** keeps the template in your library. If it came from the library you can update that entry or save a new one.
Any `$vars` the loaded template needs that aren't in the upstream chain show as the usual amber "missing" markers. Manage saved templates in the SPA**Templates**tab.
Saved templates are on the manager's**Templates**page.
Drops duplicate tags, strips orphan punctuation, filters blocklisted words. Operates on the prompt string alone — no context input needed.
Tidy a prompt before the sampler: drop duplicate tags and stray commas, remove empty brackets, merge stacked weights, tidy LoRA tags and block words you never want. It needs no Context.
## Inputs
<!-- fields:start -->
## Inputs and outputs
- **prompt**— STRING from any source (typically a WP Prompt Assembler).
## Output
- **prompt** — the cleaned STRING.
- **prompt (in)**`STRING`: The text to clean, usually from a WP Prompt Assembler. Any text works.
- **cleaner widget**: Pick a mode and a preset, switch single rules on or off, and edit the blocklist. After a run it shows how many fixes each rule made.
- **negative (in)**`STRING`: Optional. A negative to clean too: type it or wire in the Assembler's negative. Left empty, the negative output is empty.
- **prompt (out)**`STRING`: The cleaned prompt, for CLIP Text Encode.
- **blocklist (in)**`STRING`: Optional text from another node, such as one shared word list feeding several cleaners. Its entries join the panel's blocklist (comma- or newline-separated in list mode, one per line in regex mode) and turn the blocklist on; the Blocklist button reads + input. Its dot sits beside that button and shows when you hover it or wire it.
- **negative (out)**`STRING`: The cleaned negative, using the negative column's rules. Wire it into your negative CLIP Text Encode.
<!-- fields:end -->
## How to use
1. Wire any STRING output into the prompt input.
2. Pick a mode + intensity in the widget.
3. Optionally toggle individual rules. Click **Blocklist…** to filter specific words.
4. Wire the output to your CLIP encoder / preview.
1. Wire a prompt into **prompt**.
2. Pick a mode and a preset.
3. Switch single rules on or off if you like, and click **Blocklist…** to block words.
4. Wire the output into CLIP Text Encode.
## Mode
- **tags** — split input on commas. Each segment is a tag.
- **text** — treat input as prose. Tag-only rules (dedupe, fuzzy) are disabled.
- **tags**: for comma-separated tag lists. Rules work tag by tag.
- **text**: for sentences. Duplicate removal is off, and the blocklist removes just the word.
## Intensity presets
## Presets
| Preset | Rules |
|---|---|
| gentle | whitespace |
| balanced | whitespace, punctuation, tag dedupe |
| aggressive | whitespace, punctuation, tag dedupe, fuzzy dedupe |
| aggressive | all of balanced, plus merge weights and near-duplicates ("bad hand" and "bad hands") |
Blocklist auto-enables when its entries are non-empty.
**CUSTOM** shows when you've switched rules away from the preset; click the preset again to go back.
## Bracket and LoRA rules
These read brackets the way ComfyUI does and work in both modes.
- **empty groups**: removes brackets with nothing inside, such as `()` or `(:1.2)`. `red (), dress` becomes `red, dress`. Usually left by a weighted reference that printed nothing.
- **merge weights**: folds stacked weights into one: `((a:1.1):1.2)` becomes `(a:1.32)`, `(((a)))` becomes `(a:1.33)`, `(a:1.0)` becomes `a`. Only when the inner group is the whole of the outer one; `[ ]` is never touched.
- **LoRA spacing**: `< lora : x : 0.8 >` becomes `<lora:x:0.8>`, and `girl<lora:x:1>` becomes `girl <lora:x:1>`. Also lyco, locon, hypernet and `<embedding:…>`. File names are never changed.
Escaped `\(``\)` stay as they are, and if the brackets don't balance these rules leave the prompt alone.
## Blocklist
Click **Blocklist…** to open the editor. Two modes:
- **list**: words separated by commas or new lines. Capitals don't matter, and whole words only: `cat` removes`black cat` but not `catcher`.
- **regex**: one pattern per line, capitals don't matter. A broken pattern is skipped and named in the run stats.
- **list** — comma- or newline-separated plain words. Each entry matches as a case-insensitive word-boundary substring. `cat` drops `black cat` but not `catcher`.
- **regex** — one regex per line, compiled with `IGNORECASE`. Bad patterns are skipped (reported in run stats), so one typo won't kill the rule.
In tags mode the whole tag with the word goes; in text mode just the word. Never block a LoRA's trigger words.
What gets dropped:
## Cleaning the negative
- **tags mode** — the whole comma-separated tag containing the match. Blocklist `steps` on `cfg, steps . avoid:` drops the entire `steps . avoid:` tag → `cfg`.
- **text mode** — only the matched word is removed; adjacent orphan punctuation/space is scrubbed. Blocklist `steps` on `cfg, steps. avoid` → `cfg, avoid`.
Toggling the rule off via its row in RULES overrides the auto-enable, even with entries present. Toggling it on with no entries does nothing (no patterns to match).
With a negative wired in, the rule list gets a second column for it. It follows the prompt column, except near-duplicates and the blocklist are off. **Drop negative tags also in prompt** (off by default) removes a word from the negative when the prompt asks for it; the run stats name the overlap either way.
## Tips
- Hover any control for an inline tooltip.
- The **CUSTOM** badge lights up when your toggles diverge from the intensity preset. Click the intensity again to reset.
- Stats next to each active rule show what it dropped on the last run.
- Hover a rule for what it does.
- After a run, the count next to each rule shows what it removed.
Emits a list of seeds, one per loop iteration, so a downstream KSampler gets its own seed on every pass. Use it for sampler seeds only: it never changes a prompt.
<!-- fields:start -->
## On the node
- **base_seed**`INT`: Where the seed list starts. Same base, same seeds.
- **count**`INT`: How many seeds it gives (1–999). Follows the loop's count while Override count from loop is on.
- **Strategy**: hash, sequential (base, base+1 …) or stride. It changes which numbers you get, not how varied the images are.
- **Per-iteration seeds**: Lock single seeds, Lock all, Copy / Paste, or Prev to keep the seed a frame used last run.
- **Override … from loop**: Three switches: take the base seed, the count and the strategy from the wired loop. Count and strategy switch on by themselves when you connect loop_config; base seed stays yours unless you switch it on.
- **loop_config (in)**`WP_CONTEXT_LOOP_CONFIG`: Optional. A WP Context Loop's loop_config output, so the seeds follow its frames.
- **seed (out)**`INT`: The list of seeds, one per frame. ComfyUI runs the node after it once per seed: wire it into a KSampler's seed.
<!-- fields:end -->
## How it works
Wire the loop's `loop_config` into this node and its seed list pairs with the loop's prompts by index: frame N's prompt gets seed N. With **override count** on, frames the loop bypasses are left out too, so the sampler runs once per prompt the loop kept.
The toggles are independent, so you can take the loop's count and strategy but keep your own base seed. Disconnecting the wire leaves the toggles as they are, and the widget values are used again.
Every seed is masked to 50 bits, inside the range ComfyUI's randomize button produces, so any seed copied into a plain KSampler reproduces the same image.
## Per-iteration seeds
**Per-iteration seeds** on the node opens the list, where you can lock any iteration to a fixed seed while the rest stay derived. **Prev** locks the seed that iteration used on the last run (it lights up after the first generate). **Lock all**, **Unlock all**, **Copy** and **Paste** (`#N: seed`) work on the whole list.
## Tips
- Prompt seeds and sampler seeds are separate. To reproduce one frame exactly, lock it on the Loop (with its override seed on) and on the Seed List.
- Connected to a chain that expects one seed, a count above 1 still runs the downstream node N times. Set `count` to 1 to stop that without removing the node.
- A fixed sampler seed with varying prompts is a fair comparison too: leave the Seed List out for that.
Several on/off switches in one node. Each toggle writes `$its_variable` as `true` / `false` (internal unless you turn off its globe) and can have a `BOOLEAN` output.
<!-- fields:start -->
## On the node
- **upstream (in)**`context`: Optional Context to extend. Only nodes after this one see the toggle variables. It can also set toggles (see below).
- **Pencil (toolbar)**: Select the node and the indigo pencil in ComfyUI's selection toolbar opens the edit view: the mode, the Pick one options, the grips to reorder, the row buttons, Add toggle and Add label. Done goes back to the clean view, which shows only the switches.
- **Any on / Pick one**: Any on: every toggle is on or off by itself. Pick one: at most one is on; tick Always one on to keep exactly one on, like radio buttons.
- **writes (Pick one)**: Optional variable that also gets the picked toggle's value (or its name), so one rule can branch on it.
- **Globe (row)**: Edit view only. On (the default) keeps the toggle's variable internal: rules read it, the Assembler doesn't offer it and it never prints. Turn it off to use the variable in a prompt. Same in Any on and Pick one.
- **Always one on (Pick one)**: Like radio buttons: one toggle is always on. Clicking the picked one does nothing; pick another to switch. With none on, the first toggle is picked. Off (the default), the picked toggle can be switched off so none is on.
- **Show in Assembler (Pick one)**: The picked variable shows in the Assembler and can print in the prompt. Off, it is internal.
- **Style (Pick one)**: How every row looks in Pick one: Radio (a round dot, the default), Chip (the name across the row, lit when picked), Switch or Check. Turning one on turns the others off.
- **Layout**: Edit view: Rows (one row per toggle, the default) or Grid (each toggle in a tile, the tiles wrapping to the node's width), in both modes and every style. Each label has a grid button for its own group; setting it back to the node's layout makes the group follow the node again. Under a grid's tiles, thin lines carry the dots: mute/bypass dots stack on the left with their toggle's name, BOOLEAN outputs on the right with theirs, each side packed on its own (so Dawn | Dawn, Sunset | Night). The arrow on the first line merges the group's lines into one that carries every dot and says how many go in and out (the names on hover), and the arrow on the merged line opens them again.
- **Pencil, globe, trash (row)**: Each row in the edit view has three buttons, like a module on a Context node: the pencil opens the toggle's own settings in a window (name, variable, looks, style, needs, what off mutes or bypasses, group and its output) with the row drawn on top as the node will show it; the globe keeps its variable internal; the trash removes it.
- **Add toggle / Add label**: A new toggle, or a label that groups the toggles under it. Click a label's arrow to fold it; its icon and colour buttons pick any icon and any colour. Drag a toggle's grip under a label to move it into that group; a dragged label takes its toggles along.
- **control dots (in)**: A toggle that mutes or bypasses has a dot at the left of its row: wire the nodes it drives into it.
- **context (out)**`context`: The Context with every toggle variable added. Internal ones (the globe) are for rules only; the rest show in the Assembler.
- **toggle outputs**`BOOLEAN`: One BOOLEAN per toggle that has an output, at the right of its row. Up to 16.
## Editing
- **Name**: Shown on the row and on its output. A Chip shows Name · $variable (the variable while Show is on). A name colour also colours its variable.
- **Variable**: Gets true or false, or the toggle's Value while on and nothing while off. $name.bool is always true or false. It follows the name until you change it. Internal until you turn off the row's globe. Show puts it under the name, or after it on a Chip.
- **Looks**: An icon before the name, and colours for the icon, the name and the control (switch, check, radio, chip or buttons), so Day can be yellow and Night blue. None keeps the theme's colour.
- **Style**: Switch, Check, Buttons (two words of your own, like Day / Night) or Chip (a small chip with the name). Any on only: in Pick one the Style in the top bar sets every row's look.
- **Value**: What the toggle's variable gets while it is on, instead of true; off, it gets its Off value (nothing when that is empty), so $rain can print "heavy rain" or nothing. $rain.bool still reads true or false, for rules. In Pick one the picked variable gets it too, instead of the toggle's name. A text box like the Assembler's: $ lists every variable upstream (Context Injector ones included) and the toggles' own, and tag, LoRA and embedding autocomplete work when they are on. A $name nothing upstream sets is flagged under the box and in WP Debug. Inline {a|b} picks need a seed, so they print as written; roll them in a wildcard instead. Drag the corner to make it taller.
- **Negative**: Words to keep out of the image while this toggle is on. They go with its variable (and, in Pick one, with the picked variable), so an Assembler that prints it sends them to its negative output, like a wildcard option's negative. It can read $variables; off, or without one, the variable carries none.
- **Off value (Any on)**: What the variable gets while the toggle is off, with its own Off negative. Empty prints nothing. With both, one toggle writes either side: a Buttons toggle Anime / Real can write "anime style" or "photorealistic", each keeping the other's look out of the image. Either one makes the variable hold text, not true or false; $name.bool still reads the switch.
- **Needs**: Any on only. Another toggle this one needs. While that one is off, this one is off too; it keeps your choice for when it comes back on.
- **When off**: Nothing, Mute or Bypass: what happens to the nodes wired into the row's dot (and to the canvas groups you pick) while the toggle is off. On, they run. When several toggles drive one node, off wins: it runs only while all of them let it (Mute beats Bypass).
- **Invert**: Mute or bypass while the toggle is ON instead, for a node used only as a switchboard.
- **Canvas groups**: Groups on the canvas whose nodes When off also covers, by title. No wires needed.
- **Upstream can set it**: When the upstream Context holds this toggle's variable as a yes/no word (true, yes, on, 1, false, no, off, 0), that value sets the switch for the run.
- **Group**: Which label it sits under. You can also drag the toggle's grip under another label, or above the first one.
- **BOOLEAN output**: Show an output for switch nodes. Off for a toggle only rules read.
<!-- fields:end -->
## Toggles
- **Any on**: each toggle is on or off by itself. A toggle that **needs** another is off while that one is off, and keeps its own choice for when it is on again.
- **Pick one**: only one toggle is on: the one the upstream picked variable names (with **Upstream can pick**), else the first one upstream set on, else the first one you switched on. Optional **writes** variable gets the picked toggle's **Value**, or its name; internal unless **Show in Assembler**. **Always one on** makes it work like radio buttons: the picked toggle can't be switched off, only swapped, and with none on the first one is picked. Its **Style** (Radio, Chip, Switch, Check) sets every row's look.
- **When off**: Nothing, **Mute** or **Bypass** the nodes wired into the row's dot and any **Canvas groups** you pick, while the toggle is off (needs and Pick one count). Done on the canvas when the toggle flips.
- **Invert**: mute / bypass while the toggle is ON instead. An icon by the name shows a control is wired: coloured while it acts, dim while not; hover for the nodes.
- **Show** (by the variable): show the `$variable` under the name in the clean view.
- **Upstream can set it**: an upstream yes/no value for the toggle's variable (`true`/`false`, `yes`/`no`, `on`/`off`, `1`/`0`) sets the switch for the run.
- **Clean and edit views**: select the node and the indigo pencil in ComfyUI's selection toolbar opens the edit view (mode, grips, row editors, Add toggle / Add label); **Done** goes back to the switches only.
- **Style**: switch, checkbox, two buttons (your own words, e.g. Day / Night) or chip.
- **Labels** group the toggles under them; fold one to hide them (their outputs gather on the label).
## Merge into WP Toggles
Select Boolean nodes, right-click, **Merge into WP Toggles**. A node merges when its only output is `BOOLEAN`, nothing is wired into it and it has one on/off value. Titles become names, values stay, wires move. One undo step.
Reads a `$variable` from the upstream Context and sends it into a dropdown input: the checkpoint, sampler, scheduler, VAE or a LoRA name. It matches the text against that dropdown's real list first.
<!-- fields:start -->
## On the node
- **context (in)**`context`: The Context that holds the $variable.
- **var_name**`variable`: The $variable to read. The list shows every variable the wired Context has.
- **match**`COMBO`: How close the text must be to an option: exact, loose (the default) or closest. See below.
- **fallback**`COMBO`: A dropdown of the options of the input it's wired into, filled when you connect it. Used when nothing matches or the variable is empty. (first option) means the first option in the list.
- **if_no_match**`COMBO`: use fallback carries on with the fallback and warns you. stop the run stops here and lists some of the options.
- **choice (out)**`any`: Wire it into a dropdown input: ckpt_name, sampler_name, scheduler, vae_name, lora_name and so on. The line under the picker names what it feeds and how many options that has.
<!-- fields:end -->
## Matching
- **exact**: the text must be an option.
- **loose**: capitals, folders, the extension and `space _ - .` don't matter; then the shortest option that starts with, or contains, the text.
- **closest**: loose, then the most similar option (forgives typos).
Wired into a switch or another input without a list, the text passes through unchecked.
## Tip
Hide the variable (the globe on its row) so the model name doesn't print in the prompt. Put **WP Model Info** after the loader and your rules can see which model was picked.
Reads a `$var` from the upstream **PipelineContext** and emits a `FLOAT`.
Reads a `$variable` from the upstream Context and emits a `FLOAT`.
## Inputs
<!-- fields:start -->
## On the node
| Name | Type | Notes |
|---|---|---|
| `context` | `PIPELINE_CONTEXT` | Required. |
| `var_name` | dropdown | Pick from upstream `$vars`. |
| `index` | `INT` | Which float match in the var's value. |
| `default` | `FLOAT` | Returned when no Nth match. |
- **context (in)**`context`: The Context that holds the $variable.
- **var_name**`variable`: The $variable to read. The list shows every variable the wired Context has.
- **index**`INT`: Which number to take when there are several: 0 is the first, 1 the second. Usually 0.
- **default**`FLOAT`: Used when the variable is missing, has no number, or has fewer numbers than the index. The node never stops the run; it uses this instead.
- **value (out)**`FLOAT`: The number, for any FLOAT input: CFG, denoise, a LoRA strength and so on.
Finds the numbers in the value, in order, and returns the one at `index` (0 is the first). Whole numbers count (`"1920"`→ `1920.0`), and so does scientific notation.
- `"strength: 0.85, scale: 1.5"` index `1` → `1.5`
Reads a `$var` from the upstream **PipelineContext** and emits an `INT`.
Reads a `$variable` from the upstream Context and emits an `INT`.
## Inputs
<!-- fields:start -->
## On the node
| Name | Type | Notes |
|---|---|---|
| `context` | `PIPELINE_CONTEXT` | Required. Comes from a `WP Context` chain. |
| `var_name` | dropdown | Pick from upstream `$vars`. Stored as `"$seed"`. |
| `index` | `INT` | Which integer match in the var's value (0-based). |
| `default` | `INT` | Returned when the var is missing or no Nth match. |
- **context (in)**`context`: The Context that holds the $variable.
- **var_name**`variable`: The $variable to read. The list shows every variable the wired Context has.
- **index**`INT`: Which number to take when there are several: 0 is the first, 1 the second. Usually 0.
- **default**`INT`: The value to use when the variable is missing, has no numbers in it, or the index is beyond what was found. The node never stops the run; it uses this instead.
- **value (out)**`INT`: The whole number, for any INT input: width, steps, batch size and so on.
<!-- fields:end -->
## Parsing rule
Scans the var's value for substrings matching `-?\d+`, returns the Nth match.
Finds the whole numbers in the value, in order, and returns the one at `index` (0 is the first).
Wildcard Pipeline runs offline. Generating prompts, the canvas nodes and the
library manager never touch the network. These are the only outbound requests
it makes:
| What | When | Where to |
| --- | --- | --- |
| Update check | When the manager opens (turn off under Settings → Updates), or when you click **Check now** | GitHub releases API |
| Community tab | Only when you open the **Community** page in the manager. The page runs in a sandboxed frame from the community site, so its code never runs inside ComfyUI, and your community sign-in is stored by that site, not by ComfyUI | `wp.dumiflex.dev` |
| AI assistant | Only after you turn it on under Settings → AI assistant, and then only when you test the connection, refresh the model list or ask it to draft or change something | The server you set there: your own Ollama, LM Studio or llama.cpp on this PC, or the Claude or OpenAI API |
| AI web search | Only after you pick a search engine under Settings → AI assistant → Web search, and then only for a search you allow (or every search, if you turned on **Don't ask before web calls**) | The engine you picked: your own SearXNG, or Brave Search, Tavily or Kagi with your key |
| AI page reading | Only with web search set up, for one link a search you allowed returned, after you allow the read (Settings → AI assistant → Read result pages; Off stops it) | That page (built in, public addresses only), or your Crawl4AI / Firecrawl server, which fetches it |
| AI Danbooru lookup | Only after you turn on **Danbooru tag lookup**, and then only for a lookup you allow | `danbooru.donmai.us`, read-only JSON for one tag (tag, alias, implications, wiki, related tags), one request a second, never posts or images |
| Booru tag list for value autocomplete | Only when you click **Download** under Settings → Tag autocomplete | `github.com` → `objects.githubusercontent.com`, our own release asset |
Delete the downloaded tag file and the autocomplete feature simply turns off.
The AI assistant is off by default. With a local server (Ollama, LM Studio,
llama.cpp) nothing leaves your PC. With Claude or OpenAI, the text you ask
about is sent to that provider under your own account: your request, the
wildcard's name, its existing options and tags, and for rules the wildcards
involved. Writing derivation rules also sends the list of variables your
library sets, with the first options of each wildcard, so the model can use
their names. Describe sends what the item holds and the tags your library uses;
Organize sends that for every selected item, plus your category names.
The chat sends a list of your library's items (names, types and variables),
the conversation so far, the items and docs pages the assistant reads to
answer, and a short note of what your page shows (the open editor's item with
its unsaved changes, a list's filters and selection, the Test Runner's last
results, the Pack builder's plan).
The pack builder sends your description, a sample prompt if you gave one, a
short summary of your library's conventions (option style, the tags and
variables you use, standing negatives in your templates, and the names, variables
and tags of wildcards it could reuse) and, for each item it builds, what the
pack has built so far.
A follow-up (Refine) sends that conversation's earlier requests and answers
again; nothing is stored between requests.
## How the AI assistant is locked down
The model calls come from ComfyUI's Python side, so the key never reaches the
browser:
- **The key is write-only.** It is saved in `ai.json` in ComfyUI's user
directory (readable only by you on Linux and macOS) or read from
`WP_AI_API_KEY` / `ANTHROPIC_API_KEY` / `OPENAI_API_KEY`. No route returns
it; Settings only shows whether one is set.
- **Callers can't choose the address.** Requests carry a task, never a URL.
The address comes from your saved settings and must be a plain `http(s)`
address with no user name, password, query or fragment.
- **Nothing is saved for you.** Drafts come back to the editor, and only your
own **Save** writes them to the library. A chat change to the item open in
an editor goes into that editor, to keep with Save. Organize and other chat
changes are saved only when you press **Apply**, through the same API the editors use,
and a pack only when you press **Install** (one import, one undo).
- **Size caps both ways.** Requests are capped at 512 KB and replies at 4 MB
while streaming, at most two model calls run at once, and upstream error
bodies are cut to a short message.
- **Local servers skip your proxy.** Requests to `localhost` / `127.0.0.1`
ignore `HTTP(S)_PROXY`, since a proxy can't reach your own PC; cloud
providers still go through it.
Because ComfyUI has no login, anyone who can reach its port can use the
assistant while it is on, which spends your credits on a paid provider. Keep
it off on a ComfyUI you expose to other people.
The reasoning is kept next to the code in
[`wp_api/_ai_client.py`](../wp_api/_ai_client.py), with tests in
- **WP nodes follow your ComfyUI color palette.** On Solarized, Arc, Nord, Github, palettes other extensions add (Obsidian, Milk White …) or one you imported, WP nodes now take the palette's node, widget and text colors instead of staying grey, so they match the nodes around them. Text is kept readable whatever the palette, and the accent, module kind and variable colors keep their meaning. A light palette that doesn't mark itself light (like Milk White) now gets the light colors instead of dark ones. Dark and Light look as before. To keep the WP colors everywhere, set **Wildcard Pipeline › Sizing › Canvas colors** to **Wildcard Pipeline colors**.
- **The manager can wear your ComfyUI palette too.** Settings › Appearance › Colours has a new **ComfyUI palette** theme: the manager takes the colour palette ComfyUI is using, imported ones included, and switches the moment you change it in ComfyUI. Dark and Light wear Native; other palettes give the pages, cards and text their colours, kept readable, and decide dark or light themselves.
- **WP Note's text has its own window.** Writing a long note inside the node was cramped, so the text now opens in a window like the module editors: press **Edit text** in the note's editor and you get the Markdown editor with its formatting bar on the left and the note as it will read on the right, updating as you type. The preview is the node's own card, with its look, tone, colour, title and width; a label shows its tag and the card you see when you point at it. **Done** (or Ctrl+Enter) puts the text on the note; **Cancel**, Escape or × leave the note as it was, and ask first if you changed something. The editor on the node keeps the settings you set while looking at the canvas: tone, look, colour, title, pin and the bookmark's landing spot, zoom and shortcut. The node shows the text's first line and its length.
- **Any extension picture in a WP Note.** The Pictures panel's **From the extension** now offers every screenshot from the docs, not just the toolbar one, found by typing part of its name (the grid shows only matches, so the panel stays tidy). After you add a picture the panel stays open, so its width slider is right there, and the icon list and picture grid use the window's height instead of a small scrolling box. The icon picker on the node now fills the editor's width.
- **Export as plain wildcard files.** Import / Export → Export has a new **Wildcard files (.zip)** button: the picks become `.txt` wildcard files for Dynamic Prompts, Impact Pack, Prompt-PostProcessor, Easy-Use and A1111/Forge, so you can share a pack with people who don't use Wildcard Pipeline. References and `$variables` become `__folder/name__`, uneven weights become repeated lines, and a README in the zip lists what had no plain form (rules, tags, the chance of nothing, negatives).
- **A toggle's settings open in a window.** In WP Toggles' edit view each row now has a pencil, the globe and a trash button, like a module on a Context node. The pencil opens that toggle's settings in a window instead of a panel squeezed into the node, with the row drawn on top as the node will show it; Done saves, Cancel drops the changes (it asks first when there are any). Mode, order, labels and the Pick one options stay on the node.
- **Icons and colours for WP Toggles.** A toggle can show an icon before its name and have its own colours for the icon, the name and the control itself, so Day can be yellow and Night blue. A label picks any colour with the colour picker (not just the eight presets) and an icon too; the label's icon button is a small square like its colour one. A Chip toggle shows its variable after the name (Day · `$day`) while Show is on, a variable wears its name's colour, and icons now sit level with the name.
- **A negative for each Pick one toggle.** Under a toggle's Value there is now a Negative: words to keep out of the image while that toggle is picked (Night: "sunlight, blue sky"). They go with the picked variable, so an Assembler that prints it puts them in its negative output.
- **Every toggle can have a Value and a Negative, and `$name.bool`.** Give a toggle a Value and its variable prints it while on and nothing while off: a Rain toggle with "heavy rain" makes `$rain` print "heavy rain" or nothing, and its Negative ("sunny, dry") goes to the Assembler's negative output with it. The switch is still there as `$rain.bool` (true or false) for rules and conditions; `bool` can't name a tag group any more. Packs that read `$name.bool` need this version (schema 12).
- **An Off value and Off negative for Any on toggles.** A toggle can also say what its variable writes while off, with its own negative: a Buttons toggle Anime / Real writes "anime style" or "photorealistic". Empty, off prints nothing as before.
- **A Grid layout for WP Toggles.** The edit bar has a **Layout** switch, Rows or Grid, for every mode and style: Grid puts each toggle in a tile and wraps the tiles to the node's width (the node never resizes itself). Each label has a grid button for its own group, so one group can be a grid while another stays rows; a folded group keeps its toggles' dots on its title. Under a grid's tiles, thin lines carry the dots: mute/bypass dots stack on the left with their toggle's name and BOOLEAN outputs on the right with theirs, each side packed on its own, so one line can hold two toggles. The arrow on the first line merges a group's lines into one, like the Context Injector's merged wires, which says how many go in and out ("2 in · 3 out") with the names on hover. The edit view keeps rows.
- **Smoother drag and drop in WP Toggles.** Rows now drag like the Context Injector's: the row you hold dims, the row it lands beside opens a gap with a glowing line, and after the drop the rows slide into place and the moved one pulses, also on a zoomed canvas. An indented line in a group's colour puts a toggle in that group; a full-width line just above a label or below the last row puts it below the group, in no group (before, a toggle could only leave a group to the top). Groups can be reordered: a label moves with its toggles and lands only between groups. In the Grid layout each tile is as wide as its name, variable and control, and the tiles in a line stretch to fill it, so a chip's name is no longer cut and On/Off buttons no longer take two tiles; a Chip tile is as tall as the tiles beside it.
- **Always one on, for WP Toggles' Pick one.** A new box in Pick one's options makes the group work like radio buttons: one toggle is always on, clicking the picked one does nothing, and you switch by picking another. With none on, the first toggle is picked, on the node and in the run.
- **WP Context drags like the Context Injector too.** The row it lands beside opens a gap that eases open with a glowing line in it; inside a bundle the line wears the bundle's colour, and a dragged bundle dims like a dragged row. The gap also opens beside a bundle inside another one. A closed bundle now takes drops: drop on the middle of its header to put the row (or a bundle) inside, where it opens, or on its top or bottom edge to drop it beside.
- **More looks for WP Toggles.** Pick one has its own **Style**: Radio (as before), Chip, Switch or Check, the same for every row; a toggle's own Style and Needs are hidden there since they don't apply. A pick's **Value** is now a text box like the Assembler's that you can make taller: `$` lists every variable upstream (Context Injector ones too) and the toggles' own, tag, LoRA and embedding autocomplete work in it, and a `$name` nothing upstream sets is flagged under the box and reported in WP Debug after a run. Inline `{a|b}` picks need a seed, so in the Value and in Context Injector templates they print as written; both editors now say so. A Chip toggle now spans the whole row, in Any on and Pick one, so it's an easy target and lines up with the rows around it. In the edit view you can drag a toggle into or out of a label's group (the Group field still works), and a grouped toggle shows its label's colour on its left edge.
- **WP Debug knows the newer nodes.** The Variables tab now groups variables into one card per node that set them, with each row's kind as a small square and a Context module's odds, pin, sweep or branch beside its name, and WP Context Loop, WP Model Info, WP Toggles and the Context Injector each get their own icon, colour (orange, lime, indigo, blue) and row details: the Loop says which frame ran, with its seed, sweep combination and value line; Model Info says where each value came from; Toggles shows each toggle's true / false, or its value text with its `.bool` state and negative (in Pick one too, beside the picked value); the Injector shows each value with its type. Group headers show the node's title beside a Context's codename. A long value folds to three lines (a long list to its first three items, a long negative to one line) until you press **Show all**, and `.axis`, `.bool` and tag values are chips. A trace step now says much more about why it came out that way: a wildcard lists every option with its weight, chance and why it couldn't come up (filtered out, toggled off, excluded by a constraint, weight 0) and the pool after each step, plus its seed, repeats and separator; a combine shows its template and what each `$variable` read; fixed values say which rows were used; a constraint lists the steps it re-weighted; and the Loop, Model Info, Toggles and Injector rows say what they read (model class, matched rule, upstream values, a parent toggle that is off, a template's inputs). The Trace tab stays the run in order: those nodes' rows are numbered steps like any module, with their icon and colour, and module rows carry their kind's icon too. **Show node** now makes the module or field the row came from blink on the canvas, for every node, opening a collapsed node, a folded bundle, a folded Toggles group or the Injector's folded row list first (a node in a subgraph opens the subgraph, which is left as it is), and a constraint warning links to its step in the trace again. Each row says where its value came from (a Loop frame and its seed and sweep combination, a Model Info detection, a pin or a file-name rule, a Toggles switch set upstream), and their warnings have readable names and sit on the node's row. The Loop's `$iteration` variables no longer show as coming from upstream, a sweep frame's wildcard says **swept**, Match variable says which variable it matched, a pool filter shows the value its `$variable` read, and with a Loop that skips frames the frame picker shows the Loop's own frame number.
- **Hide the variables an Assembler doesn't use.** The Prompt Assembler's variables toolbar has a new eye button beside Load, Save and Clear: it marks every upstream variable that neither the prompt nor the negative template reads as internal, so the chips and the `$` list only offer what you print. Combines and rules still read internal variables, so `$hero` used inside `$scene` keeps working. Every other Assembler on the same context is checked first, and a variable one of them prints is kept; so is a module that also writes a variable in use, since one switch covers all its variables. The message says what was marked and what was kept and why, and **Undo** puts it all back.
### Wildcards
- **Filter a wildcard by a variable.** The Pool filter can now read a `$variable` when the prompt runs. Tag a Setting wildcard's options `pony` or `illustrious`, pick `$model_variant` under **By variable** in its Pool, and each run keeps the options for the loaded model; options with no model tag stay for every model. Constraints on the wildcard still apply to what is left, so you no longer need a Model wildcard with Match variable plus a constraint just to narrow one list. References work the same way: `@{Setting:$model_variant}`. A value is compared like a tag (case and spaces don't matter), a multi-pick list keeps options for any of its picks, and an unset variable or a value that is no tag there leaves that part of the filter out, with a note in WP Debug. Packs that use it need this version (schema 11).
### Fixes
- **The Assembler's template boxes show on a subgraph node.** Wiring the Prompt Assembler's `template` or `negative_template` to a subgraph's input left an empty space on the subgraph node, so the prompt could only be edited from inside. The subgraph node now shows the same editor, with the `$` list of the variables upstream of the Assembler inside, in Nodes 2.0 and the classic canvas; what you type there runs and is saved with the workflow.
- **Bundle headers fit narrow nodes and the Settings preview.** On a narrow Context node, or in the Display settings' live preview, a bundle's header pushed its lock, internal and remove buttons past the frame and stretched the bundle wider than the rows around it. The frame now keeps its width: the name, the state badge and the "3 mods · 1 drifted" summary shorten first, and when the header is narrow the badge word gives way to its coloured dot (point at it for what it means).
- **Toggle negatives show in the Assembler's negative preview.** A toggle's Negative (or Off negative), and the picked toggle's negative in Pick one, went to the negative prompt on Run but never showed in the Assembler's negative preview. The preview shows them now.
- **WP Var nodes read `$name.bool`.** WP Var → Bool (and the other Var nodes) can now read a toggle's switch as `$name.bool`. A toggle with a Value holds that value in its variable, so the **Batches and grids** example's Quick preview stopped picking the small image size. Its Var → Bool now reads `$quick_preview.bool`.
- **WP Toggles variables reach the Assembler.** The Pick one variable (like `$time`) never showed in a downstream Prompt Assembler, even with its box ticked, so the Assembler said "No upstream variables yet". It shows now, and the box is called **Show in Assembler**. Each toggle also has a globe on its row in the edit view, on by default: it keeps the toggle's true/false variable internal, for rules only, and turning it off lets the Assembler print it, in Any on and Pick one alike. **Show** now hides the `$variable` under the name in the edit view too, so you can see what it does.
- **Pop-up panels in the manager have their padding back.** Since the move to Tailwind 4, the manager's pop-up panels (the Test Runner's **Add to stack** picker and others built on the same panel) lost their inner padding, so the search box, kind chips, match count and Sort sat flush against the panel's edges. They have room on every side again.
- **Empty wildcard pool.** A wildcard whose options have no tags used to open an empty Pool. It now says why: there are no tags to filter by, so every enabled option can roll, and tags added in the library editor (Sub-Categories) show up there as pills. Advanced says the same instead of an empty palette, and the Pool's expand button is no longer highlighted when there is nothing to open.
- **Subgraphs see the variables around them again.** On current ComfyUI frontends (1.5x) a WP Context or Assembler inside a subgraph never found the variables set outside it, so a `$time` wired in from the parent graph showed as MISSING VAR and the subgraph's badge counted conflicts that weren't there. The walk now crosses a subgraph's edges in both directions, upstream and downstream.
- **The subgraph badge shows in Nodes 2.0 straight away.** With Nodes 2.0 on, a subgraph's conflict badge only appeared after you entered and left the subgraph, or switched to the legacy nodes and back. It now shows, changes and clears as soon as the problem inside does.
- **Centred chevrons on WP Context Loop and WP Seed List.** The arrow on **Per-iteration seeds** and **Sweep combinations** sat right after the label and a little low; it now sits at the right edge, level with the label, with the locked / bypassed / frames badges just before it.
- **Focus on a warning reaches nodes in subgraphs.** The **Focus** button on an "unresolved" Assembler warning only looked in the graph you had open, so for an Assembler inside a subgraph (or back out at the top while you were inside one) it centred and flashed empty canvas. It now opens the graph the node lives in, the same way the breadcrumb does, then centres, selects and flashes it. The check before a run also looks at every Assembler again while you are inside a subgraph.
- **A new bundle no longer shows as drifted.** A bundle saved without its children's content hashes (a hand-made or imported pack) marked every child drifted the moment you added it to a Context, though nothing had changed. Its children now come in matching the library.
- **Collapsed bundles say when something inside is wrong, and stay narrow.** A row's MISSING VAR or other warning chip inside a collapsed bundle used to widen the WP Context node though you couldn't see it, and the bundle's header gave no sign of it. Hidden rows no longer widen the node, and a collapsed bundle's header now shows a dot for the worst problem inside (a conflict, or a module missing from the library) next to EXAMPLE; hover it to see which rows. Legacy and Nodes 2.0 alike.
- **Nodes on top cover our widgets again (legacy look).** With the legacy node look, a WP node's panel (Context modules, WP Debug, the Assembler) showed through any node lying on top of it, unless that node was selected. The covered part is now hidden and clicks there go to the node on top. Nodes 2.0 was already right.
- **Var → Int / Float / Bool show their default after a run.** When the variable a converter reads wasn't set, its **last execute** strip still said "run workflow to see result". It now shows the default it used, in amber, with "$name was not set" under it.
- **The Prompt Assembler without a Context.** Used as a plain text box with its own negative, the Assembler's preview said "(template empty or unresolved)" about text with nothing to resolve. It now says **plain text**, counts any `$name` nothing sets as unresolved, and the empty variables row says how to get variables. The tails of g, p and y on the **negative** row are no longer cut off.
- **A Boolean node can drive a rule.** A ComfyUI Boolean wired into the Context Injector wrote `True` / `False`, so a derivation testing `equals true` (the way WP Toggles writes it) never matched. Booleans now read as `true` / `false` everywhere a variable is printed or tested.
- **No more cut-off letters on a few buttons.** The bottoms of g, p, q and y were cut on **Sweep combinations** (WP Context Loop) and **Per-iteration seeds** (WP Context Loop, WP Seed List), and on item names in **Library health**. The **unset** button next to a wildcard option's **fallback** chip now has room around its word, at the chip's height, and the empty cell-width box on **WP Label & Grid** shows its whole **keep size** hint.
- **Category icons saved as `pi-…` show again.** A category whose icon was stored with the `pi-` prefix (made by an older seed script, by hand or by an import) showed a blank gap instead of its icon in the category picker and lists. Both spellings now draw the icon.
- **Pictures in a WP Note have a frame.** A picture whose edges matched the note (a dark screenshot on a dark note) looked like a hole through the node. Note pictures now have a thin border, a soft shadow and a backdrop behind see-through parts, in every theme.
- **The colour picker follows the pointer.** Dragging in a colour square (category colours, Settings, the WP Note colour) no longer drifts away from the pointer, worst near black, and the thin white and coloured lines along the square's right and bottom edges, and the jagged edge round the colour swatch, are gone. The **Seed strategy** and **Recently opened** buttons no longer cut the tails of g, p, q and y, and the Assembler template no longer shows a "more below" line when nothing is hidden.
- **Scrollbars no longer cover what's under them in Firefox.** Firefox on Windows 11 (and macOS) draws scrollbars over the content, so the icon picker's last column, the end of each line in the note editor and other text boxes, the last row of tables that scroll sideways and the edge of menus sat under the bar. Those places now leave room for it, only while they actually scroll and only in browsers that draw scrollbars this way, so a box that fits (like the category icon picker) has no empty strip.
- **WP Note's text scrolls on the first try in Firefox.** The note's text box sat in the node, which passes its clicks to the canvas so it drags like a node, and that kept its scrollbar from noticing the mouse until you clicked inside. The text box now lives in its own window (above), where it scrolls like any other.
- **Drag a WP Note or WP Bookmark while its editor is open.** An open editor used to hold the node in place. Press on the editor's background, its rows or labels (anywhere that isn't a control) and drag to move the node; buttons, fields and switches work as before.
- **Image Filter keys keep working after you switch views.** Pressing Z (or G, D, M) right after clicking a button that the new view doesn't have, such as the mask's **Over image / Mask only** switch, lost the keyboard to the canvas: 0, 1 and 2 jumped to a bookmark or warned that the key was taken, and G or D did nothing. The picker now keeps the keys when its view changes.
- **WP Note's editor fits its tools.** The editor opens 20 px wider, so the text toolbar, the bookmark's zoom box and its buttons no longer spill past its edge, and the toolbar wraps instead of overflowing on a narrower note.
"""What the model reads back for one paused call: the browser's text,
orthattheuserdeclinedorthepagecouldn't do it."""
ifanswer.get("denied"):
returnf"{tool}: the user declined this"
ifanswer.get("cancelled"):
returnf"{tool}: not run (the user moved on)"
text=answer.get("text")
ifnotisinstance(text,str)ornottext.strip():
returnf"{tool}: done"
text=safety.strip_invisible(text).strip()
iflen(text)>MAX_RESULT:
text=text[:MAX_RESULT]+" …"
returnf"{tool}: {text}"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.