Repository navigation
[backport core/1.56] fix: persist Vue boolean widget edits immediately - #21046
comfy-pr-bot wants to merge 1 commit into
Conversation
## 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.
🎨 Storybook: ✅ Built — View Storybook🌾 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. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 90ae1dc249edbe4531274492a4ea8453cef357d4
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2208 passed, 0 failed📊 Browser Reports
🧩 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 |
|
Closing: core is moving from 1.55 straight to 1.57, and the LoRA stack nodes are unregistered in core until then (Comfy-Org/ComfyUI#17050), so this core/1.56 backport isn't needed. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.56 #21046 +/- ##
=============================================
- Coverage 85.95% 85.95% -0.01%
=============================================
Files 2481 2481
Lines 141680 141682 +2
Branches 38577 36601 -1976
=============================================
+ Hits 121777 121778 +1
- Misses 19519 19520 +1
Partials 384 384
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Backport of #20539 to
core/1.56Automatically created by backport workflow.