- Added scope-aware Gmail status via gmail:getConnectionStatus, so the email empty state can

distinguish “not connected” from “connected but missing new Gmail scope.”
  - Hardened Gmail send header construction against CR/LF header injection.
  - Switched MIME parts from invalid UTF-8 7bit bodies to base64-encoded UTF-8 parts.
  - Made forward send as a new message instead of attaching it to the original thread, and included
    forwarded message content.
  - Changed archive/delete UI behavior to remove the thread only after Gmail confirms success.
This commit is contained in:
Arjun 2026-05-23 10:01:58 +05:30
parent 3a27c2ebd6
commit 54374fbc4c
5 changed files with 210 additions and 77 deletions

View file

@ -150,7 +150,7 @@ const ipcSchemas = {
},
'gmail:sendReply': {
req: z.object({
threadId: z.string().min(1),
threadId: z.string().min(1).optional(),
to: z.string().min(1),
cc: z.string().optional(),
bcc: z.string().optional(),
@ -165,6 +165,15 @@ const ipcSchemas = {
error: z.string().optional(),
}),
},
'gmail:getConnectionStatus': {
req: z.object({}),
res: z.object({
connected: z.boolean(),
hasRequiredScope: z.boolean(),
missingScopes: z.array(z.string()),
email: z.string().nullable(),
}),
},
'gmail:getAccountEmail': {
req: z.object({}),
res: z.object({