Add Gmail debug email functionality

- GmailService: add get_or_create_label() and inject_debug_email() methods
- providers.py: add POST /providers/gmail/debug-email endpoint
- api.ts: add GmailDebugEmailResponse interface and gmailApi.sendDebugEmail()
- settings/page.tsx: add Send Debug Email button with success/error feedback
- Update CHANGELOG.md and docs/TODO.md

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/c609ede7-b9d7-4ab1-acdb-8d29164066cc
This commit is contained in:
copilot-swe-agent[bot]
2026-03-25 23:00:47 +00:00
parent a0e8f07328
commit 5c40415590
6 changed files with 277 additions and 28 deletions
+13
View File
@@ -126,6 +126,13 @@ export interface GmailCredential {
updated_at: string;
}
export interface GmailDebugEmailResponse {
message: string;
message_id: string | null;
thread_id: string | null;
label_ids: string[];
}
export interface UserSmtpConfig {
id: number;
user_id: number;
@@ -303,6 +310,12 @@ export const gmailApi = {
async disconnect(): Promise<void> {
await api.delete('/providers/gmail-credential');
},
/** Inject a debug test email into the user's Gmail inbox. */
async sendDebugEmail(): Promise<GmailDebugEmailResponse> {
const response = await api.post<GmailDebugEmailResponse>('/providers/gmail/debug-email');
return response.data;
},
};
// ── SMTP Config API ─────────────────────────────────────────────────────