Mail Info Box
1. User wants to sync their Gmail inbox
1. User logs into Mimosai (Supabase auth)
2. Taps “Mail” tile → Biometric authentication
3. Taps “Connect Gmail” → Grants OAuth permissions
4. Taps “Sync Emails” → App finds Welcome email, syncs mimosai emails
5. Inbox displays filtered emails (subject contains `[mimosai]` + category)
2. User wants to reply with PDF attachment
1. User taps email in inbox → `MailDetailPage` opens
2. User taps “PDF” button → Progress dialog shows
3. App generates PDF flyer from email content
4. App sends via Gmail API with multipart MIME
5. App stores sent email in Supabase with attachment metadata
6. Success notification → Navigate back to inbox
3. Developer needs to debug “0 emails found”
1. User taps “Diagnostics” button on `MailPage`
2. App runs full diagnostic checks:
– Gmail API access test
– Welcome email search
– Mimosai email count (with/without date filter)
– Database query results
3. Logs show specific failure point
4. Developer fixes issue (e.g., send test email, clear `mail_search_stop`)
4. User logs out and new user logs in
1. User A logs out → `SecureStore.setIsSignedIn(false)`
2. `MailRepository` detects user change in next fetch
3. `clearCache()` called → In-memory data cleared
4. User B logs in → Fresh session
5. User B syncs emails → Only User B’s emails visible (RLS enforced)
