Refactor/code-reivew (#7893)

## Summary

<!-- One sentence describing what changed and why. -->
https://github.com/Comfy-Org/ComfyUI_frontend/pull/7871
https://github.com/Comfy-Org/ComfyUI_frontend/pull/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 <drjkl@comfy.org>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Jin Yi
2026-01-09 07:52:49 +09:00
committed by GitHub
parent 3bd74dcf39
commit eea24166e0
13 changed files with 46 additions and 48 deletions

View File

@@ -401,36 +401,29 @@ export function useConflictDetection() {
// Process import failures
for (const [packageId, failureInfo] of Object.entries(importFailInfo)) {
if (failureInfo && typeof failureInfo === 'object') {
// Extract error information from Manager API response
const errorMsg = failureInfo.error || 'Unknown import error'
const traceback = failureInfo.traceback || ''
if (!failureInfo || typeof failureInfo !== 'object') continue
// Combine error and traceback for display
const fullErrorInfo = traceback || errorMsg
const errorMsg = failureInfo.error || 'Unknown import error'
const fullErrorInfo = failureInfo.traceback || errorMsg
results.push({
package_id: packageId,
package_name: packageId,
has_conflict: true,
conflicts: [
{
type: 'import_failed',
current_value: errorMsg,
required_value: fullErrorInfo
}
],
is_compatible: false
})
console.warn(
`[ConflictDetection] Python import failure detected for ${packageId}:`,
results.push({
package_id: packageId,
package_name: packageId,
has_conflict: true,
conflicts: [
{
error: errorMsg,
hasTraceback: !!traceback
type: 'import_failed',
current_value: errorMsg,
required_value: fullErrorInfo
}
)
}
],
is_compatible: false
})
console.warn(
`[ConflictDetection] Python import failure detected for ${packageId}:`,
errorMsg
)
}
return results