Repository navigation
Conversation
(cherry picked from commit ddf39a2)
…0181) ## ELI5 Editing or deleting a repeated row now updates its promoted controls through nested subgraphs. Outer labels follow the surviving row, and controls and links disappear when their inner target is removed, while labels renamed by the user are preserved. ## Summary - Propagate DynamicGroup row renumbering and orphaned-promotion cleanup through every enclosing subgraph and its host instances. Inputs with other connected targets keep their promotion. - Preserve per-instance custom labels in the shared `SubgraphNode` rename listener; only labels still matching the previous generated label are updated. - Collect host instances lazily once per row-change operation and reuse that lookup across fields, rows and promotion boundaries. No persistent graph cache is added. - Exercise a remote resize of an already materialized root node through the real document applier, change tracker and outbound minter: frontend workflow serialization updates, one undo entry is recorded, and remote changes do not echo back. A subsequent local edit proves the outbound minter is active. ## Validation - Original regression proof: reverting the nested-promotion fix produced **2 failures / 38 passes**; applying it produced **40 passes**. - New per-instance-label regression: **1 failure / 41 passes** before the label fix. - `pnpm exec vitest run src/core/graph/widgets/dynamicGroupWidget.test.ts src/lib/litegraph/src/subgraph/SubgraphNode.test.ts src/workbench/extensions/agent/crdt/liveGraphApplier.changeTracker.test.ts --maxWorkers=1`: **98 passed**. After narrowing the new fixture's serialization types, its two tests passed again. - The unchanged real-backend regressions in [#17510 — test: verify DynamicGroup in a dedicated backend E2E job](#17510), now stacked here, both pass. The [dedicated Linux job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37396376241/job/112054534444) reports **18 passed / 1 failed**: the remaining failure is Undo/Redo of a once-promoted row, which also fails after reverting both production files to this PR’s base (`9eaaf261ff`). Local testing matched **18 passed / 1 failed** (one worker, no retries; local Vite-only timeout 60s, CI retains 30s). - Formatting, lint, application typechecking, and commit/push hooks passed, including Knip and the changed-file Fallow gate. ## Separate Undo/Redo follow-up The remaining real-backend E2E failure is tracked in [#20285 — Redo history is cleared after Undo normalizes node size](#20285). Undo changes the restored source-node height, and the next navigation click records that difference as a new edit and clears Redo. The E2E child keeps this test enabled as a real failure; the linked completed Linux run reports 18 passed / 1 failed. No source-size workaround or shared history change is included in this PR. The shared-history fix now has an owned draft: [#20294 — fix: preserve redo after restored node size normalization](#20294), assigned to @jaeone94. Its two normalization regressions fail before the fix, and 140 related unit tests pass with it. Applying only that production patch to the unchanged E2E child makes the promoted-row Undo/Redo case pass locally. The full local run was 17 passed / 2 nested-entry click timeouts; see the draft for that limitation. The child branch and its CI result have not been changed by this verification. ## Remaining remote-edit scope The remote-frame test begins with a correctly materialized root node. It does not certify first catch-up, CLI/catalog integration, or edits inside subgraph definitions: the current collector/applier path handles root-node widget updates. Those broader agent-path checks remain separate from this nested-promotion fix. Fixes #20179 Fixes #20180 ## Provenance The two original nested-promotion regressions pass unchanged with the E2E PR stacked on this fix. The child's [completed Linux job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37397861046/job/112059272768) reports 18 passed / 1 failed; the remaining shared-history Redo defect has the owned issue and draft linked above. The child subsequently updated its devtool and backend pin for the private API: four focused real-backend cases passed locally, while the new full-suite CI run is pending. The 18/1 result is evidence from before that pin update, not a claim that the latest child head is green. - **Authored by:** interactive session - **Verified:** the unit results and hook checks above. The [real-backend CI job](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/37396376241/job/112054534444) and local run both passed the two targeted regressions; the full suite is not green because the baseline Redo failure remains. - **Deviations:** full nested Agent/CLI/document/follower convergence is not covered by the root-node remote-frame test. No backend dependency override is added to this fix PR. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> (cherry picked from commit 65d257e)
## ELI5 Changing a Boolean switch in a Nodes 2.0 workflow should survive a browser refresh, even if it is the last thing you do. This records the edit immediately after the new value reaches the node. ## Motivation Found while validating #20307 — test: validate native LoRA stack assets and execution. The same failure reproduces on the stock Boolean node without DynamicGroup or subgraphs: the switch changes on click, after the global mouseup snapshot, so a toggle-only edit never reaches the saved draft. ## Summary - Capture the active workflow after explicit switch or labelled-toggle updates, following the existing combo-widget pattern. - Add component coverage for both controls and browser coverage for click/Enter followed by draft reload, without an intervening save or canvas action. ## Provenance - **Authored by:** interactive session - **Verified:** `pnpm test:unit src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts --maxWorkers=1`: 24 passed; the two added cases failed before the fix. Targeted Playwright toggle-only cases: 2 failed before, 2 passed after. App/browser typechecks and staged lint/format checks passed through the commit hook; pre-push Knip and Fallow also passed. With both independent fixes applied locally to #20307 — test: validate native LoRA stack assets and execution, the two previously failing scenarios passed: model drop followed by native execution, and a two-level promoted toggle edited after draft reload. No backend pin is needed for this PR’s stock-node regression tests. ## Test plan - [x] Toggle the stock Boolean node after restoring a draft, then reload and check the value. - [x] Exercise both mouse click and Enter. (cherry picked from commit ea6229a)
## ELI5 Deleting a repeated row should also remove the wires that only fed that row. When the row was exposed through nested subgraphs, a wire from an ordinary outer node could remain after its destination disappeared. This disconnects that unused wire while preserving connections with another internal consumer. ## Summary - Disconnect orphaned host inputs regardless of whether their source is an ordinary node or a subgraph boundary. - Continue cleanup through nested boundaries only for subgraph-input links. - Cover deletion of a middle row across two promotion boundaries, preservation of the next row, and preservation of a shared input with another consumer. ## Verification - Regression on unmodified production: 43 passed, 1 failed because the deleted row's outer wire remained. - With the fix: `pnpm test:unit src/core/graph/widgets/dynamicGroupWidget.test.ts --maxWorkers=1 --no-file-parallelism`, 44 passed. - Pre-commit formatting, lint, and app typecheck, plus pre-push checks, passed. - Real-backend browser coverage belongs to #17510 (test: verify DynamicGroup in a dedicated backend E2E job) and #20307 (test: validate native LoRA stack assets and execution). Those suites pin a Core revision containing the private DynamicGroup contract because the default CI image does not provide the test nodes. This PR keeps the topology regression at the unit level and does not add another temporary backend override. ## Provenance - **Authored by:** interactive session - **Verified:** the targeted regression suite and repository pre-commit checks above. - **Deviations:** dedicated browser integration remains in the existing E2E follow-up work. (cherry picked from commit f9684f1)
Dragging a model onto an existing Nodes 2.0 loader now updates that loader. Dropping onto empty canvas continues to create a loader. Found while validating #20307 — test: validate native LoRA stack assets and execution, and reproduced with the stock Checkpoint loader. The model assignment logic already handles existing nodes, but its drop target was only the canvas element; Vue node content is a sibling and never reached that handler. - Register the existing drop handler on the canvas and the existing Vue TransformPane separately. Sidebar and toolbar UI remain outside those targets. - Preserve model-to-widget selection and node creation behavior. The canvas keeps its original DOM parent, preserving legacy touch listeners, dialog stacking, and resize callers. - Add real drag E2E coverage for existing-node assignment and empty-canvas creation using a single stock loader fixture. - **Authored by:** interactive session - **Verified:** Targeted model-library Playwright cases: existing-node assignment failed before the fix while empty-canvas creation passed; both passed after. The two existing `logicalCanvasSizing.spec.ts` cases also passed. All four touched unit suites passed (57 tests) after the lifecycle and native-drop handoff corrections. A new title-editor touch regression fails with the wrapper and passes with the original canvas parent. App/browser typechecks and staged lint/format checks passed through the commit hook; pre-push Knip and Fallow also passed. With both independent fixes applied locally to #20307 — test: validate native LoRA stack assets and execution, the two previously failing scenarios passed: model drop followed by native execution, and a two-level promoted toggle edited after draft reload. No backend pin is needed for this PR’s stock-node regression tests. - [x] Drop a model on an existing Vue Checkpoint loader; check the filename and unchanged node count. - [x] Drop a model on empty canvas; check the new loader and selected filename. - [x] Check existing canvas sizing coverage at DPR 2. Removed the extra drop wrapper after Cursor identified its effect on canvas-parent touch listeners and LiteGraph dialog placement. Both drop targets reuse the existing handler; model selection and hit testing are unchanged. The conditional Vue pane appears after GraphCanvas mounts. The existing drop-target composable now watches the element, registers a late target, releases a replaced or removed target, and disposes the current registration on unmount. Two new actual-composable lifecycle regressions fail before this correction and pass after it. Existing static targets and the canvas parent stay supported. Consumed pragmatic drops now also clear a stale native drag target. A regression fails before the correction and passes after it; unhandled native drops still hand off to the current node. (cherry picked from commit 495879f)
Undo should leave Redo available when a restored node grows automatically to fit its widgets. A deliberate edit should still clear Redo. If another workflow finishes opening meanwhile, the older load must leave that workflow and its history alone. Undo can restore a node at a larger size so its widgets fit. The next navigation click previously treated that automatic adjustment as a user edit and erased Redo. Retain the normalized live snapshot while preserving the saved baseline and normal history behavior for intentional edits. Fixes #20285 ([Redo history is cleared after Undo normalizes node size](#20285)). - Preserve history during preload persistence and recover a consumed entry when restoration never applies. If restoration already applied before a later error, keep the previous state reachable through the reverse queue. - Serialize every history request, including consecutive Undo or Redo presses. Each request retains its own result; a failed restore does not reject the request queued behind it. - Check graph state and the committed load sequence after configuration, workflow activation, and the final extension hook. A superseded load cannot return the newer workflow as its own result. - Check replacement before changing the active workflow in the store, and again before resetting a tracker or restoring previews in the service. The app handles superseded activation as cancellation. Public arguments, return conventions, and loader options remain unchanged. - Keep capture suppressed during preparation and activation. Release obsolete markers when a newer workflow completes, while preserving suppression for newer preparation still in progress. - [Earlier CI](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/38101318782) passed on `37e74c2da2`, including all required checks. The browser report records **2,261 passed, 0 failed**. - **435 passed, 1 existing skipped** after the queued-request correction, one worker, across the App, ChangeTracker, workflow service, and workflow store suites. - Queued-request local red/green: six regressions fail before this correction (consecutive Undo/Redo and requests following refusal or rejection); two crossed-direction controls pass. After the fix, all eight cases pass. The delay uses fake timers, with no timing sleeps or new test helper. New-head CI will rerun after the push. - Three fresh activation regressions fail with production code restored to `a0658b8773` and pass with this fix: pause the workflow load before activation; pause after activation but before tracker restoration; pause `afterLoadGraph`. Complete a newer load, then release the older one. Verify the newer workflow, tracker, saved baseline, and graph remain intact and the older load returns cancellation. These are local red/green results, not a claim of CI red/green proof. - Existing coverage also checks saved-state normalization, intentional resizing, draft persistence, late errors, replacement during configuration/preparation, and overlapping history operations. The KSampler E2E in `ecsBridgeHistory.spec.ts` renames KSampler, changes `steps` from 20 to 21, undoes to 20, clicks the root breadcrumb, and redoes to 21. It failed on [8ae1b91](8ae1b91), before [#17441: feat: support DynamicGroup widget inputs](#17441), and also failed with history code restored from [6bf649f](6bf649f). Previous local verification with the fix passed all three cases in that spec and the image-preview compatibility case. The [earlier changed-spec recording run](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/38101318502) passed all **11 cases** across both changed browser specs, including this KSampler regression and image-preview Undo/Redo. Whole-canvas rollback after partial configuration, retracting already-published Agent document operations, and exhaustive asset-scan interleavings remain separate loader work. This PR adds no feature flag or backend SHA override. - **Authored by:** interactive session. - **Verified:** local historical KSampler red/green, fresh activation red/green, and the four related unit suites above. The normal commit hook passed for the queued-request correction. The earlier CI and changed-spec recording results above predate that correction; its new-head CI is pending. - **Deviations:** no CI red/green or whole-canvas/document rollback claim. (cherry picked from commit a2ad208)
## ELI5
Repeated LoRA rows should each offer the same model picker as a normal
LoRA loader. A model input can now be registered by an exact widget name
or a name pattern, including the two native LoRA stack nodes.
## Motivation
The native loaders repeat filename inputs as `loras.<index>.lora_name`.
An exact registration only covers one row. Listing every index would
couple the frontend to a backend row limit and miss rows restored from
an over-limit workflow.
## Summary
- Keep three-field model mappings: `[modelDirectory, nodeClass, string |
RegExp]`. Register `LoadLoraModel` and `LoadLoraTextEncoder` with one
shared filename pattern, without a separate row-zero key.
- Use one matcher for picker eligibility, model drops, and preview value
bindings. Strings match literally; regex checks remain stable with `g`
and `y`. Empty widget names remain ineligible.
- Carry the selector and filename through model drags, then fill the
first matching widget on the created or existing node. Resolve preview
bindings when their inputs change before looking values up by name.
- Include repeated filename inputs in agent deployment briefs for both
named and positional workflow values, using the same matcher as the
asset UI.
- Preserve the Cloud-only picker gate and existing category/provider
selection. The registrations become available when the backend exposes
the node types; no separate feature flag is added.
## Drop behavior
Model drops fill the first matching widget in node order. They do not
target the hovered row, distribute multiple files among rows, or create
missing rows. Repeated drops may replace the same widget's value. This
is the current node-level drop limitation. Clicking a row's asset picker
still edits that specific row. Expanding DynamicGroup rows in drag
previews is separate work.
## Extension migration notes
Existing string registrations and empty auto-load keys keep their
behavior. A repeated filename registration can use
`quickRegister('loras', 'MyLoader', /^items\.\d+\.filename$/)`; every
matching widget gets picker eligibility, while a model drop fills only
the first match. Asset categories are still selected per node type, so
this does not add per-widget categories.
Code importing the internal drag composable or preview component must
change `widgetValues: { filename: value }` to `widgetValues: [{
selector: 'filename', value }]`. `ModelNodeProvider.key` and
`getRegisteredNodeTypes()` entries can now be `RegExp`; use
`isModelWidget(nodeType, widgetName)` for eligibility instead of
comparing a widget name with the selector. Graph serialization, widget
names, callbacks, and `node.widgets` layout are unchanged.
## Reviewer context
- **Type:** Feature, dynamic asset input matching with native LoRA
loaders as its first consumers.
- **Slots into:** [Comfy-Org/ComfyUI#16309: feat: add native LoRA stack
loader nodes](Comfy-Org/ComfyUI#16309). [#20307:
test: validate native LoRA stack assets and
execution](#20307) is
the child integration PR, including asset selection and real CPU prompt
execution against the pinned native backend. Cloud model preparation
remains separate rollout work.
## Test plan
- Check picker eligibility for both native loaders across row indices
and after row removal/renumbering.
- Check static loaders, auto-loading providers, and OSS combo widgets
retain their behavior.
- Drop a model onto a node with multiple matching widgets and verify
only the first changes. Check new-node placement, preview values, and
the warning when placement has no matching widget.
## Provenance
- **Authored by:** interactive session
- **Verified:** Latest main merge: 231 targeted unit tests passed across
model binding/placement, sidebar/preview, and agent-handoff/build-input
suites (single worker). The named LoRA model-list regression failed
before the handoff adaptation and passed after. Commit hooks passed
formatting/lint and all selected project typechecks; pre-push
Knip/Fallow passed. Earlier selector implementation was also verified
red→green against the previous implementation.
- **Deviations:** The child Native LoRA E2E branch is being refreshed
separately against the merged backend. Real Cloud model preparation and
execution still require staging QA.
(cherry picked from commit 47d37de)
- Use the app singleton instead of useApp(), which core/1.55 does not have. - Replace vi.when in app tests with a local helper; the pinned vitest lacks it. - Drop two E2E additions from #20294 that use helpers missing on core/1.55. - Add missing test imports and the docPromotedWidgets test dependency.
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ❌ 2158 passed, 2 failed❌ Failed Tests📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌐 Website E2ETip All tests passed.
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (70 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 7ab461f170c2bba8916faae4cda606278fa367a4
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## core/1.55 #21040 +/- ##
=============================================
+ Coverage 85.04% 85.20% +0.15%
=============================================
Files 2348 2422 +74
Lines 134238 136703 +2465
Branches 33996 34813 +817
=============================================
+ Hits 114167 116475 +2308
- Misses 19706 19767 +61
- Partials 365 461 +96
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 74 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Backport of the DynamicGroup frontend stack to
core/1.55, prepared in case we decide to ship it on the 1.55 line. ComfyUI v0.40.0 ships the native LoRA stack nodes (Comfy-Org/ComfyUI#16309) but pins frontend 1.55.17, solorasrenders as a plain input slot (FE-3444). Comfy-Org/ComfyUI#17050 disables the nodes in the meantime.One commit per original PR, in this order:
GraphCanvas.test.tsonly; kept the new touch test, dropped the settings-bridge tests that belong to another PR)useApp()→app;parseFlattenableSubgraphDefinitionsdoes not exist on 1.55, socollectSubgraphDefinitionsreads the cloned definitions directly)useApp()in two more files, a local replacement forvi.when(not in the pinned vitest), two E2E additions from fix: preserve redo after restored node size normalization #20294 that rely on helpers missing here, and missing test imports.Tests:
pnpm typecheck:appandpnpm typecheck:browserpass.