ADR 0034: Connected services table and folder filing
Status
Accepted
Context
Accounts rendered each mailbox as a large card, with separate Connect Microsoft, Connect Gmail, and Connect iCloud controls. Mail already shows a folder tree (MAIL-236). A folder did not name its storing account on the row, and classification wrote triage attention without filing the message into that folder. MAIL-241 remains the Microsoft-target migration plan.
Decision
- Connected services are a table. Each row shows the service and an x that removes that service only. Removal deletes that account's stored credential and marks the account disconnected. A second connected account, including a second iCloud address, stays. Reconnecting the same identity shows the row again. iCloud stays read-write.
- A plus control opens one provider selector. The choices are a list: Gmail, iCloud, and Microsoft 365 / Office 365. Another provider is another entry in that list, not a new card on Accounts. iCloud is one entry. After it is chosen, connect is still the IMAP app-specific password step (ADR 0030). Gmail and Microsoft stay OAuth.
- Folders stay hierarchical. Each folder row names the connected account that stores it. Saving a standardized folder writes that name on that account. It does not write the Microsoft-target migration plan.
- Filing a classified message places it in the selected hierarchical folder on the account that stores the folder. The classifier does not call a provider adapter and does not change triage attention counts from MAIL-233.
Alternatives
- Keep iCloud as its own card — rejected; it is one provider in the same list.
- Replace IMAP with iCloud OAuth — rejected by ADR 0030.
- Save standardized names into the MAIL-241 migration plan — rejected; that plan stays the Microsoft target.
- Let classification call a provider adapter — rejected; AI must not call adapters.
Consequences
Accounts and Mail change together. ENABLE_SEND and ENABLE_DELETE stay off. Preview environment variables are unchanged.
