- 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.
Implements two key features to prevent data loss:
1. Push Warning Button
- Icon button in project header that appears when:
- No remote is configured
- There are commits ahead of remote
- There are uncommitted changes
- Click opens Git dialog for one-click push or remote configuration
- Visual indicators with tooltips showing status
2. Periodic Push Reminder Dialog
- Dismissible popup appears after 5 messages if there's unpushed work
- Shows different content based on git status:
- No remote: Prompts to configure remote
- Commits ahead: Prompts to push
- Uncommitted changes: Prompts to commit and push
- Can be disabled with "Don't show again" checkbox
- Setting in Preferences to re-enable reminders
- Respects 5-minute cooldown between reminders
3. User Preferences
- Added "Push reminders" toggle in Settings > Preferences
- Enabled by default to encourage best practices
- Stored in local storage for persistence
Technical implementation:
- Created usePushReminder hook for state management
- Tracks message count and last interaction timestamp
- Integrates with existing useGitStatus hook
- Added onMessageSent callback to ChatPane
- PushWarningButton component with icon/full variants
- PushReminderDialog with contextual messaging
- Translations added to English locale