From 35168a3ff226d870b5de514afa0989dbdb7e31d2 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Wed, 18 Mar 2026 16:08:01 +0100 Subject: [PATCH] fix --- packages/kilo-vscode/src/KiloProvider.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index 846f14ee388..c7e42d59138 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -1426,7 +1426,11 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper const notifications = all.filter((n) => !n.showIn || n.showIn.includes("extension")) const existing = this.extensionContext?.globalState.get("kilo.dismissedNotificationIds", []) ?? [] const active = new Set(notifications.map((n) => n.id)) - const dismissedIds = existing.filter((id) => active.has(id)) + // Only prune stale dismissed IDs when we have a non-empty notification + // list. An empty list may mean the API returned nothing due to being + // unauthenticated (e.g. right after logout), not that all notifications + // are gone — pruning in that case would wipe the persisted dismissals. + const dismissedIds = notifications.length > 0 ? existing.filter((id) => active.has(id)) : existing if (dismissedIds.length !== existing.length) { await this.extensionContext?.globalState.update("kilo.dismissedNotificationIds", dismissedIds) }