fix: address CodeRabbit review - add toast notifications and remove todo.md

- Add toast notifications for asset validation errors (surfacing to user)
- Add i18n translations for invalidAsset and invalidFilename errors
- Remove todo.md that was accidentally committed

Amp-Thread-ID: https://ampcode.com/threads/T-019c0c78-3249-72eb-9c45-0db1bf7067d6
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Subagent 5
2026-01-29 17:42:44 -08:00
parent 5223f27de6
commit 49bc21c764
3 changed files with 19 additions and 34 deletions

View File

@@ -2499,6 +2499,10 @@
"errorUnsafePickleScan": "CivitAI detected potentially unsafe code in this file",
"errorUnsafeVirusScan": "CivitAI detected malware or suspicious content in this file",
"errorUploadFailed": "Failed to import asset. Please try again.",
"invalidAsset": "Invalid Asset",
"invalidAssetDetail": "The selected asset could not be validated. Please try again.",
"invalidFilename": "Invalid Filename",
"invalidFilenameDetail": "The asset filename could not be determined. Please try again.",
"failedToCreateNode": "Failed to create node. Please try again or check console for details.",
"fileFormats": "File formats",
"fileName": "File Name",

View File

@@ -9,6 +9,7 @@ import {
assetFilenameSchema,
assetItemSchema
} from '@/platform/assets/schemas/assetSchema'
import { useToastStore } from '@/platform/updates/common/toastStore'
import { getAssetFilename } from '@/platform/assets/utils/assetMetadataUtils'
interface CreateAssetWidgetParams {
@@ -45,6 +46,8 @@ export function createAssetWidget(
const assetBrowserDialog = useAssetBrowserDialog()
async function openModal(widget: IBaseWidget) {
const toastStore = useToastStore()
await assetBrowserDialog.show({
nodeType: nodeTypeForBrowser,
inputName: widgetName,
@@ -59,6 +62,12 @@ export function createAssetWidget(
'Received:',
asset
)
toastStore.add({
severity: 'error',
summary: t('assetBrowser.invalidAsset'),
detail: t('assetBrowser.invalidAssetDetail'),
life: 5000
})
return
}
@@ -72,6 +81,12 @@ export function createAssetWidget(
'for asset:',
validatedAsset.data.id
)
toastStore.add({
severity: 'error',
summary: t('assetBrowser.invalidFilename'),
detail: t('assetBrowser.invalidFilenameDetail'),
life: 5000
})
return
}

34
todo.md
View File

@@ -1,34 +0,0 @@
# Bug Description
When using a primitive node to select a model, this causes an issue specifically on Comfy Cloud. The issue does not appear to occur in the local version.
## Context
This bug was reported in the #frontend-bug-dump channel with reference links to Slack thread discussions:
- https://comfy-organization.slack.com/archives/C07RCREPL67/p1767751867519549?thread_ts=1767751129.592359&cid=C07RCREPL67
- https://comfy-organization.slack.com/archives/C07RCREPL67/p1767752100115359?thread_ts=1767751129.592359&cid=C07RCREPL67
## Reproduction
The issue is triggered when a model is selected by a primitive node in workflows running on the cloud.
## Expected Behavior
Model selection via primitive nodes should work consistently between local and cloud environments.
## Actual Behavior
An issue occurs on cloud when using primitive nodes for model selection.
## Additional Information
### Related Bug Ticket
Another bug ticket was created here: https://comfy-organization.slack.com/archives/C09FY39CC3V/p1767753991406309?thread_ts=1767734275.051999&cid=C09FY39CC3V
### Updated Reproduction Details
**Important:** This workflow didn't include any primitive nodes, but still caused the same issue. This indicates the problem is not limited to primitive nodes as originally thought.
**Affected Workflow File:** video*ltx2*t2v_distilled.json (provided in Slack thread)