From a7164c0292e8ce936ffa89c1bbb57e6a6d541d0e Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Tue, 11 Nov 2025 14:01:46 -0600 Subject: [PATCH] Fix push reminder not showing - remove initial cooldown The issue was that DEFAULT_STATE set lastInteraction to Date.now(), which meant the 5-minute cooldown started immediately on first load, preventing reminders from ever showing. Changes: - Set initial lastInteraction to 0 instead of Date.now() - Don't reset lastInteraction when switching projects (keep cooldown) - This allows reminders to show immediately after threshold is met Users may need to clear localStorage key 'push-reminder-state' to reset if they already have the old state saved. --- src/hooks/usePushReminder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/usePushReminder.ts b/src/hooks/usePushReminder.ts index 027a8ad9..30307405 100644 --- a/src/hooks/usePushReminder.ts +++ b/src/hooks/usePushReminder.ts @@ -16,7 +16,7 @@ interface PushReminderState { const DEFAULT_STATE: PushReminderState = { enabled: true, messagesSinceLastPush: 0, - lastInteraction: Date.now(), + lastInteraction: 0, // Start at 0 so reminders can show immediately currentProjectId: null, }; @@ -41,7 +41,7 @@ export function usePushReminder(projectId: string | null) { ...prev, currentProjectId: projectId, messagesSinceLastPush: 0, - lastInteraction: Date.now(), + // Don't reset lastInteraction - keep the cooldown across project switches })); } }, [projectId, state.currentProjectId, setState]);