-
Notifications
You must be signed in to change notification settings - Fork 447
BYOM: Model Import Wizard #6949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughMultiple components within the asset upload wizard were updated with styling refinements, HTML-enhanced localization strings, and API modernization. Type definitions were adjusted from nullable to undefined semantics, and button styling was modified alongside display name mapping updates. Changes
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 11/26/2025, 02:39:04 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 11/26/2025, 02:47:35 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.18 MB (baseline 3.18 MB) • 🔴 +287 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 946 kB (baseline 944 kB) • 🔴 +1.34 kBGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 139 kB (baseline 139 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.84 MB (baseline 3.84 MB) • ⚪ 0 BBundles that do not match a named category
Status: 18 added / 18 removed |
| "uploadModelDescription2": "Only links from https://civitai.com are supported at the moment", | ||
| "uploadModelDescription3": "Max file size: 1 GB", | ||
| "civitaiLinkLabel": "Civitai model download link", | ||
| "uploadModelDescription2": "Only links from <a href=\"https://civitai.com\" target=\"_blank\" class=\"text-muted-foreground\">https://civitai.com</a> are supported at the moment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/platform/assets/composables/useModelTypes.ts (1)
5-23: Doc comment forupscale_modelsdoesn’t match implementationThe comment says
"upscale_models" -> "Upscale Model", butspecialCaseshas noupscale_modelsentry, so current behavior will still be"Upscale Models"via the generic formatter. Please either:
- Add a special case:
const specialCases: Record<string, string> = { + upscale_models: 'Upscale Model', loras: 'LoRA', ipadapter: 'IP-Adapter', sams: 'SAM', clip_vision: 'CLIP Vision', animatediff_motion_lora: 'AnimateDiff Motion LoRA', animatediff_models: 'AnimateDiff Model', vae: 'VAE', sam2: 'SAM 2', controlnet: 'ControlNet', gligen: 'GLIGEN' }or
- Adjust the doc comment to reflect the actual output.
Optionally, you could also hoist
specialCasesoutside the function to avoid re-allocating it on every call, though impact is small here.
🧹 Nitpick comments (7)
src/platform/assets/components/UploadModelDialogHeader.vue (1)
2-9: Add alt text to the new Civitai logo image for accessibilityThe new
<img src="/assets/images/civitai.svg" />has noalt, which is not ideal for screen readers. Consider:
- If purely decorative: use
alt="".- If informative: bind a localized alt, e.g.:
- <img src="/assets/images/civitai.svg" class="size-4" /> + <img + src="/assets/images/civitai.svg" + :alt="$t('assetBrowser.civitaiLogoAlt')" + class="size-4" + />and add
assetBrowser.civitaiLogoAlttomain.json.src/locales/en/main.json (1)
2095-2099: Harden external Civitaі links in HTML translationsThe updated assetBrowser strings now embed HTML links with
target="_blank"(e.g. the main site link and example API URL). To avoid reverse‑tabnabbing and align with security best practices, please includerel="noopener noreferrer"on these anchors. For example:- "uploadModelDescription2": "Only links from <a href=\"https://civitai.com\" target=\"_blank\" class=\"text-muted-foreground\">https://civitai.com</a> are supported at the moment", + "uploadModelDescription2": "Only links from <a href=\"https://civitai.com\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-muted-foreground\">https://civitai.com</a> are supported at the moment", - "civitaiLinkExample": "<strong>Example:</strong> <a href=\"https://civitai.com/api/download/models/833921?type=Model&format=SafeTensor\" target=\"_blank\" class=\"text-muted-foreground\">https://civitai.com/api/download/models/833921?type=Model&format=SafeTensor</a>", + "civitaiLinkExample": "<strong>Example:</strong> <a href=\"https://civitai.com/api/download/models/833921?type=Model&format=SafeTensor\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-muted-foreground\">https://civitai.com/api/download/models/833921?type=Model&format=SafeTensor</a>",Since these strings are rendered via
v-html, keeping the link markup itself as safe as possible is helpful even though the translations are static.src/platform/assets/components/UploadModelUrlInput.vue (1)
2-25: v-html for rich translations is fine here; consider a sanitization helper for future extensibilityYou now render multiple i18n strings via
v-html(uploadModelDescription2/3,civitaiLinkLabel,civitaiLinkExample). Given these come from static JSON, they’re effectively trusted and the current approach is acceptable.If there’s any chance in the future that these translations (or similar HTML-bearing keys) could come from remote or user-controlled sources, it would be safer to route them through a shared sanitizer (e.g., a small
SanitizedI18nHtmlcomponent or acomputedthat applies DOMPurify) instead of binding$t(...)directly tov-html.No change is strictly required now, but this is a good seam if you later harden HTML rendering globally.
src/platform/assets/composables/useUploadModelWizard.ts (1)
34-51:selectedModelTyperef usingundefinedsentinel is consistent with callersInitializing
selectedModelTypeasref<string>()(i.e.Ref<string | undefined>) and gating uploads withcanUploadModelkeeps the behavior correct while aligning with components that usestring | undefinedfor the model value. The additional? : ['models']fallback inuploadModelis now redundant due to the guard but harmless, so no required changes here.src/platform/assets/components/UploadModelFooter.vue (1)
2-11: Tighten help link implementation (URL + security + i18n key)
href="#"withtarget="_blank"is a bit of a placeholder; consider wiring this to a real help URL (or emitting an event) and using@click.preventif you keep#.- Add
rel="noopener noreferrer"alongsidetarget="_blank"to avoid the new tab getting a handle towindow.opener.- Please ensure the key
'How do I find this?'is actually defined insrc/locales/en/main.json(you may want a more conventional key name likeassetBrowser.howToFindThisfor consistency).src/platform/assets/components/UploadModelProgress.vue (1)
19-37: Guard against undefinedmodelTypeand consider display-name mappingIn the success state you interpolate
modelTypeinto:{{ $t('assetBrowser.findInLibrary', { type: modelType }) }}but the prop is typed as
string | undefined. Ifstatus === 'success'can ever be reached whilemodelTypeis stillundefined, users may see an odd'undefined'substitution.Two follow-ups to consider:
- Ensure
modelTypeis always set before transitioning to'success', or provide a safe fallback:{{ $t('assetBrowser.findInLibrary', { type: modelType ?? '' }) }}
- Where possible, hook this up to the friendly display-name mapping used elsewhere (e.g., from
useModelTypes) instead of the raw folder key, which aligns with your own TODO about wanting a nicer display name.src/platform/assets/components/UploadModelConfirmation.vue (1)
17-35: Model-type selector UX improvement with minor cleanup opportunity
- The helper row with the question-mark icon and
assetBrowser.notSureLeaveAsIsis a nice touch and correctly uses$t(...)for localization.- The
<label class="">has an emptyclassattribute; you can safely dropclass=""entirely for cleanliness.Also, please double-check that
assetBrowser.modelTypeSelectorLabel,assetBrowser.modelTypeSelectorPlaceholder, andassetBrowser.notSureLeaveAsIsare all present insrc/locales/en/main.jsonand any other supported locales.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
public/assets/images/civitai.svgis excluded by!**/*.svg
📒 Files selected for processing (12)
src/components/input/SingleSelect.vue(1 hunks)src/locales/en/main.json(2 hunks)src/platform/assets/components/AssetBrowserModal.vue(1 hunks)src/platform/assets/components/UploadModelConfirmation.vue(2 hunks)src/platform/assets/components/UploadModelDialog.vue(1 hunks)src/platform/assets/components/UploadModelDialogHeader.vue(1 hunks)src/platform/assets/components/UploadModelFooter.vue(4 hunks)src/platform/assets/components/UploadModelProgress.vue(1 hunks)src/platform/assets/components/UploadModelUrlInput.vue(1 hunks)src/platform/assets/composables/useModelTypes.ts(1 hunks)src/platform/assets/composables/useUploadModelWizard.ts(1 hunks)src/types/buttonTypes.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (21)
**/*.vue
📄 CodeRabbit inference engine (.cursorrules)
**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)Never use
:class="[]"to merge class names - always useimport { cn } from '@/utils/tailwindUtil'for class merging in Vue templates
**/*.vue: Use TypeScript with Vue 3 Single File Components (.vuefiles)
Name Vue components in PascalCase (e.g.,MenuHamburger.vue)Files:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.jsonFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue**/*.{ts,tsx,js,vue}
📄 CodeRabbit inference engine (.cursorrules)
Implement proper error handling in components and services
**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in.prettierrc
Organize imports by sorting and grouping by plugin, and runpnpm formatbefore committingFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/*.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 conventionsFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/*.{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.jsonFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use camelCase for variable and setting names in TypeScript/Vue files
Files:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue**/*.{vue,html}
📄 CodeRabbit inference engine (CLAUDE.md)
Never use
dark:ordark-theme:Tailwind variants - instead use semantic values fromstyle.csstheme, e.g.bg-node-component-surfaceFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,vue}: Useconst settingStore = useSettingStore()andsettingStore.get('Comfy.SomeSetting')to retrieve settings in TypeScript/Vue files
Useawait settingStore.set('Comfy.SomeSetting', newValue)to update settings in TypeScript/Vue files
Check server capabilities usingapi.serverSupportsFeature('feature_name')before using enhanced features
Useapi.getServerFeature('config_name', defaultValue)to retrieve server feature configurationEnforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates
Files:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/*.{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 codebaseFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/{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/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/types/buttonTypes.tssrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/**/{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.jsonFiles:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/AssetBrowserModal.vuesrc/components/input/SingleSelect.vuesrc/platform/assets/components/UploadModelDialog.vuesrc/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelDialogHeader.vuesrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vuesrc/components/**/*.vue
📄 CodeRabbit inference engine (src/components/CLAUDE.md)
src/components/**/*.vue: Use setup() function in Vue 3 Composition API
Destructure props using Vue 3.5 style in Vue components
Use ref/reactive for state management in Vue 3 Composition API
Implement computed() for derived state in Vue 3 Composition API
Use provide/inject for dependency injection in Vue components
Prefer emit/@event-name for state changes over other communication patterns
Use defineExpose only for imperative operations (such as form.validate(), modal.open())
Replace PrimeVue Dropdown component with Select
Replace PrimeVue OverlayPanel component with Popover
Replace PrimeVue Calendar component with DatePicker
Replace PrimeVue InputSwitch component with ToggleSwitch
Replace PrimeVue Sidebar component with Drawer
Replace PrimeVue Chips component with AutoComplete with multiple enabled
Replace PrimeVue TabMenu component with Tabs without panels
Replace PrimeVue Steps component with Stepper without panels
Replace PrimeVue InlineMessage component with Message
Extract complex conditionals to computed properties
Implement cleanup for async operations in Vue components
Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API
Use Teleport/Suspense when needed for component rendering
Define proper props and emits definitions in Vue componentsFiles:
src/components/input/SingleSelect.vuesrc/components/**/*.{vue,css}
📄 CodeRabbit inference engine (src/components/CLAUDE.md)
src/components/**/*.{vue,css}: Use Tailwind CSS only for styling (no custom CSS)
Use the correct tokens from style.css in the design system packageFiles:
src/components/input/SingleSelect.vuesrc/components/**/*.{vue,ts,js}
📄 CodeRabbit inference engine (src/components/CLAUDE.md)
src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI stringsFiles:
src/components/input/SingleSelect.vue**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursorrules)
Use es-toolkit for utility functions
Files:
src/types/buttonTypes.tssrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.ts**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
Use TypeScript for type safety
**/*.{ts,tsx}: Never useanytype - use proper TypeScript types
Never useas anytype assertions - fix the underlying type issueFiles:
src/types/buttonTypes.tssrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safetyFiles:
src/types/buttonTypes.tssrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.ts**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
UsedefaultsByInstallVersionproperty for gradual feature rollout based on version in settings configurationFiles:
src/types/buttonTypes.tssrc/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.tssrc/**/{services,composables}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
src/**/{services,composables}/**/*.{ts,tsx}: Useapi.apiURL()for backend endpoints instead of constructing URLs directly
Useapi.fileURL()for static file access instead of constructing URLs directlyFiles:
src/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.ts**/composables/use*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name composables in the format
useXyz.tsFiles:
src/platform/assets/composables/useModelTypes.tssrc/platform/assets/composables/useUploadModelWizard.ts🧠 Learnings (11)
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: .cursorrules:0-0 Timestamp: 2025-11-24T19:46:52.279Z Learning: Applies to **/*.vue : Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectivelyApplied to files:
src/platform/assets/components/UploadModelUrlInput.vuesrc/platform/assets/components/UploadModelProgress.vuesrc/platform/assets/components/UploadModelConfirmation.vue📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: .cursorrules:0-0 Timestamp: 2025-11-24T19:46:52.279Z Learning: Applies to **/*.vue : Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)Applied to files:
src/platform/assets/components/UploadModelUrlInput.vue📚 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 InputSwitch component with ToggleSwitchApplied to files:
src/platform/assets/components/UploadModelUrlInput.vue📚 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 OverlayPanel component with PopoverApplied to files:
src/platform/assets/components/AssetBrowserModal.vue📚 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 SelectApplied to files:
src/components/input/SingleSelect.vue📚 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 Steps component with Stepper without panelsApplied to files:
src/platform/assets/components/UploadModelFooter.vuesrc/platform/assets/components/UploadModelProgress.vue📚 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/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`Applied to files:
src/locales/en/main.json📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-11-24T19:48:23.088Z Learning: Applies to **/composables/use*.ts : Name composables in the format `useXyz.ts`Applied to files:
src/platform/assets/composables/useModelTypes.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 : Define proper props and emits definitions in Vue componentsApplied to files:
src/platform/assets/components/UploadModelConfirmation.vue📚 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 InlineMessage component with MessageApplied to files:
src/platform/assets/components/UploadModelConfirmation.vue📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: .cursorrules:0-0 Timestamp: 2025-11-24T19:46:52.279Z Learning: Applies to **/*.vue : Implement proper props and emits definitions in Vue componentsApplied to files:
src/platform/assets/components/UploadModelConfirmation.vue🪛 ESLint
src/platform/assets/components/UploadModelConfirmation.vue
[error] 39-39: Unable to resolve path to module '@/components/input/SingleSelect.vue'.
(import-x/no-unresolved)
[error] 40-40: Unable to resolve path to module '@/platform/assets/composables/useModelTypes'.
(import-x/no-unresolved)
⏰ 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: test
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (8)
src/components/input/SingleSelect.vue (1)
155-169: Model type change tostring | undefinedis consistentSwitching
selectedItemtodefineModel<string | undefined>({ required: true })aligns with the rest of the flow (wizard usesRef<string | undefined>), and the null/undefined checks in the template andgetLabelalready support this. No further changes needed here.src/platform/assets/components/UploadModelDialog.vue (1)
2-41: Top border + spacing tweaks on dialog container look fineAdding
border-t-[1px] border-border-defaultto the dialog root is purely presentational and doesn’t affect the wizard flow or state wiring. The component still delegates steps and events exactly as before.src/platform/assets/components/AssetBrowserModal.vue (1)
195-211: Dialog padding overrides preserve behavior and align stylingPassing
dialogComponentProps.pt.header/contentintoshowDialogonly adjusts the dialog’s header/content padding; the upload success callback still triggersexecute()so asset lists refresh as before. The change is localized to presentation and looks good.src/types/buttonTypes.ts (1)
16-23: Button size and transparent type mapping changes look goodThe updated
mdpadding and the shift of the transparent type totext-muted-foregroundare purely stylistic, keep the API stable, and remain type-safe. No issues from a TS or usage perspective.Also applies to: 25-37
src/platform/assets/components/UploadModelFooter.vue (1)
12-67: Footer step logic and button role changes are consistentThe added Cancel button and the Back/placeholder pattern across steps 1–3 read correctly, and the button type changes (Back →
transparent, CTAs →secondary) reuse the existing disabled conditions without altering behavior. This is a clean UX-only adjustment.src/platform/assets/components/UploadModelProgress.vue (1)
2-16: Uploading-state visual tweaks are safeThe tightened layout and shift to
text-muted-foregroundfor the loader are purely stylistic and don’t affect logic or props; the state branching remains unchanged.src/platform/assets/components/UploadModelConfirmation.vue (2)
2-13: Model info card styling change is straightforwardThe new container/card classes (
text-sm text-muted-foreground,bg-modal-card-background,text-base-foreground) are a pure visual refinement around the existingmetadata?.name || metadata?.filenamelogic. No behavioral or typing concerns here.
39-50: defineModel usage and imports; confirm alias config
- Using
defineModel<string | undefined>()forv-model="modelValue"is a good move and keeps the external API (v-modelprop/emit) intact while simplifying the script setup.defineProps<{ metadata: AssetMetadata | null }>()is correctly typed and matches template usage.- Static analysis in this environment reported unresolved imports for
@/components/input/SingleSelect.vueand@/platform/assets/composables/useModelTypes. If your local build passes, this is likely just a tooling/ESLint alias-config mismatch rather than a real import bug. Otherwise, ensure your ESLint/TS config defines@consistently with your bundler.
| <li v-html="$t('assetBrowser.uploadModelDescription2')" /> | ||
| <li v-html="$t('assetBrowser.uploadModelDescription3')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Summary
Design alignment for the model import wizard.
┆Issue is synchronized with this Notion page by Unito