Skip to content

Conversation

@DrJKL
Copy link
Contributor

@DrJKL DrJKL commented Dec 31, 2025

Summary

Remove 178 @ts-expect-error suppressions (935 → 757, 19% reduction) by fixing underlying type issues instead of suppressing errors.

Changes

  • What: Type safety improvements across src/lib/litegraph/ and related test files
    • Prefix unused callback parameters with _ instead of suppressing
    • Use type intersections for mock methods on real objects
    • Use Partial<T> for incomplete test objects instead of as unknown
    • Add non-null assertions after .toBeDefined() checks in tests
    • Let TypeScript infer vitest fixture parameter types
  • Breaking: None

Review Focus

  • LGraphCanvas.ts has the largest changes (232 lines) — all mechanical unused parameter fixes
  • Test files use type intersection pattern for mocks: node as LGraphNode & { mockFn: ... }
  • Removed dead code: src/platform/cloud/onboarding/auth.ts (47 lines, unused)

Key Files

File Change
LGraphCanvas.ts 57 suppressions removed (unused params)
subgraph/__fixtures__/* Fixture type improvements
*.test.ts files Mock typing with intersections

┆Issue is synchronized with this Notion page by Unito

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

Refactors typings, parameter naming, and small APIs across litegraph and core extensions: widens GroupNodeConfig.nodeDef, replaces an unused group output flag, removes unused renderer/getControls fields, requires text for LGraphButton, standardizes underscore-prefixed unused params, strengthens test typings/helpers, and deletes an unused onboarding helper.

Changes

Cohort / File(s) Summary
GroupNode Configuration
src/extensions/core/groupNode.ts
Widened nodeDef type to `(ComfyNodeDef & { [GROUP]: GroupNodeConfig })
3D Manager Cleanups
src/extensions/core/load3d/CameraManager.ts, src/extensions/core/load3d/SceneManager.ts, src/extensions/core/load3d/ViewHelperManager.ts
Removed unused private fields (renderer, getControls) and assignments; constructor params renamed to underscore-prefixed variants (_renderer, _getControls).
LGraphButton & Title Buttons
src/lib/litegraph/src/LGraphButton.test.ts, src/lib/litegraph/src/LGraphNode.titleButtons.test.ts, src/lib/litegraph/src/LGraphNode.test.ts, src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
LGraphButton options now require text: string; color props renamed colorfgColor, backgroundColorbgColor; tests updated to supply text and new names.
LGraphCanvas Parameter & API Refactor
src/lib/litegraph/src/LGraphCanvas.ts, src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
Marked many unused params with leading _; removed extra ref_window arg from ContextMenu constructors; updated timer typings to ReturnType<typeof setTimeout>; convertOffsetToCanvas and drawGroups signatures updated; tests instantiate LGraphCanvas with a real LGraph.
LGraphNode Runtime Signatures
src/lib/litegraph/src/LGraphNode.ts
onMouseDown and onMouseUp callbacks extended to include canvas param; onMouseDown now returns boolean; simplified disconnectOutput call in connect logic.
Event Capture & Subgraph Fixtures
src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts, src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
Added generic EventCapture<TEventMap> interface; createEventCapture now typed as createEventCapture<TEventMap>(...) : EventCapture<TEventMap>; fixture capture and event lists updated; subgraph helpers add order and stronger typed initial state.
Test Type Tightening & Cleanup
src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts, src/lib/litegraph/src/node/NodeSlot.test.ts, src/lib/litegraph/src/subgraph/*.test.ts, src/lib/litegraph/src/subgraph/__fixtures__/*, src/lib/litegraph/src/widgets/ComboWidget.test.ts
Replaced @ts-expect-error suppressions with explicit casts/non-null assertions; added/adjusted imports and mocks (e.g., ISerialisedNode, IWidget, boundingRect); updated fixtures and tests for stricter typings.
Serialisation & Interfaces
src/lib/litegraph/src/types/serialisation.ts, src/lib/litegraph/src/interfaces.ts
Added `properties?: Dictionary<NodeProperty
Cloud Onboarding
src/platform/cloud/onboarding/auth.ts
Removed private helper postSurveyStatus and its internal POST/error branches.

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 31, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/06/2026, 09:31:20 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 31, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 01/06/2026, 09:36:36 PM UTC

📈 Summary

  • Total Tests: 512
  • Passed: 502 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 492 / ❌ 0 / ⚠️ 1 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@DrJKL DrJKL changed the base branch from main to drjkl/test-migration December 31, 2025 22:45
@github-actions
Copy link

github-actions bot commented Dec 31, 2025

Bundle Size Report

Summary

  • Raw size: 17.5 MB baseline 17.5 MB — 🟢 -755 B
  • Gzip: 3.57 MB baseline 3.57 MB — 🟢 -260 B
  • Brotli: 2.72 MB baseline 2.72 MB — 🔴 +44 B
  • Bundles: 99 current • 99 baseline • 43 added / 43 removed

Category Glance
App Entry Points 🟢 -755 B (3.24 MB) · Vendor & Third-Party ⚪ 0 B (9.19 MB) · Other ⚪ 0 B (3.5 MB) · Graph Workspace ⚪ 0 B (1.01 MB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (196 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.24 MB (baseline 3.24 MB) • 🟢 -755 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-AQXQlDjN.js (removed) 3.04 MB 🟢 -3.04 MB 🟢 -639 kB 🟢 -486 kB
assets/index-OSJBDr3J.js (new) 3.04 MB 🔴 +3.04 MB 🔴 +639 kB 🔴 +485 kB
assets/index-0jTvpDsf.js (removed) 194 kB 🟢 -194 kB 🟢 -42.3 kB 🟢 -35.1 kB
assets/index-DMopdIv2.js (new) 194 kB 🔴 +194 kB 🔴 +42.3 kB 🔴 +35.1 kB
assets/index-BO2zpdWY.js (new) 345 B 🔴 +345 B 🔴 +244 B 🔴 +237 B
assets/index-CzKM-kL7.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -199 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DEyl6nov.js (new) 1.01 MB 🔴 +1.01 MB 🔴 +196 kB 🔴 +149 kB
assets/GraphView-DjJjBa4s.js (removed) 1.01 MB 🟢 -1.01 MB 🟢 -196 kB 🟢 -149 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-41n8HcEf.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.14 kB 🔴 +1.9 kB
assets/UserSelectView-cd5VA_Cp.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.14 kB 🟢 -1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-D3y-4dJb.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.25 kB 🔴 +4.6 kB
assets/LegacyCreditsPanel-DN1QcOyq.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.25 kB 🟢 -4.61 kB
assets/KeybindingPanel-BdroDhZm.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.12 kB
assets/KeybindingPanel-Dbo11AeK.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.13 kB
assets/ExtensionPanel-CnJV-4UG.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.29 kB
assets/ExtensionPanel-DUvGb_tA.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.29 kB
assets/AboutPanel-C81RqPsw.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-D8oF03bK.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-DQTg0feG.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.8 kB
assets/ServerConfigPanel-DypKhQbf.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.8 kB
assets/UserPanel-BE8QdiHC.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.56 kB
assets/UserPanel-C5UPjseM.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.56 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-MzsBgiwB.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-C_Hf_FFg.js (removed) 62.8 kB 🟢 -62.8 kB 🟢 -12.9 kB 🟢 -11.2 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DKG6qigx.js (new) 62.8 kB 🔴 +62.8 kB 🔴 +12.9 kB 🔴 +11.2 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-BQLV0UuT.js (removed) 54.4 kB 🟢 -54.4 kB 🟢 -8.6 kB 🟢 -7.38 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-C14-3w9N.js (new) 54.4 kB 🔴 +54.4 kB 🔴 +8.6 kB 🔴 +7.38 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BmYYj6y3.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.13 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-xCjHb0wB.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-6jXC-_Hc.js (removed) 10.9 kB 🟢 -10.9 kB 🟢 -2.9 kB 🟢 -2.55 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BunAhKyJ.js (new) 10.9 kB 🔴 +10.9 kB 🔴 +2.89 kB 🔴 +2.56 kB
assets/ComfyQueueButton-CrGwOoWp.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.3 kB
assets/ComfyQueueButton-DKdRWMWC.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.3 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-DhwmyM0N.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.45 kB 🟢 -1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-mFdBAiMY.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.45 kB 🔴 +1.32 kB
assets/WidgetButton-5XsaQ96w.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -996 B 🟢 -895 B
assets/WidgetButton-DnFJO170.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +996 B 🔴 +895 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CVlEu25t.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -891 B 🟢 -770 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-vtf4ydUz.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +891 B 🔴 +770 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BzUEOghQ.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -435 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-C5HMcZfs.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +444 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Btc-ocVv.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-BjcfWFqO.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-Coh2hW7P.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/audioService-DScJ2Wmp.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +961 B 🔴 +825 B
assets/audioService-TpHg8X-w.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -963 B 🟢 -822 B
assets/serverConfigStore-CLS4uKu9.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-CLQ6iA34.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -543 B
assets/audioUtils-Losfqgos.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +649 B 🔴 +540 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-vIZEp4HX.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-fFl5a9Y4.js 3.9 MB 3.9 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-woBPd4cb.js 1.95 MB 1.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-r9r5tF_O.js 2.08 MB 2.08 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-C79JtMXE.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-BXnt3M34.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.5 MB (baseline 3.5 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-Dxv1wawr.js (new) 29 kB 🔴 +29 kB 🔴 +6.42 kB 🔴 +5.59 kB
assets/SubscriptionRequiredDialogContent-OJNhqzua.js (removed) 29 kB 🟢 -29 kB 🟢 -6.42 kB 🟢 -5.58 kB
assets/WidgetRecordAudio-B_65cwm3.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.64 kB
assets/WidgetRecordAudio-CaumzFVD.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/AudioPreviewPlayer-BCi7cJqA.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.34 kB 🔴 +2.99 kB
assets/AudioPreviewPlayer-ClsTbZC5.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.34 kB 🟢 -2.99 kB
assets/ValueControlPopover-BA-ycRWW.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.51 kB
assets/ValueControlPopover-CF7FioHa.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/WidgetGalleria-BYx69vZa.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetGalleria-DV5Rq62_.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetColorPicker-DfTa2vSf.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-Dmjo-TA4.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-CIzFfsfx.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.08 kB
assets/WidgetTextarea-DlBh7ANU.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetMarkdown-DQta_xKa.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-sak_pcth.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetAudioUI-DGc1w5My.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-wzKIOiBR.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetInputText-B_awlujg.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +919 B 🔴 +852 B
assets/WidgetInputText-CglxEeZa.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -920 B 🟢 -851 B
assets/WidgetToggleSwitch-BUjb-vWs.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +835 B 🔴 +734 B
assets/WidgetToggleSwitch-C5xbrMbu.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -835 B 🟢 -733 B
assets/MediaImageBottom-Ch0fgB5d.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -735 B 🟢 -642 B
assets/MediaImageBottom-CzszyPL6.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +732 B 🔴 +644 B
assets/MediaAudioBottom-DxzbFrq9.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +732 B 🔴 +653 B
assets/MediaAudioBottom-p6FhFBs2.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -733 B 🟢 -651 B
assets/Media3DBottom-BuO8whoo.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +646 B
assets/Media3DBottom-CNvmRNWE.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -648 B
assets/MediaVideoBottom-B38d-Bl8.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +654 B
assets/MediaVideoBottom-CunkYjGF.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -647 B
assets/Media3DTop-B_h3RqlG.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +651 B
assets/Media3DTop-iIp2bY0a.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -764 B 🟢 -652 B
assets/WidgetSelect-D9L3L9cV.js (removed) 733 B 🟢 -733 B 🟢 -362 B 🟢 -336 B
assets/WidgetSelect-DJsR8TS3.js (new) 733 B 🔴 +733 B 🔴 +361 B 🔴 +327 B
assets/WidgetInputNumber-CIzROh0J.js (removed) 673 B 🟢 -673 B 🟢 -353 B 🟢 -292 B
assets/WidgetInputNumber-DaEHpW5l.js (new) 673 B 🔴 +673 B 🔴 +347 B 🔴 +292 B
assets/Load3D-CV1LZQt6.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -224 B
assets/Load3D-w3WUhlsa.js (new) 424 B 🔴 +424 B 🔴 +265 B 🔴 +224 B
assets/WidgetLegacy-CQ_GIH4J.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +198 B
assets/WidgetLegacy-Pb3BAbUt.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -196 B
assets/commands-09qoDJrw.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ba_fO77I.js 91.3 kB 91.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DrF_Vdi7.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-DmgiGEEz.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-BXyavTZf.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Zy145v5w.js 279 kB 279 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2Worker-GDlTeC1j.js 4.69 kB 4.69 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-dhwVJAgU.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-C2io158s.js 3.18 kB 3.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 20 added / 20 removed

@github-actions
Copy link

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

@DrJKL DrJKL marked this pull request as ready for review December 31, 2025 23:49
@DrJKL DrJKL requested a review from a team as a code owner December 31, 2025 23:49
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Dec 31, 2025
@DrJKL DrJKL changed the title WIP/Chore: Typescript cleanup Chore: Typescript cleanup (1 / N) Dec 31, 2025
Copy link
Collaborator

@AustinMroz AustinMroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How very unexpected

Base automatically changed from drjkl/test-migration to main January 6, 2026 00:32
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jan 6, 2026
DrJKL and others added 8 commits January 6, 2026 11:52
- Remove unused vendorString variable in flac.ts

- Export postSurveyStatus function in auth.ts (kept for future use)

- Remove unused ref_window variables and ContextMenu 3rd arg in LGraphCanvas.ts

- Remove unused args from disconnectOutput() call in LGraphNode.ts

- Remove unused private fields in load3d managers (CameraManager, SceneManager, ViewHelperManager)

- Remove dead code output_is_hidden property in groupNode.ts

Amp-Thread-ID: https://ampcode.com/threads/T-019b75e3-7af8-71a8-affe-231a258d37dc
Co-authored-by: Amp <amp@ampcode.com>
@DrJKL DrJKL force-pushed the drjkl/the-spanish-inquisition branch from b2d8e4e to a41cbab Compare January 6, 2026 19:53
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 6, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/extensions/core/groupNode.ts (1)

228-245: Address the "lie" comment indicating a type mismatch.

Line 233 sets output_node: false with a comment stating "This is a lie (to satisfy the interface)". This indicates a mismatch between the interface requirements and the actual semantics of group nodes. Such mismatches can lead to bugs when other code relies on this property.

Consider one of the following approaches:

  1. Make output_node optional in the interface if group nodes don't have this concept
  2. Document why group nodes set this to false and ensure consuming code handles this case
  3. Use a more precise type (e.g., discriminated union) to distinguish between regular nodes and group nodes

Based on learnings, type assertions are a last resort and should be avoided in favor of proper types.

src/extensions/core/load3d/ViewHelperManager.ts (1)

18-27: Remove the unused _renderer parameter from the constructor signature.

The _renderer parameter is accepted but never used in the class implementation. This pattern is also present in CameraManager, confirming a consistent pattern across load3d managers. The parameter can be safely removed from the constructor, with a corresponding update to the instantiation in Load3d.ts (line 108).

src/lib/litegraph/src/LGraphCanvas.ts (2)

3540-3547: Fix potential runtime error in processMouseUp when node_over is undefined

The new use of optional chaining:

this.node_over?.onMouseUp?.(e, [
  x - this.node_over.pos[0],
  y - this.node_over.pos[1]
])

still dereferences this.node_over.pos[...] unguarded. If node_over is undefined (for example after hover state is cleared before mouseup), this will throw even though the call is short‑circuited. The same pattern already exists for node_capturing_input.

Recommend capturing the node references into locals and guarding both the dereference and the call:

Proposed fix for safe mouse‑up handling
-        this.node_over?.onMouseUp?.(e, [
-          x - this.node_over.pos[0],
-          y - this.node_over.pos[1]
-        ])
-        this.node_capturing_input?.onMouseUp?.(e, [
-          x - this.node_capturing_input.pos[0],
-          y - this.node_capturing_input.pos[1]
-        ])
+        const nodeOver = this.node_over
+        if (nodeOver?.onMouseUp) {
+          nodeOver.onMouseUp(e, [x - nodeOver.pos[0], y - nodeOver.pos[1]])
+        }
+
+        const capturingNode = this.node_capturing_input
+        if (capturingNode?.onMouseUp) {
+          capturingNode.onMouseUp(e, [
+            x - capturingNode.pos[0],
+            y - capturingNode.pos[1]
+          ])
+        }

This keeps the same semantics while avoiding a potential null/undefined dereference.


4544-4553: Preserve out-parameter semantics in convertOffsetToCanvas wrapper

convertOffsetToCanvas now accepts an unused _out parameter but no longer forwards it:

convertOffsetToCanvas(pos: Point, _out?: Point): Point {
  return this.ds.convertOffsetToCanvas(pos)
}

If any callers relied on the optional out parameter to reuse a buffer and avoid allocations (or to mutate a provided Point), this is now silently ignored. To keep the previous contract and performance characteristics, the wrapper should forward _out:

Proposed fix for `convertOffsetToCanvas`
-  convertOffsetToCanvas(pos: Point, _out?: Point): Point {
-    return this.ds.convertOffsetToCanvas(pos)
-  }
+  convertOffsetToCanvas(pos: Point, _out?: Point): Point {
+    return this.ds.convertOffsetToCanvas(pos, _out)
+  }
🤖 Fix all issues with AI Agents
In @src/extensions/core/load3d/SceneManager.ts:
- Around line 31-41: The constructor for SceneManager currently accepts an
unused parameter _getControls; remove this unused parameter from the
SceneManager constructor signature and from every call site (notably where
Load3d constructs SceneManager) and clean up any related type annotations, or if
you intend to keep it, store it as a private property (e.g., private
getControls: () => OrbitControls) and add a short JSDoc comment on the
constructor explaining its planned purpose so it’s not treated as dead code;
update any interfaces or imports referencing the old signature accordingly (look
for the SceneManager constructor and the Load3d.ts call that passes
_getControls).

In @src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts:
- Around line 70-82: The variable nodeWithMocks is created and assigned mock
implementations for drawTitleBarText, drawToggles, drawNodeShape, drawContent
and isSelectable but then never used, which is confusing; either remove
nodeWithMocks and attach the mocks directly to node (using inline type
assertions where needed) or replace subsequent references to node with
nodeWithMocks throughout the test so the mocks are clearly applied — update
assignments to target node (or consistently use nodeWithMocks) and ensure the
mock methods (drawTitleBarText, drawToggles, drawNodeShape, drawContent,
isSelectable) are the ones exercised by the tests.

In @src/lib/litegraph/src/node/NodeSlot.test.ts:
- Around line 25-26: Clarify that the TypeScript error is intentional by
replacing the vague comment above the call to outputAsSerialisable(slot) with a
descriptive one such as "@ts-expect-error intentional: passing an OutputSlot to
outputAsSerialisable to test its serialization behavior" (or similar), so
reviewers know the type mismatch for variable slot is deliberate and part of the
test; keep the @ts-expect-error directive and ensure it directly mentions
outputAsSerialisable and OutputSlot to make purpose explicit.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14d0ec7 and a41cbab.

📒 Files selected for processing (26)
  • src/extensions/core/groupNode.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEvents.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/platform/cloud/onboarding/auth.ts
💤 Files with no reviewable changes (3)
  • src/lib/litegraph/src/subgraph/SubgraphEvents.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.ts
  • src/platform/cloud/onboarding/auth.ts
🧰 Additional context used
📓 Path-based instructions (12)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace &&= or ||= with = when there is no reason to do so. If you do find a reason to remove either &&= or ||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScript undefined over null

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

When adding features, always write vitest unit tests using cursor rules in @.cursor

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
src/lib/litegraph/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

src/lib/litegraph/**/*.{test,spec}.{ts,tsx}: When writing tests for subgraph-related code, always import from the barrel export at @/lib/litegraph/src/litegraph to avoid circular dependency issues
Use provided test helpers createTestSubgraph and createTestSubgraphNode from ./fixtures/subgraphHelpers for consistent subgraph test setup

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
🧠 Learnings (31)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
📚 Learning: 2025-12-22T21:36:46.909Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:46.909Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/extensions/core/load3d/SceneManager.ts
  • src/lib/litegraph/src/interfaces.ts
  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/extensions/core/load3d/CameraManager.ts
  • src/lib/litegraph/src/types/serialisation.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/extensions/core/load3d/ViewHelperManager.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/extensions/core/groupNode.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • src/lib/litegraph/src/subgraph/ExecutableNodeDTO.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphButton.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate

Applied to files:

  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`

Applied to files:

  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
  • src/lib/litegraph/src/subgraph/Subgraph.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • src/lib/litegraph/src/subgraph/SubgraphIO.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : The `size` and `pos` properties of `Rectangle` share the same array buffer (`subarray`); they may be used to set the rectangle's size and position

Applied to files:

  • src/lib/litegraph/src/node/NodeSlot.test.ts
  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Prefer single line `if` syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement

Applied to files:

  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command

Applied to files:

  • src/lib/litegraph/src/LGraphNode.test.ts
  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.test.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test across multiple viewports

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Aim for behavioral coverage of critical and new features in unit tests

Applied to files:

  • src/lib/litegraph/src/__fixtures__/assets/testGraphs.ts
  • src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests

Applied to files:

  • src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests

Applied to files:

  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts
🧬 Code graph analysis (6)
src/lib/litegraph/src/widgets/ComboWidget.test.ts (1)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
src/lib/litegraph/src/types/serialisation.ts (2)
src/lib/litegraph/src/interfaces.ts (1)
  • Dictionary (14-14)
src/lib/litegraph/src/LGraphNode.ts (1)
  • NodeProperty (96-96)
src/lib/litegraph/src/node/NodeSlot.test.ts (1)
src/lib/litegraph/src/interfaces.ts (3)
  • ReadOnlyRect (240-242)
  • INodeOutputSlot (359-363)
  • INodeInputSlot (344-353)
src/extensions/core/groupNode.ts (2)
src/types/index.ts (1)
  • ComfyNodeDef (30-30)
src/utils/executableGroupNodeDto.ts (1)
  • GROUP (11-11)
src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts (1)
src/lib/litegraph/src/LGraphCanvas.ts (1)
  • canvas (1844-1854)
src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts (2)
src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts (3)
  • EventCapture (59-66)
  • createTestSubgraph (86-172)
  • createEventCapture (397-432)
src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts (1)
  • SubgraphEventMap (8-55)
🪛 Biome (2.1.2)
src/lib/litegraph/src/subgraph/__fixtures__/subgraphFixtures.ts

[error] 64-64: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 75-75: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 86-86: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 104-104: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 115-115: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)


[error] 138-138: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: playwright-tests-chromium-sharded (5, 8)
  • GitHub Check: playwright-tests-chromium-sharded (7, 8)
  • GitHub Check: playwright-tests-chromium-sharded (1, 8)
  • GitHub Check: playwright-tests-chromium-sharded (3, 8)
  • GitHub Check: playwright-tests-chromium-sharded (2, 8)
  • GitHub Check: playwright-tests-chromium-sharded (8, 8)
  • GitHub Check: playwright-tests-chromium-sharded (6, 8)
  • GitHub Check: playwright-tests (chromium-0.5x)
  • GitHub Check: playwright-tests (mobile-chrome)
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect

}
// @ts-expect-error fixme ts strict error
this.#convertedToProcess = null
if (!this.nodeDef) return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Silent failure: early return without notification.

The early return when nodeDef is undefined causes registerType to fail silently. This could make debugging difficult if something goes wrong during node definition construction.

🔎 Consider adding error logging or throwing an error
 if (!this.nodeDef) return
+if (!this.nodeDef) {
+  console.error(`Failed to register group node type: nodeDef is undefined for ${this.name}`)
+  return
+}

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines 31 to 41
constructor(
renderer: THREE.WebGLRenderer,
getActiveCamera: () => THREE.Camera,
getControls: () => OrbitControls,
_getControls: () => OrbitControls,
eventManager: EventManagerInterface
) {
this.renderer = renderer
this.eventManager = eventManager
this.scene = new THREE.Scene()

this.getActiveCamera = getActiveCamera
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

rg -n -C3 'new\s+SceneManager\s*\(' --type=ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 531


🏁 Script executed:

# Get full context of SceneManager constructor call in Load3d.ts
rg -n -A 5 'this.sceneManager = new SceneManager' src/extensions/core/load3d/Load3d.ts

# Check if _getControls is referenced anywhere in SceneManager
rg -n '_getControls\|getControls\|controls' src/extensions/core/load3d/SceneManager.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 254


🏁 Script executed:

# Check entire SceneManager.ts file structure
cat src/extensions/core/load3d/SceneManager.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 13165


Remove the unused _getControls parameter or document its intended use.

The _getControls parameter is passed by the caller (Load3d.ts) but never stored, assigned, or used anywhere in the SceneManager class. Unlike renderer and getActiveCamera which serve active purposes, this parameter adds unnecessary surface area to the module. Either remove it from both the constructor signature and the caller in Load3d.ts, or document why it needs to be accepted if there's a planned use case.

🤖 Prompt for AI Agents
In @src/extensions/core/load3d/SceneManager.ts around lines 31 - 41, The
constructor for SceneManager currently accepts an unused parameter _getControls;
remove this unused parameter from the SceneManager constructor signature and
from every call site (notably where Load3d constructs SceneManager) and clean up
any related type annotations, or if you intend to keep it, store it as a private
property (e.g., private getControls: () => OrbitControls) and add a short JSDoc
comment on the constructor explaining its planned purpose so it’s not treated as
dead code; update any interfaces or imports referencing the old signature
accordingly (look for the SceneManager constructor and the Load3d.ts call that
passes _getControls).

id: 1
}
],
nodes: [{ id: 1 } as Partial<ISerialisedNode> as ISerialisedNode],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Replace double type assertions with properly typed test fixtures.

The double type assertion pattern as Partial<ISerialisedNode> as ISerialisedNode circumvents TypeScript's type safety and is arguably worse than the removed @ts-expect-error suppressions. This approach lies to the type system about incomplete objects being complete.

Consider these alternatives:

  1. Create a test helper function that provides sensible defaults: createTestNode({ id: 1, ...overrides })
  2. Type the fixture as Partial<ISerialisedNode> and update consuming test code to handle partial types
  3. Complete the fixture objects with all required ISerialisedNode properties

Based on learnings, type assertions should be a last resort in litegraph code.

🔎 Example: Test helper approach
+function createMinimalTestNode(overrides: Partial<ISerialisedNode>): ISerialisedNode {
+  return {
+    id: 0,
+    type: 'test',
+    pos: [0, 0],
+    size: [100, 100],
+    flags: {},
+    mode: 0,
+    inputs: [],
+    outputs: [],
+    properties: {},
+    ...overrides
+  }
+}
+
 export const oldSchemaGraph: ISerialisedGraph = {
   // ...
-  nodes: [{ id: 1 } as Partial<ISerialisedNode> as ISerialisedNode],
+  nodes: [createMinimalTestNode({ id: 1 })],

Also applies to: 64-64

Comment on lines +70 to +82

const nodeWithMocks = node as LGraphNode & {
drawTitleBarText: ReturnType<typeof vi.fn>
drawToggles: ReturnType<typeof vi.fn>
drawNodeShape: ReturnType<typeof vi.fn>
drawContent: ReturnType<typeof vi.fn>
isSelectable: ReturnType<typeof vi.fn>
}
nodeWithMocks.drawTitleBarText = vi.fn()
nodeWithMocks.drawToggles = vi.fn()
nodeWithMocks.drawNodeShape = vi.fn()
nodeWithMocks.drawContent = vi.fn()
nodeWithMocks.isSelectable = vi.fn().mockReturnValue(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

nodeWithMocks is unused after assignment.

The nodeWithMocks variable is created and has mock methods assigned to it, but all subsequent test code continues to use the original node variable. Since nodeWithMocks is just a type-cast reference to the same object, the mock assignments do work, but the explicit variable declaration adds confusion without benefit.

Consider simplifying by assigning mocks directly to node with inline type assertions only where needed, or use nodeWithMocks consistently throughout the tests.

🔎 Suggested simplification
-    const nodeWithMocks = node as LGraphNode & {
-      drawTitleBarText: ReturnType<typeof vi.fn>
-      drawToggles: ReturnType<typeof vi.fn>
-      drawNodeShape: ReturnType<typeof vi.fn>
-      drawContent: ReturnType<typeof vi.fn>
-      isSelectable: ReturnType<typeof vi.fn>
-    }
-    nodeWithMocks.drawTitleBarText = vi.fn()
-    nodeWithMocks.drawToggles = vi.fn()
-    nodeWithMocks.drawNodeShape = vi.fn()
-    nodeWithMocks.drawContent = vi.fn()
-    nodeWithMocks.isSelectable = vi.fn().mockReturnValue(true)
+    // Assign additional mocks needed by drawNode
+    ;(node as LGraphNode & { drawTitleBarText: unknown }).drawTitleBarText = vi.fn()
+    ;(node as LGraphNode & { drawToggles: unknown }).drawToggles = vi.fn()
+    ;(node as LGraphNode & { drawNodeShape: unknown }).drawNodeShape = vi.fn()
+    ;(node as LGraphNode & { drawContent: unknown }).drawContent = vi.fn()
+    ;(node as LGraphNode & { isSelectable: unknown }).isSelectable = vi.fn().mockReturnValue(true)

Or alternatively, use nodeWithMocks throughout the test file instead of node.

🤖 Prompt for AI Agents
In @src/lib/litegraph/src/LGraphCanvas.titleButtons.test.ts around lines 70 -
82, The variable nodeWithMocks is created and assigned mock implementations for
drawTitleBarText, drawToggles, drawNodeShape, drawContent and isSelectable but
then never used, which is confusing; either remove nodeWithMocks and attach the
mocks directly to node (using inline type assertions where needed) or replace
subsequent references to node with nodeWithMocks throughout the test so the
mocks are clearly applied — update assignments to target node (or consistently
use nodeWithMocks) and ensure the mock methods (drawTitleBarText, drawToggles,
drawNodeShape, drawContent, isSelectable) are the ones exercised by the tests.

Comment on lines 25 to 26
// @ts-expect-error Argument type mismatch for test
const serialized = outputAsSerialisable(slot)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Clarify the intentional type mismatch in this test.

The @ts-expect-error comment should be more explicit about what is being tested. The current comment "Argument type mismatch for test" doesn't clearly indicate this is intentional testing of the serialization function's behavior with an output slot.

🔎 Suggested improvement
-      // @ts-expect-error Argument type mismatch for test
+      // @ts-expect-error Testing that outputAsSerialisable removes _data property (intentionally passing INodeOutputSlot)
       const serialized = outputAsSerialisable(slot)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// @ts-expect-error Argument type mismatch for test
const serialized = outputAsSerialisable(slot)
// @ts-expect-error Testing that outputAsSerialisable removes _data property (intentionally passing INodeOutputSlot)
const serialized = outputAsSerialisable(slot)
🤖 Prompt for AI Agents
In @src/lib/litegraph/src/node/NodeSlot.test.ts around lines 25 - 26, Clarify
that the TypeScript error is intentional by replacing the vague comment above
the call to outputAsSerialisable(slot) with a descriptive one such as
"@ts-expect-error intentional: passing an OutputSlot to outputAsSerialisable to
test its serialization behavior" (or similar), so reviewers know the type
mismatch for variable slot is deliberate and part of the test; keep the
@ts-expect-error directive and ensure it directly mentions outputAsSerialisable
and OutputSlot to make purpose explicit.

@DrJKL DrJKL requested a review from AustinMroz January 6, 2026 21:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/litegraph/src/LGraphCanvas.ts (1)

1281-1334: Fix this type in inner_clicked callback to match the interface contract

The inner_clicked callback at line 1321 has an incorrect this type annotation. Per IContextMenuValue.callback in interfaces.ts, menu item callbacks receive this: ContextMenuDivElement<TValue>, not ContextMenu<TValue>. At runtime, this is the DOM element, so this.root does not exist and this.root.getBoundingClientRect() will throw an error.

Change line 1321-1322 from:

function inner_clicked(
  this: ContextMenu<string>,
  v?: string | IContextMenuValue<string>
) {

to:

function inner_clicked(
  this: ContextMenuDivElement<string>,
  v?: string | IContextMenuValue<string>
) {

And update line 1327 to call getBoundingClientRect() directly on this instead of this.root:

const rect = this.getBoundingClientRect()

This matches the pattern already used correctly in the onShowMenuNodeSlot callback at line 1237.

🤖 Fix all issues with AI Agents
In @src/lib/litegraph/src/LGraphCanvas.ts:
- Around line 4549-4551: The wrapper method convertOffsetToCanvas currently
ignores the optional _out parameter causing callers that expect the
out-parameter to be written to break; update convertOffsetToCanvas to forward
the _out argument to this.ds.convertOffsetToCanvas so the underlying
implementation can write into the provided out Point (keep the signature
convertOffsetToCanvas(pos: Point, _out?: Point): Point and simply pass _out
through to this.ds.convertOffsetToCanvas).

In @src/lib/litegraph/src/LGraphNode.ts:
- Line 2777: The call that previously passed an object instead of a node to
disconnectOutput must be changed to call this.disconnectOutput(slot) so the
method receives the expected LGraphNode context and disconnects all connections
for that output before creating a new one; locate the code path guarded by
LiteGraph.allow_multi_output_for_events and replace the erroneous argument with
the slot-only call to disconnectOutput, ensuring the method signature for
disconnectOutput(nodeOrSlot) is respected and no suppressed types are
reintroduced.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a41cbab and 34fa21c.

📒 Files selected for processing (2)
  • src/lib/litegraph/src/LGraphCanvas.ts
  • src/lib/litegraph/src/LGraphNode.ts
🧰 Additional context used
📓 Path-based instructions (9)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace &&= or ||= with = when there is no reason to do so. If you do find a reason to remove either &&= or ||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScript undefined over null

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/lib/litegraph/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : The `size` and `pos` properties of `Rectangle` share the same array buffer (`subarray`); they may be used to set the rectangle's size and position

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.ts
🧬 Code graph analysis (2)
src/lib/litegraph/src/LGraphNode.ts (3)
src/lib/litegraph/src/types/events.ts (1)
  • CanvasPointerEvent (45-45)
src/renderer/core/layout/types.ts (1)
  • Point (18-21)
src/renderer/core/canvas/pathRenderer.ts (1)
  • Point (10-13)
src/lib/litegraph/src/LGraphCanvas.ts (2)
src/lib/litegraph/src/interfaces.ts (3)
  • IContextMenuValue (409-430)
  • IContextMenuOptions (384-407)
  • Point (229-229)
src/lib/litegraph/src/ContextMenu.ts (2)
  • ContextMenu (9-13)
  • ContextMenu (19-411)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (6)
src/lib/litegraph/src/LGraphNode.ts (2)

682-687: LGTM: Canvas parameter added to onMouseUp callback

The addition of the canvas parameter properly exposes the canvas context to node-level mouse event handlers, enabling more context-aware event handling. The signature change aligns with the broader API evolution described in the PR objectives.


690-695: LGTM: Canvas parameter and explicit return type improve API clarity

The addition of the canvas parameter and explicit boolean return type makes the contract clearer for implementers. The return type was previously implicit, and making it explicit improves type safety.

src/lib/litegraph/src/LGraphCanvas.ts (4)

971-1192: Static context-menu handlers: TS hygiene changes look correct

The changes here (underscore-prefixed unused params, explicit generics on LiteGraph.ContextMenu callbacks, and simplified constructor calls without extra window args) are consistent with the IContextMenuOptions / IContextMenuValue signatures and the current ContextMenu(values, options) API. I don’t see behavioural changes; they should only reduce TS noise around unused parameters and mismatched callback shapes.

Also applies to: 1343-1370, 1503-1613, 1667-1717, 6184-6215, 8123-8127


1446-1461: Dialog/search/prompt close timers: scoped handles and guard logic look solid

The introduction of scoped dialogCloseTimer / timeout_close / timeout variables, with appropriate null/undefined checks before clearTimeout / clearInterval, keeps the existing close-on-mouse-leave behaviour while avoiding stray timers and TS “timer handle” confusion. No functional issues spotted.

Also applies to: 6707-6722, 6901-6939, 7582-7597


3541-3553: Passing canvas into onMouseUp for node_capturing_input restores callback shape

Extending the onMouseUp invocation to:

this.node_capturing_input?.onMouseUp?.(
  e,
  [
    x - this.node_capturing_input.pos[0],
    y - this.node_capturing_input.pos[1]
  ],
  this
)

matches the (event, localPos, canvas) pattern used elsewhere and restores the canvas parameter for nodes that capture input. Existing callbacks that only expect (event, localPos) remain compatible since JS ignores extra arguments. This should address the earlier concern about the missing canvas parameter without introducing breaking changes.


7255-7294: Search-box and enum widget helpers: type tightening without behavioural change

The added string[] annotations for filtered_extra and the explicit LiteGraph.ContextMenu construction in createPanel.addWidget’s enum/combo widget (with a dark class and arrow callback to keep this bound to the value span) are all consistent with existing behaviour. They just make the intent clearer and typings stricter, without altering runtime behaviour.

Also applies to: 7798-7802

Comment on lines +4549 to 4551
convertOffsetToCanvas(pos: Point, _out?: Point): Point {
return this.ds.convertOffsetToCanvas(pos)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

convertOffsetToCanvas should still honour the optional out-parameter

The wrapper now ignores the _out parameter:

convertOffsetToCanvas(pos: Point, _out?: Point): Point {
  return this.ds.convertOffsetToCanvas(pos)
}

If any callers rely on the “write into out-param and ignore the return value” convention (which is typical for hot-path geometry helpers), this is a silent behavioural break: the passed _out array will no longer be updated.

You can keep the public signature cleanup (making the second arg optional and underscore-prefixed) while preserving behaviour by forwarding _out:

Proposed fix
-  convertOffsetToCanvas(pos: Point, _out?: Point): Point {
-    return this.ds.convertOffsetToCanvas(pos)
-  }
+  convertOffsetToCanvas(pos: Point, _out?: Point): Point {
+    return this.ds.convertOffsetToCanvas(pos, _out)
+  }
🤖 Prompt for AI Agents
In @src/lib/litegraph/src/LGraphCanvas.ts around lines 4549 - 4551, The wrapper
method convertOffsetToCanvas currently ignores the optional _out parameter
causing callers that expect the out-parameter to be written to break; update
convertOffsetToCanvas to forward the _out argument to
this.ds.convertOffsetToCanvas so the underlying implementation can write into
the provided out Point (keep the signature convertOffsetToCanvas(pos: Point,
_out?: Point): Point and simply pass _out through to
this.ds.convertOffsetToCanvas).

graph.beforeChange()
// @ts-expect-error Unused param
this.disconnectOutput(slot, false, { doProcessChange: false })
this.disconnectOutput(slot)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical bug fix: Corrected disconnectOutput call

The old code passed an object { doProcessChange: false } where a LGraphNode was expected (see method signature at line 2996). This was a type mismatch that likely went unnoticed due to suppressed type checking. The corrected call properly disconnects all existing connections on the slot before establishing the new one, which is the intended behavior when !LiteGraph.allow_multi_output_for_events.

This exemplifies the value of this TypeScript cleanup PR—removing suppressions surfaces real bugs.

🤖 Prompt for AI Agents
In @src/lib/litegraph/src/LGraphNode.ts at line 2777, The call that previously
passed an object instead of a node to disconnectOutput must be changed to call
this.disconnectOutput(slot) so the method receives the expected LGraphNode
context and disconnects all connections for that output before creating a new
one; locate the code path guarded by LiteGraph.allow_multi_output_for_events and
replace the erroneous argument with the slot-only call to disconnectOutput,
ensuring the method signature for disconnectOutput(nodeOrSlot) is respected and
no suppressed types are reintroduced.

Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DrJKL DrJKL merged commit 43f0ac2 into main Jan 6, 2026
27 checks passed
@DrJKL DrJKL deleted the drjkl/the-spanish-inquisition branch January 6, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants