Skip to content

Conversation

@luke-mino-altherr
Copy link
Contributor

@luke-mino-altherr luke-mino-altherr commented Dec 8, 2025

Summary

Fixes Vue Nodes 2.0 dropdowns not displaying the selected model when created from the Asset Browser.

Root Cause

Widget values were set AFTER the node was added to the graph, causing Vue's reactivity system to capture stale initial values.

Solution

Set widget value BEFORE adding node to graph in createModelNodeFromAsset.ts.

Changes

  • 1 file changed: createModelNodeFromAsset.ts
  • 4 lines added, 1 removed: Move widget value assignment before graph.add()

This ensures Vue's reactivity system captures the correct initial widget value when the node is created.

@luke-mino-altherr luke-mino-altherr requested a review from a team as a code owner December 8, 2025 23:43
@luke-mino-altherr luke-mino-altherr added verified bug Something isn't working (confirmed by the team) area:nodes area:widgets labels Dec 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

📝 Walkthrough

Walkthrough

Modified execution order in a utility function to set widget.value before adding the node to the graph. Added comments documenting the new ordering sequence. No functional logic changes detected.

Changes

Cohort / File(s) Change Summary
Execution order adjustment
src/platform/assets/utils/createModelNodeFromAsset.ts
Reordered operations to assign widget.value before node addition to graph; added documentation comments explaining the new sequence
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch luke-mino-altherr/fix-model-selector-for-vue-nodes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df65baf and df2de4a.

📒 Files selected for processing (1)
  • src/platform/assets/utils/createModelNodeFromAsset.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
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/platform/assets/utils/createModelNodeFromAsset.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/platform/assets/utils/createModelNodeFromAsset.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/platform/assets/utils/createModelNodeFromAsset.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,vue}: Use camelCase for variable and function names
Indent with 2 spaces (see .prettierrc)
Use single quotes for strings (see .prettierrc)
No trailing semicolons (see .prettierrc)
Maximum line width of 80 characters (see .prettierrc)
Sort and group imports by plugin (run pnpm format before committing)
Never use any type; use proper TypeScript types instead
Never use as any type assertions; fix the underlying type issue instead
Avoid code comments unless absolutely necessary; write expressive, self-documenting code instead
When writing new code, ask if there is a simpler way to introduce the same functionality; if yes, choose the simpler approach
Use refactoring to make complex code simpler
Use es-toolkit for utility functions
Use Vite for fast development and building
Implement proper error handling
Write tests for all changes, especially bug fixes to catch future regressions

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
🧬 Code graph analysis (1)
src/platform/assets/utils/createModelNodeFromAsset.ts (1)
src/lib/litegraph/src/LGraphNode.ts (1)
  • widget (3958-3961)
⏰ 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). (3)
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
🔇 Additional comments (1)
src/platform/assets/utils/createModelNodeFromAsset.ts (1)

202-207: Ordering change for widget initialization before add(node) looks correct

Initializing widget.value with the validated filename before calling targetGraph.add(node) ensures the node enters the graph with the correct initial state, which is important for the Vue/LiteGraph reactivity boundary described in this function. The inline comments are justified here because they document a non‑obvious ordering constraint that future refactors must preserve.


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.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 8, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/09/2025, 12:01:46 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/09/2025, 12:12:08 AM UTC

📈 Summary

  • Total Tests: 487
  • Passed: 465 ✅
  • Failed: 0
  • Flaky: 12 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 456 / ❌ 0 / ⚠️ 12 / ⏭️ 10
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

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

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — ⚪ 0 B
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +51 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🟢 -229 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.81 MB) · App Entry Points ⚪ 0 B (3.21 MB) · Graph Workspace ⚪ 0 B (978 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (177 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.21 MB (baseline 3.21 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-C72CAjmz.js (new) 2.98 MB 🔴 +2.98 MB 🔴 +620 kB 🔴 +471 kB
assets/index-CwcJH3ib.js (removed) 2.98 MB 🟢 -2.98 MB 🟢 -620 kB 🟢 -472 kB
assets/index-12x7hJQD.js (new) 223 kB 🔴 +223 kB 🔴 +47.6 kB 🔴 +39.2 kB
assets/index-Qydn4Cez.js (removed) 223 kB 🟢 -223 kB 🟢 -47.6 kB 🟢 -39.3 kB
assets/index-BqoM7Nox.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -236 B
assets/index-XIo7IJaz.js (new) 345 B 🔴 +345 B 🔴 +244 B 🔴 +228 B

Status: 3 added / 3 removed

Graph Workspace — 978 kB (baseline 978 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DiuxJXIJ.js (new) 978 kB 🔴 +978 kB 🔴 +189 kB 🔴 +144 kB
assets/GraphView-xu5kzRfz.js (removed) 978 kB 🟢 -978 kB 🟢 -189 kB 🟢 -144 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-Bvj1-sUW.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-DPmyMQYH.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-DX39ke6s.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/CreditsPanel-pMwBKI8B.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/KeybindingPanel-B0fVlSBR.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3 kB
assets/KeybindingPanel-CAqseqay.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-Bh-hhGpj.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/ExtensionPanel-C62ksN6t.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.58 kB 🔴 +2.26 kB
assets/AboutPanel-BXhNvfhd.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-CrY4Dxzt.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-BPvX2oY9.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/ServerConfigPanel-D-A-jiVf.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/UserPanel-CoE8Hrzu.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-D_IECCpE.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-CG-ThCy0.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-XzAdQMy4.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.32 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DLKS6cXQ.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.98 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-Lod_YbH-.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CbkyWoRv.js (removed) 47.3 kB 🟢 -47.3 kB 🟢 -10.6 kB 🟢 -9.29 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-fdO21-u8.js (new) 47.3 kB 🔴 +47.3 kB 🔴 +10.6 kB 🔴 +9.29 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Cj8nUuGL.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.97 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DzAhGGDR.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.97 kB
assets/ComfyQueueButton-Ccpw67tX.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/ComfyQueueButton-Dxr8vxoS.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BmWm9LMO.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +436 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CsYVMdVv.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -436 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-BPGmgVoN.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-CFWrwaAG.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-6ZIklFyS.js 2.26 kB 2.26 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 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-2LsDNdsL.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-CLA9hGI0.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/audioService-DtnQr58A.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +962 B 🔴 +822 B
assets/audioService-Qwzy9iNY.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -964 B 🟢 -827 B
assets/serverConfigStore-L3qzi_1Z.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-CVwH82Zq.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +653 B 🔴 +549 B
assets/audioUtils-nKrIF-Ky.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -548 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-DJFoH6N_.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BZV8aGUB.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-DUTcKlCc.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-Cmu0_BY4.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-Bz22sFex.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-D7vSTYmV.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/WidgetRecordAudio-DNkMSesM.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-DlB3EUKi.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/AudioPreviewPlayer-DVX1kWYt.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.04 kB
assets/WidgetGalleria-CS5X7S6E.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetGalleria-D2dWASVq.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetColorPicker-BlkVTMqm.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-BoExI8cW.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-CHwjM1rg.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-nNrOYXW6.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetTextarea-Db76GQJF.js (new) 2.93 kB 🔴 +2.93 kB 🔴 +1.17 kB 🔴 +1.03 kB
assets/WidgetTextarea-DG6Wn-g7.js (removed) 2.93 kB 🟢 -2.93 kB 🟢 -1.17 kB 🟢 -1.03 kB
assets/WidgetAudioUI-D-JG_6Fd.js (new) 2.85 kB 🔴 +2.85 kB 🔴 +1.17 kB 🔴 +1.05 kB
assets/WidgetAudioUI-iuvecO9S.js (removed) 2.85 kB 🟢 -2.85 kB 🟢 -1.16 kB 🟢 -1.05 kB
assets/WidgetInputText-BJErep0a.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +916 B 🔴 +848 B
assets/WidgetInputText-TPp8IuW0.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -918 B 🟢 -852 B
assets/MediaImageBottom-C3qIf9RW.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +745 B 🔴 +649 B
assets/MediaImageBottom-DbzodXbl.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -742 B 🟢 -647 B
assets/MediaAudioBottom-CRYyZvT4.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -740 B 🟢 -656 B
assets/MediaAudioBottom-EbQ6xYkF.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +746 B 🔴 +657 B
assets/MediaVideoBottom-CyJcif-h.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -739 B 🟢 -654 B
assets/MediaVideoBottom-tCXcMkcv.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +742 B 🔴 +657 B
assets/Media3DBottom-BWGoGSpo.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +653 B
assets/Media3DBottom-CjKr0tWq.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -652 B
assets/Media3DTop-D38SIVlg.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -766 B 🟢 -652 B
assets/Media3DTop-EWE_9h7d.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +766 B 🔴 +653 B
assets/WidgetSelect-BQqOlOwc.js (new) 655 B 🔴 +655 B 🔴 +344 B 🔴 +290 B
assets/WidgetSelect-DdS-fpMR.js (removed) 655 B 🟢 -655 B 🟢 -344 B 🟢 -289 B
assets/WidgetInputNumber-Bg2OIRgV.js (removed) 595 B 🟢 -595 B 🟢 -330 B 🟢 -274 B
assets/WidgetInputNumber-CtOhXQ8v.js (new) 595 B 🔴 +595 B 🔴 +329 B 🔴 +278 B
assets/Load3D-Bvwno7ea.js (removed) 424 B 🟢 -424 B 🟢 -266 B 🟢 -233 B
assets/Load3D-hF_JHJQI.js (new) 424 B 🔴 +424 B 🔴 +268 B 🔴 +225 B
assets/WidgetLegacy-CkClDdVw.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +202 B
assets/WidgetLegacy-CVn3pa6I.js (removed) 364 B 🟢 -364 B 🟢 -236 B 🟢 -200 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B1JflQcI.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B2lyXe48.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B9XEQ-pc.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BErKFzc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bf7Tze-u.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BhGMcO4Q.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CPZUloNQ.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dva0z-T2.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-un0K9wDS.js 81.8 kB 81.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-BPDWO8-i.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BtY1hGDO.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-ehTZdDBw.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BC3OlaIn.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BsqN8-W1.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CK2saYDx.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cm5kR4Hi.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CMrh-uxB.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DlUIOit1.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DNu_xoP2.js 282 kB 282 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DpcvlpZe.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-IyjOYIl-.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-j6EYUdOM.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-D5bj5c8l.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-DPJMnc2A.js 1.58 kB 1.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 17 added / 17 removed

@luke-mino-altherr luke-mino-altherr marked this pull request as draft December 8, 2025 23:46
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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 973d767 and 665247a.

📒 Files selected for processing (4)
  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts (1 hunks)
  • src/platform/assets/utils/createModelNodeFromAsset.ts (1 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue (1 hunks)
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (15)
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/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.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/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.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/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,vue}: Use camelCase for variable and function names
Indent with 2 spaces (see .prettierrc)
Use single quotes for strings (see .prettierrc)
No trailing semicolons (see .prettierrc)
Maximum line width of 80 characters (see .prettierrc)
Sort and group imports by plugin (run pnpm format before committing)
Never use any type; use proper TypeScript types instead
Never use as any type assertions; fix the underlying type issue instead
Avoid code comments unless absolutely necessary; write expressive, self-documenting code instead
When writing new code, ask if there is a simpler way to introduce the same functionality; if yes, choose the simpler approach
Use refactoring to make complex code simpler
Use es-toolkit for utility functions
Use Vite for fast development and building
Implement proper error handling
Write tests for all changes, especially bug fixes to catch future regressions

Files:

  • src/platform/assets/utils/createModelNodeFromAsset.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
src/**/*.vue

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

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3 SFCs with Composition API only (use <script setup lang="ts">, not Options API)
Avoid using <style> blocks; use Tailwind 4 for all styling
Use defineProps with TypeScript style default declaration; do not use withDefaults or runtime props declaration
Prefer useModel over separately defining a prop and emit
Use computed instead of a ref and watch if possible
Avoid using ref if a prop would accomplish the design goals; avoid using computed if a ref or prop directly would work
Do not import Vue macros unnecessarily
Never use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Never use :class="[]" to merge class names; always use cn() from @/utils/tailwindUtil (e.g., <div :class="cn('text-node-component-header-icon', hasError && 'text-danger')" />)
Leverage VueUse functions for performance-enhancing styles
Avoid new usage of PrimeVue components
Use Vue 3 Teleport component when needed
Use Vue 3 Suspense for async components

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
**/components/**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (browser_tests/CLAUDE.md)

browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx}: Test user workflows in browser tests
Use Playwright fixtures for browser tests
Follow naming conventions for browser tests
Check assets/ directory for test data when writing tests
Prefer specific selectors in browser tests
Test across multiple viewports

Files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
browser_tests/**/*.spec.ts

📄 CodeRabbit inference engine (AGENTS.md)

Write E2E tests with Playwright; optional tags like @mobile and @2x are respected by config

Files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
🧠 Learnings (12)
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Dropdown component with Select

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
📚 Learning: 2025-12-06T00:52:35.750Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T00:52:35.750Z
Learning: Applies to **/*.vue : Prefer `useModel` over separately defining a prop and emit

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-12-06T00:52:35.750Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T00:52:35.750Z
Learning: Applies to **/*.{ts,vue} : Write tests for all changes, especially bug fixes to catch future regressions

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Check tests-ui/README.md for test guidelines

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-12-06T00:52:35.750Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T00:52:35.750Z
Learning: Applies to **/*.test.ts : Avoid writing change detector tests that just assert default values

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.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:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.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} : Check assets/ directory for test data when writing tests

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.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} : Prefer specific selectors in browser tests

Applied to files:

  • browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts
⏰ 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). (4)
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: collect
🔇 Additional comments (3)
src/platform/assets/utils/createModelNodeFromAsset.ts (1)

186-207: Set widget value before graph insertion to ensure correct initial Vue state

Initializing widget.value with the filename before calling targetGraph.add(node) ensures the node enters the reactive graph with the correct value, avoiding the stale-value issue when Vue first observes the node. The surrounding validation and error handling remain sound.

src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts (1)

82-132: Asset widget default value and widgets-array splice pattern look correct for Vue 3 reactivity

Using defaultValue ?? '' when adding the asset widget ensures a defined string backing value while still allowing undefined at the higher-level model. The follow‑up splice that replaces node.widgets with a shallow copy after setting this.value is a valid way to trigger Vue 3’s shallow reactive tracking for arrays, so programmatic filename updates will be observed by Vue nodes without affecting other behavior.

src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue (1)

46-46: Let the parent widget drive the initial selection instead of a local default

Dropping the default from defineModel<string | undefined>() is appropriate here: the watcher already treats undefined as “no selection”, and the actual initial value now comes from the underlying widget state/reactivity, eliminating mismatches between dropdown selection and programmatic widget initialization.

@luke-mino-altherr luke-mino-altherr force-pushed the luke-mino-altherr/fix-model-selector-for-vue-nodes branch 3 times, most recently from 84b058c to df65baf Compare December 8, 2025 23:57
@luke-mino-altherr luke-mino-altherr marked this pull request as ready for review December 8, 2025 23:58
Set widget value BEFORE adding node to graph so Vue's reactivity system
captures the correct initial value instead of a stale default.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@luke-mino-altherr luke-mino-altherr force-pushed the luke-mino-altherr/fix-model-selector-for-vue-nodes branch from df65baf to df2de4a Compare December 9, 2025 00:00
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 9, 2025
@DrJKL DrJKL requested a review from AustinMroz December 9, 2025 00:02
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.

Change is reasonable and minimal. No objections even with the impending reactivity PR.

@luke-mino-altherr luke-mino-altherr merged commit 5a4fd9e into main Dec 9, 2025
32 checks passed
@luke-mino-altherr luke-mino-altherr deleted the luke-mino-altherr/fix-model-selector-for-vue-nodes branch December 9, 2025 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:nodes area:widgets size:XS This PR changes 0-9 lines, ignoring generated files. verified bug Something isn't working (confirmed by the team)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants