Skip to content

Conversation

@luke-mino-altherr
Copy link
Contributor

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

Summary

Model selection dropdowns now automatically refresh after uploading a new model, ensuring users see newly uploaded models immediately.

Changes

  • Cache Orchestration: Upload wizard now refreshes model caches by coordinating between modelToNodeStore and assetsStore
  • Smart Refetching: Only refreshes node types that use the uploaded model category (e.g., uploading a checkpoint refreshes CheckpointLoaderSimple but not LoraLoader)
  • Clean Architecture: Stores remain decoupled - the upload wizard composable orchestrates the refresh logic

Technical Details

After successful upload, useUploadModelWizard:

  1. Gets all node providers for the model type from modelToNodeStore
  2. Calls assetsStore.updateModelsForNodeType() for each affected node type
  3. Model dropdowns reactively update via Pinia store watchers

Review Focus

  • Orchestration pattern in upload wizard keeps stores decoupled
  • Efficient cache invalidation - only refreshes affected node types

@luke-mino-altherr luke-mino-altherr requested a review from a team as a code owner December 8, 2025 21:47
@luke-mino-altherr luke-mino-altherr added verified bug Something isn't working (confirmed by the team) area:widgets area:models labels Dec 8, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

📝 Walkthrough

Walkthrough

The change enhances the upload model wizard by adding post-upload cache refresh logic. After successful upload, the wizard now fetches all node providers for the selected model type and updates models for each node type using the assets and model-to-node stores.

Changes

Cohort / File(s) Summary
Upload Model Wizard Cache Refresh
src/platform/assets/composables/useUploadModelWizard.ts
Adds store integrations (useAssetsStore, useModelToNodeStore) and implements cache refresh logic after successful model upload by fetching node providers and updating models for all node types

Possibly related PRs

  • #7085 — Modifies model-upload composable flow and store interactions in the upload dialog, complementing the cache refresh logic added in this PR
✨ 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 fix/model-dropdown-refresh-after-upload

📜 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 b45f179 and 970e87c.

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

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/platform/assets/composables/useUploadModelWizard.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/composables/useUploadModelWizard.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/platform/assets/composables/useUploadModelWizard.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/platform/assets/composables/useUploadModelWizard.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/composables/useUploadModelWizard.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/platform/assets/composables/useUploadModelWizard.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). (11)
  • GitHub Check: playwright-tests-chromium-sharded (8, 8)
  • GitHub Check: playwright-tests-chromium-sharded (4, 8)
  • GitHub Check: playwright-tests-chromium-sharded (2, 8)
  • GitHub Check: playwright-tests-chromium-sharded (6, 8)
  • GitHub Check: playwright-tests-chromium-sharded (5, 8)
  • GitHub Check: playwright-tests-chromium-sharded (7, 8)
  • GitHub Check: playwright-tests-chromium-sharded (3, 8)
  • GitHub Check: playwright-tests (chromium-0.5x)
  • GitHub Check: playwright-tests-chromium-sharded (1, 8)
  • GitHub Check: playwright-tests (mobile-chrome)
  • GitHub Check: playwright-tests (chromium-2x)
🔇 Additional comments (2)
src/platform/assets/composables/useUploadModelWizard.ts (2)

7-8: LGTM!

The store imports are correctly structured and follow Vue 3 composition API patterns.


23-24: LGTM!

Store instantiation follows Vue 3 and Pinia best practices. No memory leak concerns as Pinia manages the store lifecycle.


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 8, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/08/2025, 11:43:57 PM UTC

📈 Summary

  • Total Tests: 497
  • Passed: 485 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 476 / ❌ 0 / ⚠️ 2 / ⏭️ 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

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/08/2025, 11:35:18 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

Model selection dropdowns now update automatically after uploading a new
model via the upload wizard. The fix dispatches a model-upload-success
event with the model type, and widgets listen for matching events to
refetch their data.

Also refactored to use VueUse's useEventListener for cleaner lifecycle
management.

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

Co-Authored-By: Claude <[email protected]>
@luke-mino-altherr luke-mino-altherr force-pushed the fix/model-dropdown-refresh-after-upload branch from acbea43 to c45ffef Compare December 8, 2025 21:48
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +451 B
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +89 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🟢 -63 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
UI Components 🔴 +451 B (177 kB) · 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) · + 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-BO46-EbG.js (removed) 2.98 MB 🟢 -2.98 MB 🟢 -620 kB 🟢 -471 kB
assets/index-Cv2kEr2u.js (new) 2.98 MB 🔴 +2.98 MB 🔴 +620 kB 🔴 +471 kB
assets/index-CP7o22Lp.js (removed) 223 kB 🟢 -223 kB 🟢 -47.6 kB 🟢 -39.2 kB
assets/index-CQ7z-I8n.js (new) 223 kB 🔴 +223 kB 🔴 +47.6 kB 🔴 +39.2 kB
assets/index-B4EaAnQ3.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -235 B
assets/index-B6co2Jdf.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +239 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-2Jx_JSA0.js (removed) 978 kB 🟢 -978 kB 🟢 -189 kB 🟢 -144 kB
assets/GraphView-Kv6W7haZ.js (new) 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-7FrDnEjr.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-BsGW0YsS.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-B5JU-R51.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/CreditsPanel-BMkqp6I6.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/KeybindingPanel-BEknD7_H.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/KeybindingPanel-DBI_xB0R.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-BiMQv_dY.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.58 kB 🟢 -2.26 kB
assets/ExtensionPanel-DGz9DJ8i.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.58 kB 🔴 +2.26 kB
assets/AboutPanel-6tOiwIVw.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-C14SYdRv.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.2 kB
assets/ServerConfigPanel-6YJO4YmL.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-Dp-DTJWJ.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-CoV6pL8X.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-D-4iAs_s.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) • 🔴 +451 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-B0kb03vT.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.32 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CvCAx_JD.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.32 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CkzpmlnR.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.97 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DFahnEKk.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DeiH0Iw7.js (new) 47.3 kB 🔴 +47.3 kB 🔴 +10.6 kB 🔴 +9.29 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-G3jUuCsU.js (removed) 46.9 kB 🟢 -46.9 kB 🟢 -10.5 kB 🟢 -9.16 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Cd7jNUsL.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.98 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Dl4FdiEp.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.97 kB
assets/ComfyQueueButton-DSNttUGk.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/ComfyQueueButton-Y2ySGkeH.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-B_DOBMyl.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -439 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DzpwBWGZ.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +442 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-CSE105pK.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.84 kB 🟢 -1.58 kB
assets/keybindingService-DjZRueYb.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-GfT-1gT0.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -962 B 🟢 -830 B
assets/audioService-PFeGcbra.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +824 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-D1ouxzFr.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +546 B
assets/audioUtils-Ddw4jr50.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -547 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-BOhi8SWh.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/WidgetRecordAudio-MyxhzeB5.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-DTdBW3G3.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/AudioPreviewPlayer-Dw0Mw0UL.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.03 kB
assets/WidgetGalleria-d5LKR7tk.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetGalleria-D85c5QsO.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetColorPicker-CivXeYXW.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-Y-T374J8.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-3GFF0ock.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetMarkdown-Bk1JSRyk.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetTextarea-50L2NWuq.js (new) 2.93 kB 🔴 +2.93 kB 🔴 +1.17 kB 🔴 +1.04 kB
assets/WidgetTextarea-CFNuAzSX.js (removed) 2.93 kB 🟢 -2.93 kB 🟢 -1.17 kB 🟢 -1.03 kB
assets/WidgetAudioUI-C6dob_mZ.js (removed) 2.85 kB 🟢 -2.85 kB 🟢 -1.16 kB 🟢 -1.06 kB
assets/WidgetAudioUI-Cx6kzBSa.js (new) 2.85 kB 🔴 +2.85 kB 🔴 +1.16 kB 🔴 +1.05 kB
assets/WidgetInputText-Ban3_c0O.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +916 B 🔴 +847 B
assets/WidgetInputText-j8BqmRTP.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -916 B 🟢 -849 B
assets/MediaImageBottom-BZ_3xGhD.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -742 B 🟢 -649 B
assets/MediaImageBottom-mrEVF2cr.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +738 B 🔴 +647 B
assets/MediaAudioBottom-B0Cygi0M.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +741 B 🔴 +655 B
assets/MediaAudioBottom-CgnRFVHS.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -743 B 🟢 -658 B
assets/MediaVideoBottom-Ci7eSG6c.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +738 B 🔴 +652 B
assets/MediaVideoBottom-DSLr16nk.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -741 B 🟢 -658 B
assets/Media3DBottom-Bwrt2nVN.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +657 B
assets/Media3DBottom-DkacTWec.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -652 B
assets/Media3DTop-BWBDEBPk.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +654 B
assets/Media3DTop-ilM-knDF.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -764 B 🟢 -651 B
assets/WidgetSelect-CLh0ETaG.js (removed) 655 B 🟢 -655 B 🟢 -342 B 🟢 -292 B
assets/WidgetSelect-COmdFn-I.js (new) 655 B 🔴 +655 B 🔴 +343 B 🔴 +290 B
assets/WidgetInputNumber-BT2z0bqv.js (removed) 595 B 🟢 -595 B 🟢 -330 B 🟢 -277 B
assets/WidgetInputNumber-bTvtD1iN.js (new) 595 B 🔴 +595 B 🔴 +330 B 🔴 +275 B
assets/Load3D-C4k-Elh-.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -222 B
assets/Load3D-CBMY-9Qg.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +224 B
assets/WidgetLegacy-BcvVVzSq.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -194 B
assets/WidgetLegacy-CYzJ4Umm.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +194 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

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 248929c and c45ffef.

📒 Files selected for processing (2)
  • src/platform/assets/composables/useUploadModelWizard.ts (1 hunks)
  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
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/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.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/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
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/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.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/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
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/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.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/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.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/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
  • src/platform/assets/composables/useUploadModelWizard.ts
🧠 Learnings (10)
📚 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,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.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 **/*.vue : Use `computed` instead of a `ref` and `watch` if possible

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 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 : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use watch and watchEffect for side effects

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.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 **/*.vue : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement computed properties with computed()

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
📚 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 : Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.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). (3)
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
🔇 Additional comments (2)
src/platform/assets/composables/useUploadModelWizard.ts (1)

146-152: LGTM! Event-driven cache invalidation implemented correctly.

The event is dispatched after successful upload with the model type in the detail payload. The canUploadModel guard ensures selectedModelType.value is truthy before upload proceeds, so the event detail will contain a valid model type at this point.

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

3-3: LGTM! VueUse composable correctly imported.

Using useEventListener from VueUse ensures automatic cleanup of the event listener when the component unmounts, preventing memory leaks.

Based on learnings and coding guidelines.

Comment on lines 84 to 98
// Listen for model upload events and refetch data
if (typeof window !== 'undefined') {
useEventListener(window, 'model-upload-success', async (event: Event) => {
const currentNodeType = toValue(nodeType)
if (!currentNodeType) return

const customEvent = event as CustomEvent<{ modelType: string }>
const uploadedModelType = customEvent.detail?.modelType

// Only refetch if the uploaded model type matches this widget's category
if (uploadedModelType && uploadedModelType === category.value) {
await assetsStore.updateModelsForNodeType(currentNodeType)
}
})
}
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

Add error handling for async store update.

The event listener correctly filters by category to minimize unnecessary API calls. However, the call to assetsStore.updateModelsForNodeType is not wrapped in error handling.

Apply this diff to add error handling:

     // Listen for model upload events and refetch data
     if (typeof window !== 'undefined') {
       useEventListener(window, 'model-upload-success', async (event: Event) => {
         const currentNodeType = toValue(nodeType)
         if (!currentNodeType) return
 
         const customEvent = event as CustomEvent<{ modelType: string }>
         const uploadedModelType = customEvent.detail?.modelType
 
         // Only refetch if the uploaded model type matches this widget's category
         if (uploadedModelType && uploadedModelType === category.value) {
-          await assetsStore.updateModelsForNodeType(currentNodeType)
+          try {
+            await assetsStore.updateModelsForNodeType(currentNodeType)
+          } catch (error) {
+            console.error('Failed to refresh models after upload:', error)
+          }
         }
       })
     }

As per coding guidelines: "Implement proper error handling"

🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.ts
around lines 84 to 98, the async call to assetsStore.updateModelsForNodeType
inside the model-upload-success event listener lacks error handling; wrap the
await call in a try/catch, and in the catch block log the error with contextual
information (including currentNodeType and category.value) so failures are
visible and safe to ignore for the UI; ensure the listener remains async and
does not rethrow the error.

Replaced window event-based cache invalidation with direct Pinia store
method calls for better type safety and encapsulation.

Changes:
- Added refreshModelsByType() to assetsStore to invalidate all node
  types for a given model category
- Upload wizard now calls store method directly instead of dispatching
  window events
- Removed event listener from useAssetWidgetData - no longer needed

Benefits:
- Better type safety (no CustomEvent casting)
- More testable (no global window dependency)
- Clearer data flow and dependencies

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

Co-Authored-By: Claude <[email protected]>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 8, 2025
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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c45ffef and b45f179.

📒 Files selected for processing (2)
  • src/platform/assets/composables/useUploadModelWizard.ts (3 hunks)
  • src/stores/assetsStore.ts (2 hunks)
🧰 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/platform/assets/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.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/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.ts
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/platform/assets/composables/useUploadModelWizard.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/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/platform/assets/composables/useUploadModelWizard.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.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/platform/assets/composables/useUploadModelWizard.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/platform/assets/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.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/composables/useUploadModelWizard.ts
  • src/stores/assetsStore.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/platform/assets/composables/useUploadModelWizard.ts
src/**/stores/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/stores/**/*.{ts,tsx}: Maintain clear public interfaces and restrict extension access in stores
Use TypeScript for type safety in state management stores

Files:

  • src/stores/assetsStore.ts
**/stores/**/*Store.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name Pinia stores with *Store.ts pattern

Files:

  • src/stores/assetsStore.ts
🧬 Code graph analysis (2)
src/platform/assets/composables/useUploadModelWizard.ts (1)
src/stores/assetsStore.ts (1)
  • useAssetsStore (95-398)
src/stores/assetsStore.ts (1)
src/stores/modelToNodeStore.ts (1)
  • useModelToNodeStore (22-168)
⏰ 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: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (1)
src/platform/assets/composables/useUploadModelWizard.ts (1)

7-8: Using useAssetsStore inside the composable looks appropriate

Instantiating the assets store within useUploadModelWizard to trigger model cache refresh is a clean way to reuse centralized cache logic without additional wiring. No lifecycle cleanup is needed since Pinia stores are app‑scoped.

Also applies to: 22-22

@luke-mino-altherr luke-mino-altherr marked this pull request as draft December 8, 2025 22:09
Moved model cache refresh logic from assetsStore to useUploadModelWizard
to avoid tight coupling between stores. The caller now orchestrates the
refresh by using both stores directly.

Benefits:
- Eliminates store-to-store coupling
- Each store maintains single responsibility
- Clearer ownership of orchestration logic

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

Co-Authored-By: Claude <[email protected]>
@luke-mino-altherr luke-mino-altherr marked this pull request as ready for review December 8, 2025 22:23
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 8, 2025
@DrJKL DrJKL enabled auto-merge (squash) December 8, 2025 23:31
@DrJKL DrJKL merged commit 973d767 into main Dec 8, 2025
26 checks passed
@DrJKL DrJKL deleted the fix/model-dropdown-refresh-after-upload branch December 8, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:models area:widgets size:S This PR changes 10-29 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.

3 participants