-
Notifications
You must be signed in to change notification settings - Fork 461
Improve Import Failed Error Messages #7871
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
|
Warning Rate limit exceeded@viva-jinyi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 14 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughAdds a dedicated import-failed dialog flow: new header/content/footer Vue components, a dialogService method showImportFailedNodeDialog, routing of import_failed conflicts to this dialog, updates to conflict detection shape, and related UI and i18n adjustments. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as PackEnableToggle (UI)
participant Composable as useImportFailedDetection
participant Service as Dialog Service
participant Dialog as Import-Failed Dialog Components
UI->>Composable: Detect package conflicts
Composable->>Composable: Filter for import_failed conflicts
alt import_failed found
Composable->>Service: showImportFailedNodeDialog({ conflictedPackages })
Service->>Dialog: Mount Header, Content, Footer (global-import-failed)
Dialog->>Dialog: Render errors (messages, tracebacks)
Note over Dialog: User reviews details
Dialog->>Service: Close dialog on "Understood"
else other conflicts
Composable->>Service: showNodeConflictDialog(conflicts)
Note over Service: Existing conflict dialog flow
end
Possibly related PRs
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. Comment |
🎭 Playwright Test Results⏰ Completed at: 01/08/2026, 01:40:40 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/08/2026, 01:35:21 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.25 MB (baseline 3.24 MB) • 🔴 +5.99 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 1.01 MB (baseline 1.01 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 197 kB (baseline 197 kB) • ⚪ 0 BReusable component library chunks
Status: 8 added / 8 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 9.19 MB (baseline 9.19 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.5 MB (baseline 3.5 MB) • ⚪ 0 BBundles that do not match a named category
Status: 16 added / 16 removed |
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: 5
🤖 Fix all issues with AI agents
In @src/services/dialogService.ts:
- Around line 488-520: In showImportFailedNodeDialog, replace the redundant
truthy-fallback "conflictedPackages: conflictedPackages || []" with a nullish
fallback or remove it: use "conflictedPackages: conflictedPackages ?? []" if the
ImportFailedNodeContent requires an array, or simply "conflictedPackages" if it
can accept undefined.
In
@src/workbench/extensions/manager/components/manager/button/PackEnableToggle.vue:
- Around line 87-115: The import-failed branch (when hasImportFailed is true)
shows showImportFailedDialog() but never acknowledges the conflict; update the
showImportFailedDialog invocation to include a close/ack handler that calls
markConflictsAsSeen() (and thus sets modal_dismissed) similar to the
dialogComponentProps.onClose used for showNodeConflictDialog, so import failure
modals stop reappearing after being dismissed.
In
@src/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vue:
- Around line 12-17: The component ImportFailedNodeContent.vue is showing
pkg.errorMessage (short message) instead of the detailed Python traceback;
change the rendered content to use pkg.traceback (and simplify the v-if to just
check pkg.traceback or pkg.errorMessage if you want a fallback) so it matches
WarningTabPanel.vue and the logic in useConflictDetection.ts (which ensures
traceback contains full info/fallback); update the template to render traceback
(pkg.traceback) in the mono-styled div and keep the existing class and
conditional visibility.
- Around line 6-10: The scrollable container rendered in the v-for over
importFailedPackages (keyed by pkg.packageId) needs accessibility attributes so
screen readers know it's a scrollable error/code region; update the outer div
that contains the traceback to include role="region" plus an accessible label
(either aria-label like "Error traceback for {pkg.packageId}" or aria-labelledby
pointing to a heading), make it keyboard-focusable with tabindex="0" so users
can scroll via keyboard, and optionally add aria-live or aria-describedby if
there are dynamic updates; apply these attributes to the div that wraps each
package's error content (the element using :key="pkg.packageId") so each package
region is announced correctly.
In @src/workbench/extensions/manager/composables/useImportFailedDetection.ts:
- Around line 74-78: The exported property and the internal variable both named
showImportFailedDialog cause ambiguity; rename the internal function/variable
(e.g., to openDialog or dialogHandler) used inside the composable so the
returned property showImportFailedDialog clearly refers to the public API.
Update all references within useImportFailedDetection (including the closure
that calls showImportFailedDialog([conflicts.value])) to use the new internal
name, ensuring the returned object still exposes showImportFailedDialog.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (11)
src/components/dialog/content/MissingNodesFooter.vuesrc/locales/en/main.jsonsrc/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
🧰 Additional context used
📓 Path-based instructions (16)
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/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.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/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
src/**/{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 directly
Files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.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/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not useanytype oras anytype assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code
Files:
src/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
**/*.{ts,tsx,vue,js,jsx,json,css}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width
Files:
src/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/locales/en/main.jsonsrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Minimize the surface area (exported values) of each module and composable
Files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.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/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.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/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.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/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
**/*.vue: Use Vue 3.5+ with TypeScript in.vuefiles, exclusively using Composition API with<script setup lang="ts">syntax
Use Tailwind 4 for styling in Vue components; avoid<style>blocks
Name Vue components using PascalCase (e.g.,MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not usewithDefaultsor runtime props declaration
Prefercomputed()overrefwithwatchwhen deriving values
PreferuseModelover separately defining prop and emit for two-way binding
Usevue-i18nin composition API for string literals; place new translation entries insrc/locales/en/main.json
Usecn()utility function from@/utils/tailwindUtilfor merging Tailwind class names; do not use:class="[]"syntax
Do not use thedark:Tailwind variant; use semantic values from thestyle.csstheme instead (e.g.,bg-node-component-surface)
Do not use!importantor the!important prefix for Tailwind classes; find and correct interfering!importantclasses instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions
Files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
src/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 components
Files:
src/components/dialog/content/MissingNodesFooter.vue
src/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 package
Files:
src/components/dialog/content/MissingNodesFooter.vue
src/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 strings
Files:
src/components/dialog/content/MissingNodesFooter.vue
**/**/use[A-Z]*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name composables using the pattern
useXyz.ts
Files:
src/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
🧠 Learnings (26)
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Applied to files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Applied to files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Applied to files:
src/services/dialogService.tssrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/services/dialogService.tssrc/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vuesrc/workbench/extensions/manager/composables/useConflictDetection.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.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 : Replace PrimeVue InlineMessage component with Message
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.
Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-22T21:36:08.369Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/platform/cloud/subscription/components/PricingTable.vue:185-201
Timestamp: 2025-12-22T21:36:08.369Z
Learning: In Vue components, avoid creating single-use variants for common UI components (e.g., Button and other shared components). Aim for reusable variants that cover multiple use cases. It’s acceptable to temporarily mix variant props with inline Tailwind classes when a styling need is unique to one place, but plan and consolidate into shared, reusable variants as patterns emerge across the codebase.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vuesrc/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/components/dialog/content/MissingNodesFooter.vuesrc/workbench/extensions/manager/components/manager/button/PackEnableToggle.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vuesrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue
📚 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} : Implement proper error handling
Applied to files:
src/workbench/extensions/manager/components/manager/ImportFailedNodeContent.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 TabMenu component with Tabs without panels
Applied to files:
src/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.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 Popover
Applied to files:
src/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vuesrc/workbench/extensions/manager/components/manager/NodeConflictHeader.vue
📚 Learning: 2025-12-18T16:03:02.066Z
Learnt from: henrikvilhelmberglund
Repo: Comfy-Org/ComfyUI_frontend PR: 7617
File: src/components/actionbar/ComfyActionbar.vue:301-308
Timestamp: 2025-12-18T16:03:02.066Z
Learning: In the ComfyUI frontend queue system, useQueuePendingTaskCountStore().count indicates the number of tasks in the queue, where count = 1 means a single active/running task and count > 1 means there are pending tasks in addition to the active task. Therefore, in src/components/actionbar/ComfyActionbar.vue, enable the 'Clear Pending Tasks' button only when count > 1 to avoid clearing the currently running task. The active task should be canceled using the 'Cancel current run' button instead. This rule should be enforced via a conditional check on the queue count, with appropriate disabled/aria-disabled states for accessibility, and tests should verify behavior for count = 1 and count > 1.
Applied to files:
src/components/dialog/content/MissingNodesFooter.vue
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Use sorted and grouped imports organized by plugin/source
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.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/workbench/extensions/manager/composables/useImportFailedDetection.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 : Extract complex conditionals to computed properties
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.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/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Prefer `computed()` over `ref` with `watch` when deriving values
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{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/workbench/extensions/manager/composables/useImportFailedDetection.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/workbench/extensions/manager/composables/useImportFailedDetection.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,ts,js} : Use vue-i18n for ALL UI strings
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.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} : Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.ts
🧬 Code graph analysis (2)
src/services/dialogService.ts (2)
src/workbench/extensions/manager/types/conflictDetectionTypes.ts (1)
ConflictDetectionResult(55-61)src/stores/dialogStore.ts (1)
DialogComponentProps(37-38)
src/workbench/extensions/manager/composables/useImportFailedDetection.ts (1)
src/workbench/extensions/manager/types/conflictDetectionTypes.ts (1)
ConflictDetectionResult(55-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: deploy-and-comment
- GitHub Check: test
- GitHub Check: lint-and-format
- GitHub Check: collect
- GitHub Check: setup
🔇 Additional comments (12)
src/components/dialog/content/MissingNodesFooter.vue (1)
25-25: Verify removal of button size prop.The
size="sm"prop was removed from the "Open Manager" button, while other buttons in the same footer component retain explicit size props (size="md"on lines 18 and 28-31). This creates inconsistent button sizing across the footer.Was this removal intentional? If the buttons should have uniform sizing, consider either:
- Restoring
size="sm"to match the original design, or- Removing size props from all buttons to use consistent defaults
🔎 Restore size prop for consistency
- <Button variant="textonly" @click="openManager">{{ + <Button variant="textonly" size="sm" @click="openManager">{{ $t('g.openManager') }}</Button>src/workbench/extensions/manager/components/manager/NodeConflictHeader.vue (1)
5-5: LGTM! Icon migration aligns with guidelines.The icon change from PrimeIcons (
pi pi-exclamation-triangle) to Lucide (icon-[lucide--triangle-alert]) follows the coding guidelines' preference for Lucide icons. The semantic color classtext-gold-600maintains visual consistency with the new ImportFailedNodeHeader component.src/locales/en/main.json (1)
381-383: LGTM! Translation entry properly structured.The new
importFailed.titletranslation key is properly formatted and follows the existing pattern. It's correctly placed at the root level and supports the new import failure dialog UI.src/services/dialogService.ts (2)
33-35: LGTM! Import statements properly structured.The new component imports for the import-failed dialog flow are correctly placed and follow the existing patterns in the file.
601-601: LGTM! Function properly exported.The new
showImportFailedNodeDialogfunction is correctly added to the return object, making it accessible to consumers of the dialog service. The placement alongsideshowNodeConflictDialogmakes logical sense given their related functionality.src/workbench/extensions/manager/components/manager/ImportFailedNodeHeader.vue (1)
12-12: Add TypeScript language attribute.The coding guidelines require
<script setup lang="ts">for all Vue components. Add thelang="ts"attribute for consistency and type safety.🔎 Add TypeScript language attribute
-<script setup lang="ts"></script> +<script setup lang="ts"></script>Based on coding guidelines: "Use Vue 3.5+ with TypeScript in
.vuefiles, exclusively using Composition API with<script setup lang="ts">syntax"⛔ Skipped due to learnings
Learnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-12-21T06:04:12.562Z Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntaxLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-12-21T06:04:12.562Z Learning: Applies to **/*.{ts,tsx,vue} : Use TypeScript exclusively; do not write new JavaScript codeLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-12-21T06:04:12.562Z Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declarationLearnt 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/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guideLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: src/CLAUDE.md:0-0 Timestamp: 2025-11-24T19:47:34.324Z Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebaseLearnt 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/**/*.ts : Use TypeScript for type safetyLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-12-21T06:04:12.562Z Learning: Applies to **/*.{ts,tsx,vue} : Do not use `any` type or `as any` type assertions; fix the underlying type issue insteadLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-12-21T06:04:12.562Z Learning: Applies to **/*.{ts,tsx,vue} : Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templatesLearnt from: CR Repo: Comfy-Org/ComfyUI_frontend PR: 0 File: src/CLAUDE.md:0-0 Timestamp: 2025-11-24T19:47:34.324Z Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types insteadLearnt 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/**/stores/**/*.{ts,tsx} : Use TypeScript for type safety in state management storesLearnt 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 setup() function for component logicLearnt 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/**/*.ts : Use es-toolkit for utility functionssrc/workbench/extensions/manager/components/manager/ImportFailedNodeFooter.vue (1)
1-20: LGTM!The footer component follows Vue 3.5 Composition API patterns correctly, uses the common Button component as per repository standards, and implements proper i18n for user-facing text.
src/workbench/extensions/manager/components/manager/button/PackEnableToggle.vue (1)
44-44: LGTM!The import and initialization of
useImportFailedDetectionfollows Vue 3.5 Composition API patterns correctly.Also applies to: 58-58
src/workbench/extensions/manager/composables/useConflictDetection.ts (1)
391-436: LGTM!The updated
detectImportFailConflictsfunction correctly handles the new API response format with flexible{ error?, traceback? }structure. The data mapping is sound:
current_value: short error message for summary displayrequired_value: detailed traceback (or error if unavailable) for full error detailsThis aligns with the PR objective of displaying detailed Python tracebacks for import failures.
src/workbench/extensions/manager/components/manager/infoPanel/tabs/WarningTabPanel.vue (1)
8-25: LGTM!The type-specific rendering correctly displays detailed tracebacks for
import_failedconflicts viaconflict.required_value, aligning with the PR objective of showing Python tracebacks inline. The removal of the "Open Logs" button in favor of direct display improves the user experience.src/workbench/extensions/manager/composables/useImportFailedDetection.ts (2)
7-10: LGTM!The import statement correctly adds the
ConflictDetectionResulttype needed for the updated function signatures. The import follows the project's TypeScript conventions with proper type-only imports.
29-38: LGTM!The function correctly integrates with the new dialog service method
showImportFailedNodeDialog. The defensive checks ensure the dialog is only shown when there are actual conflicts to display.
src/workbench/extensions/manager/components/manager/button/PackEnableToggle.vue
Show resolved
Hide resolved
src/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vue
Show resolved
Hide resolved
src/workbench/extensions/manager/components/manager/ImportFailedNodeContent.vue
Show resolved
Hide resolved
src/workbench/extensions/manager/composables/useImportFailedDetection.ts
Outdated
Show resolved
Hide resolved
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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/workbench/extensions/manager/composables/useConflictDetection.test.ts (1)
400-434: Add test coverage for thetracebackfield—the primary feature of this PR.This test only verifies import failures with an
errorfield and omits thetracebackfield entirely. According to the PR objectives, the main enhancement is displaying detailed Python traceback. Add test cases covering:
- Import failure with both
errorandtracebackfields- Import failure with only
traceback(if supported)- Verification that
required_valuecorrectly combines botherrorandtracebackintofullErrorInfo- Edge case where import fail info is
null🔎 Proposed additional test cases
it('should detect import failures with traceback', async () => { mockInstalledPacks.isReady.value = true mockInstalledPacksWithVersions.value = [ { id: 'fail-pack-with-traceback', version: '1.0.0' } ] vi.mocked( mockComfyManagerService.getImportFailInfoBulk ).mockResolvedValue({ 'fail-pack-with-traceback': { error: 'ImportError: cannot import name Foo', traceback: 'Traceback (most recent call last):\n File "module.py", line 10\n raise ImportError\nImportError: cannot import name Foo', name: 'fail-pack-with-traceback', path: '/path/to/pack' } }) vi.mocked(mockRegistryService.getBulkNodeVersions).mockResolvedValue({ node_versions: [] }) const { runFullConflictAnalysis } = useConflictDetection() const result = await runFullConflictAnalysis() expect(result.results).toHaveLength(1) expect(result.results[0].conflicts).toContainEqual({ type: 'import_failed', current_value: 'ImportError: cannot import name Foo', required_value: expect.stringContaining('Traceback (most recent call last)') }) expect(result.results[0].conflicts[0].required_value).toContain('ImportError: cannot import name Foo') }) it('should handle import failures with null failureInfo', async () => { mockInstalledPacks.isReady.value = true mockInstalledPacksWithVersions.value = [ { id: 'null-fail-pack', version: '1.0.0' } ] vi.mocked( mockComfyManagerService.getImportFailInfoBulk ).mockResolvedValue({ 'null-fail-pack': null }) vi.mocked(mockRegistryService.getBulkNodeVersions).mockResolvedValue({ node_versions: [] }) const { runFullConflictAnalysis } = useConflictDetection() const result = await runFullConflictAnalysis() // Verify the package is handled gracefully (no conflicts or appropriate default) expect(result.results).toHaveLength(1) // Adjust expectation based on actual implementation behavior for null })
🤖 Fix all issues with AI agents
In @src/workbench/extensions/manager/composables/useConflictDetection.test.ts:
- Around line 413-416: Replace the `as any` assertion with a proper typed
interface: define an interface (e.g., ImportFailInfo { error?: string;
traceback?: string; name: string; path: string }) and use it for the test object
instead of `as any`; also update the service signature/type for
getImportFailInfoBulk to return/accept ImportFailInfo[] (or the matching shape)
so the test and service types align and no `any` is required.
In
@src/workbench/extensions/manager/composables/useImportFailedDetection.test.ts:
- Around line 230-242: The test currently checks that
mockDialogService.showImportFailedNodeDialog is called with conflicts containing
an import_failed type but doesn't assert the error/traceback is propagated;
update the expectation in useImportFailedDetection.test (the expect(...) block
around mockDialogService.showImportFailedNodeDialog) to also assert that the
conflicting entry includes a required_value field (or required_value.traceback)
containing the error details/string — locate the expectation referencing
conflictedPackages and extend the expect.objectContaining for the conflict to
include required_value (or required_value.traceback) to ensure the traceback is
passed through to the dialog payload.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
src/workbench/extensions/manager/composables/useConflictDetection.test.tssrc/workbench/extensions/manager/composables/useImportFailedDetection.test.ts
🧰 Additional context used
📓 Path-based instructions (12)
src/**/*.{vue,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.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/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
src/**/{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 directly
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.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/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.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/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.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/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not useanytype oras anytype assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
**/**/use[A-Z]*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name composables using the pattern
useXyz.ts
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.ts: Use unit/component tests intests-ui/orsrc/**/*.test.tswith Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Minimize the surface area (exported values) of each module and composable
Files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
🧠 Learnings (8)
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/workbench/extensions/manager/composables/useImportFailedDetection.test.tssrc/workbench/extensions/manager/composables/useConflictDetection.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Applied to files:
src/workbench/extensions/manager/composables/useConflictDetection.test.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: setup
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (2)
src/workbench/extensions/manager/composables/useImportFailedDetection.test.ts (1)
46-49: LGTM! Mock setup correctly includes the new dialog method.The mock now includes both
showErrorDialogandshowImportFailedNodeDialog, which properly supports the updated dialog flow for import failures.src/workbench/extensions/manager/composables/useConflictDetection.test.ts (1)
431-432: The test expectation is correct. The implementation intentionally sets bothcurrent_valueandrequired_valueto the same value when no traceback is present. The logic isfullErrorInfo = traceback || errorMsg, which means when traceback is absent or empty, it falls back to the error message. The test mock does not provide a traceback field, so both values correctly resolve to'Import error'.
| error: 'Import error', | ||
| name: 'fail-pack', | ||
| path: '/path/to/pack' | ||
| } as any // The actual API returns different structure than types |
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.
Replace as any with proper TypeScript types.
The type assertion as any bypasses type safety and violates coding guidelines. Update the type definitions to match the actual API response structure { error?: string; traceback?: string; name: string; path: string } or use a properly typed interface.
As per coding guidelines, avoid using as any type assertions and fix the underlying type issue instead.
Details
🔎 Proposed fixDefine a proper type for the import failure response:
+type ImportFailInfo = {
+ error?: string
+ traceback?: string
+ name: string
+ path: string
+}
+
vi.mocked(
mockComfyManagerService.getImportFailInfoBulk
).mockResolvedValue({
'fail-pack': {
error: 'Import error',
name: 'fail-pack',
path: '/path/to/pack'
- } as any // The actual API returns different structure than types
+ }
})Additionally, ensure the actual type definition for getImportFailInfoBulk in the service is updated to match this structure.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| error: 'Import error', | |
| name: 'fail-pack', | |
| path: '/path/to/pack' | |
| } as any // The actual API returns different structure than types | |
| type ImportFailInfo = { | |
| error?: string | |
| traceback?: string | |
| name: string | |
| path: string | |
| } | |
| vi.mocked( | |
| mockComfyManagerService.getImportFailInfoBulk | |
| ).mockResolvedValue({ | |
| 'fail-pack': { | |
| error: 'Import error', | |
| name: 'fail-pack', | |
| path: '/path/to/pack' | |
| } | |
| }) |
🤖 Prompt for AI Agents
In @src/workbench/extensions/manager/composables/useConflictDetection.test.ts
around lines 413 - 416, Replace the `as any` assertion with a proper typed
interface: define an interface (e.g., ImportFailInfo { error?: string;
traceback?: string; name: string; path: string }) and use it for the test object
instead of `as any`; also update the service signature/type for
getImportFailInfoBulk to return/accept ImportFailInfo[] (or the matching shape)
so the test and service types align and no `any` is required.
| expect(mockDialogService.showImportFailedNodeDialog).toHaveBeenCalledWith({ | ||
| conflictedPackages: expect.arrayContaining([ | ||
| expect.objectContaining({ | ||
| package_id: 'test-package', | ||
| package_name: 'Test Package', | ||
| conflicts: expect.arrayContaining([ | ||
| expect.objectContaining({ | ||
| type: 'import_failed' | ||
| }) | ||
| ]) | ||
| }) | ||
| ]) | ||
| }) |
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.
🧹 Nitpick | 🔵 Trivial
Consider verifying that error details are passed through to the dialog.
The assertion correctly validates the dialog method is called with the expected structure. However, since the PR objective emphasizes storing traceback in required_value, consider explicitly asserting that this field is present in the conflicts to ensure error details are properly passed through to the dialog.
🔎 Optional enhancement to verify traceback field
expect(mockDialogService.showImportFailedNodeDialog).toHaveBeenCalledWith({
conflictedPackages: expect.arrayContaining([
expect.objectContaining({
package_id: 'test-package',
package_name: 'Test Package',
conflicts: expect.arrayContaining([
expect.objectContaining({
- type: 'import_failed'
+ type: 'import_failed',
+ required_value: expect.any(String)
})
])
})
])
})This ensures the error details/traceback are preserved in the dialog payload.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| expect(mockDialogService.showImportFailedNodeDialog).toHaveBeenCalledWith({ | |
| conflictedPackages: expect.arrayContaining([ | |
| expect.objectContaining({ | |
| package_id: 'test-package', | |
| package_name: 'Test Package', | |
| conflicts: expect.arrayContaining([ | |
| expect.objectContaining({ | |
| type: 'import_failed' | |
| }) | |
| ]) | |
| }) | |
| ]) | |
| }) | |
| expect(mockDialogService.showImportFailedNodeDialog).toHaveBeenCalledWith({ | |
| conflictedPackages: expect.arrayContaining([ | |
| expect.objectContaining({ | |
| package_id: 'test-package', | |
| package_name: 'Test Package', | |
| conflicts: expect.arrayContaining([ | |
| expect.objectContaining({ | |
| type: 'import_failed', | |
| required_value: expect.any(String) | |
| }) | |
| ]) | |
| }) | |
| ]) | |
| }) |
🤖 Prompt for AI Agents
In
@src/workbench/extensions/manager/composables/useImportFailedDetection.test.ts
around lines 230 - 242, The test currently checks that
mockDialogService.showImportFailedNodeDialog is called with conflicts containing
an import_failed type but doesn't assert the error/traceback is propagated;
update the expectation in useImportFailedDetection.test (the expect(...) block
around mockDialogService.showImportFailedNodeDialog) to also assert that the
conflicting entry includes a required_value field (or required_value.traceback)
containing the error details/string — locate the expectation referencing
conflictedPackages and extend the expect.objectContaining for the conflict to
include required_value (or required_value.traceback) to ensure the traceback is
passed through to the dialog payload.
093848d to
755c6b4
Compare
255a92e to
d19db06
Compare
christian-byrne
left a comment
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.
LGTM with nits
src/workbench/extensions/manager/components/manager/button/PackEnableToggle.vue
Show resolved
Hide resolved
src/workbench/extensions/manager/components/manager/NodeConflictDialogContent.vue
Show resolved
Hide resolved
src/workbench/extensions/manager/components/manager/NodeConflictHeader.vue
Show resolved
Hide resolved
| const errorMsg = failureInfo.error || 'Unknown import error' | ||
| const traceback = failureInfo.traceback || '' | ||
|
|
||
| // Combine error and traceback for display | ||
| const fullErrorInfo = traceback || errorMsg |
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.
nit: I believe this code could be simplified
## Summary <!-- One sentence describing what changed and why. --> #7871 #7858 I refactored the code based on the reviews I received on those two PRs. ## Changes - **What**: 1. Updated IconGroup to address the backgroundClass handling. 2. Replaced text-gold-600 with a semantic color token. 3. Replaced PrimeVue Icon with a lucide icon. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7893-Refactor-code-reivew-2e26d73d365081e68a44e89ed1163062) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <[email protected]>
Summary
Enhanced the functionality to provide detailed error information to users when Custom Node Python imports fail.
Changes
Review Focus
useConflictDetection.ts(storing traceback in required_value)Screenshots (if applicable)
Before
before.webm
After
after.webm
┆Issue is synchronized with this Notion page by Unito