Files
vibe-kanban/crates
Alex Netsch c100b12ee9 Perfect! The fix is now implemented. Here's what the change does: (#618)
## What the fix accomplishes:

1. **Captures the current state** before updating the config
2. **Detects when analytics is newly enabled** - when it changes from `None` (first-time) or `false` (previously disabled) to `true`
3. **Immediately sends `session_start`** for that current session when analytics is enabled

## Now the flow works correctly:

**First-time user:**
- App starts (no session_start - analytics not enabled yet)
- User sees privacy dialog, clicks "Yes"
- Config updated with `analytics_enabled: true`
- **session_start event fires immediately** ✓
- All subsequent events in that session have proper session context

**Returning user (already opted in):**
- App starts → session_start fires from main.rs ✓
- Normal session tracking continues

**User re-enabling analytics:**
- User toggles analytics back on in Settings
- **session_start event fires immediately** ✓
- Session tracking resumes

This ensures every analytics session has a `session_start` event without sending any events before user consent!
2025-09-03 18:22:42 +01:00
..
2025-09-03 12:49:53 +01:00
2025-09-03 10:27:17 +00:00
2025-09-03 10:27:17 +00:00