feat(accountsetup): add iCloud app-password/2FA help in onboarding #180

Merged
JMR-dev merged 2 commits from feat-153-icloud-onboarding-help into main 2026-07-03 00:08:34 +00:00
JMR-dev commented 2026-07-02 23:34:39 +00:00 (Migrated from github.com)

Summary

iCloud's guided app-password setup screen previously gave noticeably less help than Gmail's: it linked only a generic Apple ID sign-in page and had no two-factor-authentication help link at all, even though Apple requires two-factor authentication before it will issue an app-specific password.

  • MailProvider.ICLOUD.appPasswordHelpUrl now points at Apple's actual app-specific-password instructions (https://support.apple.com/en-us/102654) instead of the generic appleid.apple.com landing page.
  • MailProvider.ICLOUD.twoFactorHelpUrl is now set to Apple's dedicated two-factor-authentication article (https://support.apple.com/en-us/102660). The existing generic "2FA help" button in AppPasswordSetupScreen.kt already renders whenever twoFactorHelpUrl is non-null, so iCloud picks it up automatically, positioned before the app-password button — the same ordering Gmail uses (#152).
  • Added a new string, app_password_2fa_help_icloud = "How to turn on Two-Factor Authentication", so the button reads naturally in Apple's own terminology instead of Google's "2-Step Verification". A small twoFactorHelpLabel(provider) helper in AppPasswordSetupScreen.kt picks the right label per provider.
  • Both URLs were verified live against Apple's support site: 102654 explicitly states the two-factor prerequisite and covers the app-specific-password creation steps; 102660 is Apple's dedicated 2FA setup article — mirroring Gmail's split between an app-passwords page and a separate 2-Step-Verification article, rather than pointing both buttons at one combined page.
  • Updated stale comments/KDoc that said this prerequisite was Gmail-only, updated MailProviderTest to assert the new URLs, and added OnboardingFlowTest#icloudSetup_hasTwoFactorHelpLink (mirroring the existing Yahoo/Gmail coverage) plus a stronger no-link assertion in the Yahoo test.

Closes #153

Test plan

  • Local gate (JDK 21): assembleDebug, testDebugUnitTest (475 tests, 0 failures), lintDebug, ktlintCheck, detekt, compileDebugAndroidTestKotlin — all green.
  • New/updated MailProviderTest cases pin the exact iCloud URLs.
  • New OnboardingFlowTest#icloudSetup_hasTwoFactorHelpLink compiles (androidTest E2E is run by CI, not locally, per repo convention).

🤖 Generated with Claude Code

## Summary iCloud's guided app-password setup screen previously gave noticeably less help than Gmail's: it linked only a generic Apple ID sign-in page and had no two-factor-authentication help link at all, even though Apple requires two-factor authentication before it will issue an app-specific password. - `MailProvider.ICLOUD.appPasswordHelpUrl` now points at Apple's actual app-specific-password instructions (`https://support.apple.com/en-us/102654`) instead of the generic `appleid.apple.com` landing page. - `MailProvider.ICLOUD.twoFactorHelpUrl` is now set to Apple's dedicated two-factor-authentication article (`https://support.apple.com/en-us/102660`). The existing generic "2FA help" button in `AppPasswordSetupScreen.kt` already renders whenever `twoFactorHelpUrl` is non-null, so iCloud picks it up automatically, positioned before the app-password button — the same ordering Gmail uses (#152). - Added a new string, `app_password_2fa_help_icloud` = "How to turn on Two-Factor Authentication", so the button reads naturally in Apple's own terminology instead of Google's "2-Step Verification". A small `twoFactorHelpLabel(provider)` helper in `AppPasswordSetupScreen.kt` picks the right label per provider. - Both URLs were verified live against Apple's support site: 102654 explicitly states the two-factor prerequisite and covers the app-specific-password creation steps; 102660 is Apple's dedicated 2FA setup article — mirroring Gmail's split between an app-passwords page and a separate 2-Step-Verification article, rather than pointing both buttons at one combined page. - Updated stale comments/KDoc that said this prerequisite was Gmail-only, updated `MailProviderTest` to assert the new URLs, and added `OnboardingFlowTest#icloudSetup_hasTwoFactorHelpLink` (mirroring the existing Yahoo/Gmail coverage) plus a stronger no-link assertion in the Yahoo test. Closes #153 ## Test plan - [x] Local gate (JDK 21): `assembleDebug`, `testDebugUnitTest` (475 tests, 0 failures), `lintDebug`, `ktlintCheck`, `detekt`, `compileDebugAndroidTestKotlin` — all green. - [x] New/updated `MailProviderTest` cases pin the exact iCloud URLs. - [x] New `OnboardingFlowTest#icloudSetup_hasTwoFactorHelpLink` compiles (androidTest E2E is run by CI, not locally, per repo convention). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.