Skip to content

The agent that grows with you

fix(desktop): keep agent tips out of the persisted seen ledger

teknium19c12b9808c65
diff --git a/apps/desktop/src/store/tips.test.ts b/apps/desktop/src/store/tips.test.ts
index 1eb5227e11c..9404e810ade 100644
--- a/apps/desktop/src/store/tips.test.ts
+++ b/apps/desktop/src/store/tips.test.ts
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, it } from 'vitest'
-import { $activeTip, $retiredTips, agentTipId, dismissTip, resetTips, retireActiveTip, showTip } from './tips'
+import { $activeTip, $retiredTips, $tipShownAt, agentTipId, dismissTip, resetTips, retireActiveTip, showTip } from './tips'
const showAgentTip = (selector: string, text: string) => {
showTip({
@@ -28,14 +28,7 @@ describe('agent tip retirement', () => {
expect(tipId).not.toContain('Choose a model here.')
expect($retiredTips.get()).toContain(tipId)
expect($activeTip.get()).toBeNull()
- })
-
- it('keeps distinct agent tips independently dismissible', () => {
- showAgentTip('[data-tour="model-pill"]', 'Choose a model here.')
- retireActiveTip()
-
- showAgentTip('[data-tour="composer"]', 'Write your prompt here.')
-
- expect($activeTip.get()?.tipId).toBe(agentTipId('[data-tour="composer"]', 'Write your prompt here.'))
+ // Only the ✕ persists for agent tips; the seen ledger stays catalog-only.
+ expect($tipShownAt.get()).toEqual({})
})
})
diff --git a/apps/desktop/src/store/tips.ts b/apps/desktop/src/store/tips.ts
index 40739b3b735..cb62e7b6027 100644
--- a/apps/desktop/src/store/tips.ts
+++ b/apps/desktop/src/store/tips.ts
@@ -146,7 +146,11 @@ export function showTip(tip: ActiveTip): void {
$lastTipId.set(tip.tipId)
}
- $tipShownAt.set({ ...$tipShownAt.get(), [tip.tipId]: Date.now() })
+ // Agent tips are unbounded in number and only need the ✕ to persist; keep
+ // them out of the seen ledger so a chatty agent cannot grow localStorage.
+ if (!tip.tipId.startsWith('agent:')) {
+ $tipShownAt.set({ ...$tipShownAt.get(), [tip.tipId]: Date.now() })
+ }
}
// Any tip starts the cooldown, an agent's included: whoever just pointed at