feat(onboarding): pre-auth Outlook IMAP-enablement screen (help/settings links + Sign In) #426

Merged
JMR-dev merged 2 commits from feat-411-outlook-imap-onboarding into main 2026-07-08 04:28:28 +00:00
JMR-dev commented 2026-07-08 03:42:55 +00:00 (Migrated from github.com)

Summary

Implements #411: a proactive pre-auth interstitial shown when the user taps Outlook during onboarding, before the Microsoft OAuth browser launches. New personal outlook.com accounts ship with IMAP OFF by default, so OAuth succeeds while the later IMAP AUTHENTICATE step fails — a confusing dead-end. (#390 is the reactive complement.)

The screen:

  • Asks "Have you enabled IMAP for your Outlook account?" with a short why-we-need-it explanation.
  • Links Microsoft's canonical "POP, IMAP, and SMTP settings for Outlook.com" help article and the Outlook.com IMAP settings page (opened via UriHandler / Custom Tab).
  • Puts a "Sign in" button at the bottom that continues the existing Outlook OAuth (AppAuth) flow, unchanged.

Changes

  • New OutlookImapNoticeScreen (onboarding package), Material 3, reusing the picker's exact AppAuth launch wiring via AccountSetupViewModel.
  • AccountPickerScreen gains an optional onPickOutlook callback: onboarding routes the Outlook tap to the notice; the standalone "Add account" entry still launches auth inline (unchanged, Outlook-only scope per the issue).
  • New ONBOARDING_OUTLOOK_IMAP route; onboarding setup-form destinations extracted into onboardingSetupDestinations() for readability.
  • PII-free AppLog breadcrumbs: notice shown, help/settings link tapped, sign-in continued.

Finalized URLs

  • Help article: https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040 (verified 2026-07)
  • IMAP settings deep link: https://outlook.live.com/mail/0/options/mail/accounts/popImap (help article is the durable fallback if the options path changes)

Tests

  • Robolectric JVM Compose test (OutlookImapNoticeScreenJvmTest, 10 tests): renders the IMAP question + both links + Sign in; tapping Sign in invokes the auth continuation; tapping the help/settings links fires the intent; done/error/busy/open-failed branches. Plus a delegation test added to AccountPickerScreenJvmTest.
  • Instrumented E2E (OutlookImapNoticeScreenTest): Espresso-Intents assert the help ACTION_VIEW launch and the AppAuth sign-in launch (no real browser opens). OnboardingFlowTest gains a picker -> notice navigation test.

Local gate (all green)

assembleDebug, testDebugUnitTest, jacocoTestCoverageVerification (0.84 floor held), compileDebugAndroidTestKotlin, lintDebug, ktlintCheck, detekt. Instrumented/E2E validated by CI's matrix (local emulators unavailable) — compiles clean.

Closes #411

## Summary Implements #411: a **proactive** pre-auth interstitial shown when the user taps **Outlook** during onboarding, *before* the Microsoft OAuth browser launches. New personal outlook.com accounts ship with **IMAP OFF by default**, so OAuth succeeds while the later IMAP `AUTHENTICATE` step fails — a confusing dead-end. (#390 is the reactive complement.) The screen: - Asks **"Have you enabled IMAP for your Outlook account?"** with a short why-we-need-it explanation. - Links Microsoft's canonical **"POP, IMAP, and SMTP settings for Outlook.com"** help article and the **Outlook.com IMAP settings** page (opened via `UriHandler` / Custom Tab). - Puts a **"Sign in"** button at the **bottom** that continues the **existing** Outlook OAuth (AppAuth) flow, unchanged. ## Changes - **New `OutlookImapNoticeScreen`** (onboarding package), Material 3, reusing the picker's exact AppAuth launch wiring via `AccountSetupViewModel`. - **`AccountPickerScreen`** gains an optional `onPickOutlook` callback: onboarding routes the Outlook tap to the notice; the standalone **"Add account"** entry still launches auth inline (unchanged, Outlook-only scope per the issue). - New `ONBOARDING_OUTLOOK_IMAP` route; onboarding setup-form destinations extracted into `onboardingSetupDestinations()` for readability. - **PII-free `AppLog` breadcrumbs**: notice shown, help/settings link tapped, sign-in continued. ## Finalized URLs - Help article: `https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040` (verified 2026-07) - IMAP settings deep link: `https://outlook.live.com/mail/0/options/mail/accounts/popImap` (help article is the durable fallback if the options path changes) ## Tests - **Robolectric JVM Compose test** (`OutlookImapNoticeScreenJvmTest`, 10 tests): renders the IMAP question + both links + Sign in; tapping Sign in invokes the auth continuation; tapping the help/settings links fires the intent; done/error/busy/open-failed branches. Plus a delegation test added to `AccountPickerScreenJvmTest`. - **Instrumented E2E** (`OutlookImapNoticeScreenTest`): Espresso-Intents assert the help `ACTION_VIEW` launch and the AppAuth sign-in launch (no real browser opens). `OnboardingFlowTest` gains a picker -> notice navigation test. ## Local gate (all green) `assembleDebug`, `testDebugUnitTest`, `jacocoTestCoverageVerification` (0.84 floor held), `compileDebugAndroidTestKotlin`, `lintDebug`, `ktlintCheck`, `detekt`. Instrumented/E2E validated by CI's matrix (local emulators unavailable) — compiles clean. Closes #411
mergify[bot] commented 2026-07-08 04:09:05 +00:00 (Migrated from github.com)

Merge Queue Status

  • ✅ Entered queue — 2026-07-08 04:09 UTC · Rule: default · triggered by merge protections
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-07-08 04:28 UTC · at 410e742b2019d7cc7590bb0571c93a9ade2808d6 · merge

This pull request spent 19 minutes 24 seconds in the queue, including 19 minutes 14 seconds running CI.

Required conditions to merge
<!--- DO NOT EDIT -*- Mergify Payload -*- {"version": 1, "state": "merged", "queue_rule_name": "default", "queued_at": "2026-07-08T04:09:04.451022+00:00", "estimated_time_of_merge": null, "speculative_check_pr": null, "required_conditions": []} -*- Mergify Payload End -*- --> # Merge Queue Status - ✅ **Entered queue** — `2026-07-08 04:09 UTC` · Rule: `default` · triggered by merge protections - ✅ **Checks passed** · in-place - ✅ **Merged** — `2026-07-08 04:28 UTC` · at `410e742b2019d7cc7590bb0571c93a9ade2808d6` · merge This pull request spent **19 minutes 24 seconds** in the queue, including **19 minutes 14 seconds** running CI. <details> <summary>Required conditions to merge</summary> - `-conflict` - [X] #426 - `-draft` - [X] #426 - [X] `base = main` - [X] `check-success = CI passed` - `github-review-approved` [🛡 GitHub repository ruleset rule `main`] - [X] #426 - `label != broken` - [X] #426 - [X] any of [🛡 GitHub branch protection]: - [X] `check-success = Debug build` - [ ] `check-neutral = Debug build` - [ ] `check-skipped = Debug build` - [X] any of [🛡 GitHub branch protection]: - [X] `check-success = Unit tests` - [ ] `check-neutral = Unit tests` - [ ] `check-skipped = Unit tests` - [X] any of [🛡 GitHub branch protection]: - [X] `check-success = CI passed` - [ ] `check-neutral = CI passed` - [ ] `check-skipped = CI passed` - [X] any of [🛡 GitHub repository ruleset rule `main`]: - [X] `check-success = @github-actions/CI passed` - [ ] `check-neutral = @github-actions/CI passed` - [ ] `check-skipped = @github-actions/CI passed` </details>
Sign in to join this conversation.