Repository navigation
fix(litegraph): avoid delete on pos/widget in SubgraphNode - #16742
Conversation
Replaces delete input.pos and delete input.widget with = undefined at the two remaining call sites in SubgraphNode.ts (unlink cleanup, failed-registration guard). Both fields are optional on INodeInputSlot (pos?: Point, widget?: IWidgetLocator), so assignment is a semantically equivalent, proxy-safe replacement for delete. Follow-up from #16717 (comment) where DrJKL asked to do all 3 fields (pos, widget, widgetId) at the third call site; #16717 only fixed widgetId. This completes the pattern at both remaining sites, matching the widgetId fix already applied.
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1908 passed, 0 failed · 4 flaky📊 Browser Reports
📦 Bundle: 9.68 MB gzip 🔴 +830 kBDetailsSummary
Category Glance App Entry Points — 3.74 kB (baseline 3.71 kB) • 🔴 +35 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.42 MB (baseline 1.37 MB) • 🔴 +51.2 kBGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • 🟢 -524 BTop-level views, pages, and routed surfaces
Status: 16 added / 16 removed / 1 unchanged Panels & Settings — 621 kB (baseline 565 kB) • 🔴 +56.1 kBConfiguration panels, inspectors, and settings screens
Status: 27 added / 26 removed User & Accounts — 27.8 kB (baseline 27.7 kB) • 🔴 +52 BAuthentication, profile, and account management bundles
Status: 8 added / 8 removed / 3 unchanged Editors & Dialogs — 126 kB (baseline 125 kB) • 🔴 +241 BModals, dialogs, drawers, and in-app editors
Status: 8 added / 8 removed UI Components — 117 kB (baseline 67.1 kB) • 🔴 +50 kBReusable component library chunks
Status: 15 added / 14 removed Data & Services — 3.59 MB (baseline 3.52 MB) • 🔴 +73.4 kBStores, services, APIs, and repositories
Status: 16 added / 17 removed Utilities & Hooks — 560 kB (baseline 550 kB) • 🔴 +10.2 kBHelpers, composables, and utility bundles
Status: 30 added / 32 removed / 6 unchanged Vendor & Third-Party — 18.1 MB (baseline 16.8 MB) • 🔴 +1.26 MBExternal libraries and shared vendor chunks
Status: 12 added / 12 removed / 6 unchanged Other — 16.4 MB (baseline 14.2 MB) • 🔴 +2.2 MBBundles that do not match a named category
Status: 157 added / 147 removed / 139 unchanged ⚡ Performance
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesWidget cleanup
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to Widget cleanup now clears optional position and widget references with undefined assignments in both affected paths. The scoped change is ready to merge with no identified production risk. Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: Description checkExplanation The description explains the change, rationale, affected fields, issue context, and validation results. It does not use every template heading, but it contains the required core information and is mostly complete. Full details: End-To-End Regression Coverage For FixesExplanation The available review context does not include the PR title or commit subjects. The check requires those metadata fields to identify bug-fix language. The changed file is under Resolution Provide the PR title and commit subjects, then reassess whether bug-fix language is present. The description should also include a concrete explanation for why an end-to-end regression test was not added, or the PR should add or update a Playwright regression test under Full details: Adr Compliance For Entity/Litegraph ChangesExplanation PASS. The PR changes only ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #16742 +/- ##
==========================================
+ Coverage 81.00% 82.56% +1.55%
==========================================
Files 2451 2033 -418
Lines 125611 118132 -7479
Branches 31614 29787 -1827
==========================================
- Hits 101750 97534 -4216
+ Misses 23349 20421 -2928
+ Partials 512 177 -335
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 430 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
|
|
|
|
@christian-byrne Successfully backported to #16760 |
|
@christian-byrne Successfully backported to #16761 |
|
|
Summary
Replaces
delete input.posanddelete input.widgetwithinput.pos = undefined/input.widget = undefinedat the two remaining call sites inSubgraphNode.ts(unlink cleanup, failed-registration guard).Why
Follow-up from a review thread on #16717:
#16717 replaced
delete input.widgetIdwithinput.widgetId = undefinedat three call sites, sincedeletehas been a source of issues with the compatibility proxies. DrJKL's comment, on the third call site (which also deletesposandwidgetright next towidgetId), asked to apply the same treatment to all 3 fields, not justwidgetId. This PR completes that at both remaining sites that still haddelete input.pos/delete input.widget.Both fields are optional on
INodeInputSlot(pos?: Point,widget?: IWidgetLocator,src/lib/litegraph/src/interfaces.ts), so assignment is a semantically equivalent, proxy-safe replacement fordelete.Evidence
NODE_OPTIONS="--no-experimental-webstorage" npx vitest run src/lib/litegraph/src/subgraph/: 18 files, 323/323 passed.npx vue-tsc --noEmit(full project): clean.npx eslint src/lib/litegraph/src/subgraph/SubgraphNode.ts: 0 errors, 2 pre-existing unrelated warnings (restricted-path imports, present before this change).