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