fix(queue): address follow-up review comments from #8740 (#8880)

## 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:
Benjamin Lu
2026-02-17 21:26:02 -08:00
committed by GitHub
parent 1349fffbce
commit 34e21f3267
3 changed files with 3 additions and 9 deletions

View File

@@ -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)