Skip to content

[backport core/1.56] fix: persist Vue boolean widget edits immediately - #21046

Closed
comfy-pr-bot wants to merge 1 commit into
core/1.56from
backport-20539-to-core-1.56
Closed

comfy-pr-bot wants to merge 1 commit into
core/1.56from
backport-20539-to-core-1.56

Conversation

@comfy-pr-bot

Copy link
Copy Markdown
Member

Backport of #20539 to core/1.56

Automatically created by backport workflow.

## 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.
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Oct 14, 2026
@comfy-pr-bot
comfy-pr-bot requested a review from a team as a code owner October 14, 2026 23:48
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Oct 14, 2026
@comfy-pr-bot
comfy-pr-bot enabled auto-merge (squash) October 14, 2026 23:48
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/14/2026, 11:50:36 PM UTC

Links

🌾 Fallow: ✅ Passed

Fallow 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
  • chromium: View Report (✅ 2186 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

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

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 14, 2026
@github-actions
github-actions Bot requested a review from thedatalife October 14, 2026 23:49
@jaeone94

Copy link
Copy Markdown
Collaborator

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.

@jaeone94 jaeone94 closed this Oct 14, 2026
auto-merge was automatically disabled October 14, 2026 23:54

Pull request was closed

@jaeone94
jaeone94 deleted the backport-20539-to-core-1.56 branch October 14, 2026 23:54
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

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              
Flag Coverage Δ
unit 82.93% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...vueNodes/widgets/components/WidgetToggleSwitch.vue 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was previously deployed

1 inactive deployment
website-approval — e2ed9c11 Deployed Oct 14, 2026 by comfy-pr-bot via fast-lane #3405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants