mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 14:54:12 +00:00
## Summary Address follow-up review feedback from #8740 by consolidating completed-banner thumbnail fields and tightening queue count sanitization. ## Changes - **What**: - Consolidated completed notification thumbnail data to `thumbnailUrls` only by removing legacy `thumbnailUrl` support from the queue banner notification type and renderer. - Updated queue notification banner stories to use `thumbnailUrls` consistently. - Simplified `sanitizeCount` to treat any non-positive or non-number value as the fallback count (`1`). ## Review Focus Confirm the completed notification payload shape is now consistently `thumbnailUrls` and no consumer relies on `thumbnailUrl`. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8880-fix-queue-address-follow-up-review-comments-from-8740-3076d73d365081719a70d860691c5f05) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -23,7 +23,6 @@ type QueueQueuedNotification = {
|
||||
type QueueCompletedNotification = {
|
||||
type: 'completed'
|
||||
count: number
|
||||
thumbnailUrl?: string
|
||||
thumbnailUrls?: string[]
|
||||
}
|
||||
|
||||
@@ -38,7 +37,7 @@ export type QueueNotificationBanner =
|
||||
| QueueFailedNotification
|
||||
|
||||
const sanitizeCount = (value: number | undefined) => {
|
||||
if (value === undefined || Number.isNaN(value) || value <= 0) {
|
||||
if (!(typeof value === 'number' && value > 0)) {
|
||||
return 1
|
||||
}
|
||||
return Math.floor(value)
|
||||
|
||||
Reference in New Issue
Block a user