mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
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