Add debug logging and lower threshold for testing push reminders

- Reduced MESSAGE_THRESHOLD from 5 to 2 for easier testing
- Added console.log statements to track:
  - Message counter increments
  - shouldShowReminder checks and conditions
  - Git status (uncommitted changes, commits ahead, remotes)
- Added useEffect to watch shouldShowReminder changes
- Fixed async state update issue by watching effect dependency

This will help debug why the reminder dialog may not be appearing.
This commit is contained in:
shakespeare.diy committed 2025-11-11 13:58:18 -06:00
1 parent 5de01c6130
commit 66a37ec92c
2 files changed
+37 -11

No files matched your search

+5 -3
View File
@@ -113,12 +113,14 @@ export function ProjectView() {
// Handle message sent - increment push reminder counter
const handleMessageSent = useCallback(() => {
pushReminder.incrementMessages();
}, [pushReminder]);
// Check if we should show the reminder
if (pushReminder.shouldShowReminder) {
// Watch for when we should show the reminder (after state updates)
useEffect(() => {
if (pushReminder.shouldShowReminder && !isPushReminderOpen) {
setIsPushReminderOpen(true);
}
}, [pushReminder]);
}, [pushReminder.shouldShowReminder, isPushReminderOpen]);
// Handle first user interaction to enable audio context
const handleFirstInteraction = () => {