feat(email): on-demand attachment download, search clear, per-category read prefs

- Download search-result attachments on demand before opening (fixes Linux
  where xdg-open reports success on a missing file so the old open-then-
  download fallback never fired)
- Add a clear button to the search box that dismisses search and returns to
  the inbox
- Remove the read toggle from the Important section
- Replace the Everything else "Read" toggle with a "Mark as read" preference:
  turning it on marks all current and future "Everything else" mail read;
  turning it off only stops auto-reading future mail, leaving current threads
  untouched
This commit is contained in:
hrsvrn 2026-07-01 23:51:08 +05:30
parent ab9bce6203
commit 063f6892a8
7 changed files with 269 additions and 50 deletions

View file

@ -107,6 +107,10 @@ export const GmailAttachmentSchema = z.object({
mimeType: z.string().optional(),
sizeBytes: z.number().int().nonnegative().optional(),
savedPath: z.string(),
// Gmail identifiers used to fetch the attachment on demand when it hasn't
// been downloaded to disk yet (e.g. attachments on search results).
messageId: z.string().optional(),
attachmentId: z.string().optional(),
});
export type GmailAttachment = z.infer<typeof GmailAttachmentSchema>;