Skip to content

test: match getSlot widget rows by data-widget-name - #23426

Closed
DrJKL wants to merge 1 commit into
mainfrom
fix/vue-node-slot-exact-match
Closed

DrJKL wants to merge 1 commit into
mainfrom
fix/vue-node-slot-exact-match

Conversation

@DrJKL

@DrJKL DrJKL commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #23425. VueNodeFixture.getSlot(name) now matches a row when any descendant's full text equals the name, and a widget row's text includes the widget's current value. A widget whose value is exactly a slot name therefore still selects its own row next to the real slot, the gap raised in #23425 (comment).

 getSlot(name)
-  widget rows and slots with a descendant whose text is exactly name
+  widget rows whose data-widget-name is name
+  slots whose label is exactly name
   slots whose aria-label is exactly name

Decisions worth a veto:

  • Widget rows match on the widget name, not its label. Every current caller passes the name. A caller that wants a relabelled widget by its label would have to pass a locator.
  • Some callers append .first() to work around the old substring match. They still pass and are left as they are.

No new test. The failing case needs a widget value set to a slot name, which no current spec does.

Verification

  • A scratch spec (not committed) set Load Image's image widget to MASK. With main's fixture, getSlot('MASK') resolves to 2 elements; with this change it resolves to 1, and getSlot('image') still resolves to 1.
  • Every spec that calls getSlot was run with the change: 100 of 102 pass. linkInteraction.spec.ts:299 is a local screenshot diff that fails identically on main. nodeSelection.spec.ts:19 timed out in beforeEach behind an error toast, does not call getSlot, and passed 3 of 3 on rerun.
  • oxlint, oxfmt and pnpm typecheck:browser pass.

Merge Danger

Door: two-way. Test fixture only.

Blast Radius: E2E. A spec that selected a widget row by its label instead of its name would stop finding its slot; none of the current callers do.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

getSlot now matches string queries to exact widget names, visible slot text, or accessible labels. Locator queries continue to filter widgets and slots by the supplied locator.

Changes: Slot matching

Layer / File(s) Summary
Update getSlot matching
browser_tests/fixtures/utils/vueNodeFixtures.ts
Widget string queries match exact data-widget-name values. Slot string queries match exact visible text or accessible labels. Locator queries continue to filter widgets and slots.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: anupreet-comfy

Merge Risk: Minimal · up to 73a3e

This only changes how a browser-test helper finds node slots, so it does not affect production behavior. It should remove a flaky test failure and has no known merge-blocking risk.

Pre-merge checks: Passed 6

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "test: match getSlot widget rows by data-widget-name" names the main change: getSlot now matches widget rows by their data-widget-name attribute. The raw summary confirms that widgets must h…
Description check Passed The description follows the repository template. It has a Summary that explains the problem and the fix, with a diff of the new getSlot matching rules. It notes design decisions (widget rows match on …
End-To-End Test Suggestion For User-Facing Changes Passed The check passes because the change is limited to test code. Condition 1 is not met. The review context lists one changed file, browser_tests/fixtures/utils/vueNodeFixtures.ts (+13/-11). It changes …
Adr Compliance For Entity/Litegraph Changes Passed Summary: The check passes. None of the four ADR-LAYOUT or ADR-ECS patterns appears in the PR's changes. Applicability: The only changed file in the review context is `browser_tests/fixtures/ut…
Full details: Title check

Explanation

The title "test: match getSlot widget rows by data-widget-name" names the main change: getSlot now matches widget rows by their data-widget-name attribute. The raw summary confirms that widgets must have an exact data-widget-name match, and the objectives describe the same change to the VueNodeFixture helper. The title is specific and conveys the primary change.

Full details: Description check

Explanation

The description follows the repository template. It has a Summary that explains the problem and the fix, with a diff of the new getSlot matching rules. It notes design decisions (widget rows match on name, not label; callers using .first() are left as is). The Verification section gives scratch-spec results, a run of all getSlot specs (100 of 102 pass, with the two failures explained as pre-existing or unrelated), and lint/typecheck results. It also includes a Merge Danger block. The template's optional 'Fixes #ISSUE_NUMBER' line is absent, but the description points to the related PR #23425. The After release section is not included, which is acceptable because the template says to include only what applies.

Full details: End-To-End Test Suggestion For User-Facing Changes

Explanation

The check passes because the change is limited to test code. Condition 1 is not met. The review context lists one changed file, browser_tests/fixtures/utils/vueNodeFixtures.ts (+13/-11). It changes the VueNodeFixture.getSlot helper so widget rows match on data-widget-name and slots match on exact label or aria-label. No file under src/ or packages/ is changed. The PR title says test:, and the description calls the change a "Test fixture only" change with E2E blast radius. The check passes when the change is exclusively in tests, so no end-to-end test suggestion is needed. I did not use shell commands, as the check requires. The changed-file list came from the review summary, which I treated as the complete list.

Full details: Adr Compliance For Entity/Litegraph Changes

Explanation

Summary: The check passes. None of the four ADR-LAYOUT or ADR-ECS patterns appears in the PR's changes. Applicability: The only changed file in the review context is browser_tests/fixtures/utils/vueNodeFixtures.ts (+13/-11). It is a Playwright test fixture. It is not under src/lib/litegraph/ or src/ecs/. It is arguably "related to" widgets and slots because VueNodeFixture.getSlot selects widget and slot rows. The check therefore may or may not apply. The result is the same either way, as shown below. Pattern review, using the PR description and the raw summary: 1. Command pattern (ADR-LAYOUT): The change does not mutate node.pos, node.size, or group.pos. It changes only how a test helper matches DOM rows (data-widget-name for widgets, label or aria-label for slots). No mutation API is added. 2. God-object growth (ADR-ECS): No methods or properties are added to LGraphNode, LGraphCanvas, LGraph, or Subgraph. 3. ECS data/behavior separation (ADR-ECS): No component-like data structures are added or changed. 4. Extension ecosystem (ADR-ECS): No extension callbacks (onConnectionsChange, onRemoved, onAdded, onConfigure, onConnectInput/Output, onWidgetChanged), node.widgets access, node.serialize overrides, or graph._version++ changes appear. Limits: This verdict relies on the provided changed-file list, PR description, and summary. The shell tools were not used, per the check instructions. The raw summary is AI-generated, not the literal diff. No ADR warning is needed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2198963 and 73a3ead.

Files selected for processing: 1

  • browser_tests/fixtures/utils/vueNodeFixtures.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle: 12.4 MB gzip 🟢 -5 B

Details

Summary

  • Raw size: 55.5 MB baseline 55.5 MB — ⚪ 0 B
  • Gzip: 12.4 MB baseline 12.4 MB — 🟢 -5 B
  • Brotli: 9.71 MB baseline 9.71 MB — 🔴 +113 B
  • Bundles: 1044 current • 1044 baseline • 7 added / 7 removed

Category Glance
Other ⚪ 0 B (36.6 MB) · Vendor & Third-Party ⚪ 0 B (9.7 MB) · Graph Workspace ⚪ 0 B (3.69 MB) · Data & Services ⚪ 0 B (2.03 MB) · Utilities & Hooks ⚪ 0 B (1.43 MB) · Panels & Settings ⚪ 0 B (899 kB) · + 5 more

App Entry Points — 7.05 kB (baseline 7.05 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CQrgjVNS.js (new) — 7.05 kB 🔴 +7.05 kB 🔴 +3.58 kB 🔴 +2.97 kB
assets/index-DF0hEIXB.js (removed) 7.05 kB — 🟢 -7.05 kB 🟢 -3.58 kB 🟢 -2.98 kB

Status: 1 added / 1 removed

Graph Workspace — 3.69 MB (baseline 3.69 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-CdeZwza2.js (removed) 2.71 MB — 🟢 -2.71 MB 🟢 -598 kB 🟢 -434 kB
assets/GraphView-CVCB9WoU.js (new) — 2.71 MB 🔴 +2.71 MB 🔴 +598 kB 🔴 +434 kB

Status: 1 added / 1 removed / 4 unchanged

Views & Navigation — 152 kB (baseline 152 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

Status: 18 unchanged

Panels & Settings — 899 kB (baseline 899 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CrdtDevPanel-BdJ1MJVm.js (new) — 85.4 kB 🔴 +85.4 kB 🔴 +24.6 kB 🔴 +21.2 kB
assets/CrdtDevPanel-CZS0_oUQ.js (removed) 85.4 kB — 🟢 -85.4 kB 🟢 -24.6 kB 🟢 -21.2 kB
assets/DockedAgentPanel-8ZHJ6yrs.js (new) — 13.7 kB 🔴 +13.7 kB 🔴 +5.99 kB 🔴 +5.02 kB
assets/DockedAgentPanel-DFTWk6EK.js (removed) 13.7 kB — 🟢 -13.7 kB 🟢 -5.99 kB 🟢 -5.03 kB

Status: 2 added / 2 removed / 33 unchanged

User & Accounts — 108 kB (baseline 108 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

Status: 18 unchanged

Editors & Dialogs — 502 kB (baseline 502 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

Status: 19 unchanged

UI Components — 369 kB (baseline 369 kB) • ⚪ 0 B

Reusable component library chunks

Status: 34 unchanged

Data & Services — 2.03 MB (baseline 2.03 MB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/agentRunModeStore-CgUki332.js (new) — 34.3 kB 🔴 +34.3 kB 🔴 +11.9 kB 🔴 +10.3 kB
assets/agentRunModeStore-CUCXdjIT.js (removed) 34.3 kB — 🟢 -34.3 kB 🟢 -11.9 kB 🟢 -10.3 kB

Status: 1 added / 1 removed / 45 unchanged

Utilities & Hooks — 1.43 MB (baseline 1.43 MB) • ⚪ 0 B

Helpers, composables, and utility bundles

Status: 86 unchanged

Vendor & Third-Party — 9.7 MB (baseline 9.7 MB) • ⚪ 0 B

External libraries and shared vendor chunks

Status: 16 unchanged

Other — 36.6 MB (baseline 36.6 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AgentPanelRoot-CK65uxmr.js (new) — 781 kB 🔴 +781 kB 🔴 +190 kB 🔴 +151 kB
assets/AgentPanelRoot-rL8RzQZE.js (removed) 781 kB — 🟢 -781 kB 🟢 -190 kB 🟢 -151 kB
assets/main-DP--u_yB.js (new) — 87.1 kB 🔴 +87.1 kB 🔴 +26.4 kB 🔴 +22.1 kB
assets/main-Dy8t3yqF.js (removed) 87.1 kB — 🟢 -87.1 kB 🟢 -26.4 kB 🟢 -22.1 kB

Status: 2 added / 2 removed / 764 unchanged

⚡ Performance: ⏳ Performance tests in progress…

🎭 Playwright: ✅ 3297 passed, 0 failed · 4 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2388 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • chromium-2x: View Report (✅ 3 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • cloud: View Report (✅ 864 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • desktop: View Report (✅ 17 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-safari: View Report (✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

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.

The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped.

Full docs: scripts/registry-census/README.md

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

🌾 Fallow: ✅ Passed

Findings and check details

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.

Full docs: ADR-DEVEX-LINT-0015

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 4e44947c7c1e4e1bfd7206b01775af8c23fc967b

🏛️ Architecture: ✅ Passed

Findings and check details

Warnings (518)

  • billing path matches no source files: src/platform/billing/composables/activateBillingScope.testUtils.ts. Remove or update it in docs/architecture/domains/records/billing.domain.json.
  • error-handling path matches no source files: src/utils/errorUtil.ts. Remove or update it in docs/architecture/domains/records/error-handling.domain.json.
  • graph-model path matches no source files: src/types/linkTopology.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • graph-model path matches no source files: src/types/nodeState.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • job-queue path matches no source files: src/platform/remote/comfyui/jobs/**. Remove or update it in docs/architecture/domains/records/job-queue.domain.json.
  • linear-mode path matches no source files: src/utils/appMode.ts. Remove or update it in docs/architecture/domains/records/linear-mode.domain.json.
  • link-connection path matches no source files: src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts. Remove or update it in docs/architecture/domains/records/link-connection.domain.json.
  • node-widgets path matches no source files: src/types/widgetState.ts. Remove or update it in docs/architecture/domains/records/node-widgets.domain.json.
  • subgraphs path matches no source files: src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts. Remove or update it in docs/architecture/domains/records/subgraphs.domain.json.
  • vue-node-widgets path matches no source files: src/types/positionConfig.ts. Remove or update it in docs/architecture/domains/records/vue-node-widgets.domain.json.
  • workspace path matches no source files: src/platform/workspace/fixtures/**. Remove or update it in docs/architecture/domains/records/workspace.domain.json.
  • packages/api-client/src/abortSignal.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/abortSignal.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchRouteTemplate.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/types.gen.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/geometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/loadExternalScript.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/networkUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/tailwind-utils/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/TopbarActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipStrip.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipTile.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPlaybackBar.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/__fixtures__/clipTiles.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 468 more

Full docs: Frontend domain catalog

Reproduce locally
pnpm architecture:check

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Nov 15, 2026
@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #23426      +/-   ##
==========================================
- Coverage   88.02%   87.93%   -0.10%     
==========================================
  Files        3172     3056     -116     
  Lines      169900   166150    -3750     
  Branches    45855    44554    -1301     
==========================================
- Hits       149557   146106    -3451     
+ Misses      19371    19241     -130     
+ Partials      972      803     -169     
Flag Coverage Δ
billing-web-unit ?
unit 87.46% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 117 files 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.

getSlot matched widget rows and slots on any descendant whose full text
equalled the name. A widget row's text includes the widget's current
value, so a widget whose value was exactly a slot name still selected
its own row alongside the real slot.

Widget rows now match on data-widget-name and slots on their exact label,
so a widget's value can no longer select its row.

Amp-Thread-ID: https://ampcode.com/threads/T-e7cc9737-d4ac-4ccc-96ac-bfcd856c7a48
@DrJKL
DrJKL marked this pull request as ready for review November 15, 2026 05:18
@DrJKL
DrJKL requested a review from a team November 15, 2026 05:18
@DrJKL
DrJKL force-pushed the fix/vue-node-slot-exact-match branch from 2198963 to 73a3ead Compare November 15, 2026 05:24
@DrJKL DrJKL changed the title test: match node slots by exact name in VueNodeFixture.getSlot test: match getSlot widget rows by data-widget-name Nov 15, 2026
@DrJKL DrJKL closed this Nov 15, 2026
@DrJKL
DrJKL deleted the fix/vue-node-slot-exact-match branch November 15, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant