feat(email): add provider picker to Settings > Account
b5 of the multi-provider email roadmap (frontend). Adds EmailProviderConnections -- one card per provider (Gmail, Outlook/Microsoft 365, generic IMAP) showing connect status and connect/disconnect actions, mounted in SettingsView's Account tab alongside the existing app-login GoogleAuthCard (a separate concern: that card is sign-in identity, this is mailbox linking). Gmail and Microsoft reuse the OAuth-popup + postMessage handshake already built server-side (mirrors Correspondence.tsx's existing Gmail-connect flow). IMAP has no OAuth step, so it's a plain host/port/ssl/username/password form posting to /api/imap/connect, which verifies the connection server-side before storing it. Deliberately NOT touched: the Gmail-specific job-candidate-matching/review UI in Correspondence.tsx and GmailReviewPage.tsx. That backend pipeline (ListJobCandidateMessagesAsync, GmailReviewDecisions) is still Gmail-only by design -- generalising it now would mean building fake UI for capabilities Microsoft/IMAP don't have yet. This is scoped to the piece that's actually provider-neutral: connect/disconnect status. Verified live (backend + frontend dev servers): logged in, confirmed all three /status calls return 200, Gmail connect-url fetch succeeds, IMAP form submit hits /api/imap/connect and surfaces the expected 400 on a bad host. Frontend suite: 25 suites / 57 tests green (2 new). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import { useNavigate } from "react-router-dom";
|
||||
import { JobTableColumns } from "./JobTable";
|
||||
import ImportExportJobs from "./ImportExportJobs";
|
||||
import GoogleAuthCard from "./GoogleAuthCard";
|
||||
import EmailProviderConnections from "./EmailProviderConnections";
|
||||
import RulesSettingsCard from "./RulesSettingsCard";
|
||||
import BackupCard from "./BackupCard";
|
||||
import QuickCaptureCard from "./QuickCaptureCard";
|
||||
@@ -338,6 +339,9 @@ export default function SettingsView({
|
||||
<TabPanel value={tab} index={3}>
|
||||
<AuthStatusCard />
|
||||
<GoogleAuthCard />
|
||||
<Box sx={{ mt: 2 }}>
|
||||
<EmailProviderConnections />
|
||||
</Box>
|
||||
</TabPanel>
|
||||
|
||||
<TabPanel value={tab} index={4}>
|
||||
|
||||
Reference in New Issue
Block a user