From 88b720ebb43830ee866ad609998e0e9e59cf07cc Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 3 Jul 2026 00:45:15 -0500 Subject: [PATCH] fix(desktop): use gift codicon for update-available toast Add optional notification icon override and use codicon-gift on the update-ready toast so it reads as a present rather than generic info. --- apps/desktop/src/components/notifications.tsx | 6 +++++- apps/desktop/src/store/notifications.ts | 4 ++++ apps/desktop/src/store/updates.test.ts | 1 + apps/desktop/src/store/updates.ts | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/components/notifications.tsx b/apps/desktop/src/components/notifications.tsx index 80429678d3d..ad260d6e039 100644 --- a/apps/desktop/src/components/notifications.tsx +++ b/apps/desktop/src/components/notifications.tsx @@ -116,7 +116,11 @@ function NotificationItem({ notification }: { notification: AppNotification }) { role={notification.kind === 'error' ? 'alert' : 'status'} variant="default" > - + {notification.icon ? ( + + ) : ( + + )}
{notification.title && {notification.title}} diff --git a/apps/desktop/src/store/notifications.ts b/apps/desktop/src/store/notifications.ts index b80f7861003..38f880c291e 100644 --- a/apps/desktop/src/store/notifications.ts +++ b/apps/desktop/src/store/notifications.ts @@ -12,6 +12,8 @@ export interface NotificationAction { export interface AppNotification { id: string kind: NotificationKind + /** When set, renders this codicon instead of the default kind icon. */ + icon?: string title?: string message: string detail?: string @@ -23,6 +25,7 @@ export interface AppNotification { interface NotificationInput { id?: string kind?: NotificationKind + icon?: string title?: string message: string detail?: string @@ -107,6 +110,7 @@ export function notify(input: NotificationInput): string { const notification: AppNotification = { id, kind, + icon: input.icon, title: input.title, message: input.message, detail: input.detail, diff --git a/apps/desktop/src/store/updates.test.ts b/apps/desktop/src/store/updates.test.ts index 5ecb9c52c8e..c2f5831bc55 100644 --- a/apps/desktop/src/store/updates.test.ts +++ b/apps/desktop/src/store/updates.test.ts @@ -79,6 +79,7 @@ describe('maybeNotifyUpdateAvailable', () => { it('shows when an update is available and not snoozed', () => { maybeNotifyUpdateAvailable(status()) expect(notifySpy).toHaveBeenCalledTimes(1) + expect(notifySpy.mock.calls[0]?.[0]).toMatchObject({ icon: 'gift' }) }) it('stays quiet for new commits once the toast was closed', () => { diff --git a/apps/desktop/src/store/updates.ts b/apps/desktop/src/store/updates.ts index 5efe6477131..f9e76333c63 100644 --- a/apps/desktop/src/store/updates.ts +++ b/apps/desktop/src/store/updates.ts @@ -185,6 +185,7 @@ export function maybeNotifyUpdateAvailable(status: DesktopUpdateStatus | null) { } }, durationMs: 0, + icon: 'gift', id: UPDATE_TOAST_ID, kind: 'info', message: translateNow('notifications.updateReadyMessage', behind),