Десктопный почтовый клиент для Linux на базе Electron + Vue 3. ## Почта - Поддержка любых IMAP/SMTP почтовых ящиков (Gmail, Яндекс, Mail.ru и др.) - Несколько аккаунтов одновременно - Треды — группировка писем по переписке - HTML-письма с безопасным рендерингом - Вложения: просмотр и скачивание - Ответ, пересылка, новое письмо в отдельном окне - Поиск по отправителю и теме - Свайп-жесты: удалить / прочитать / флаг ## Уведомления - Системные уведомления о новых письмах - Внутренние тосты - Заглушение папок (временное или постоянное) - Дедупликация — одно уведомление на письмо ## Интерфейс - Liquid glass UI в тёмной теме - Настраиваемый акцентный цвет и масштаб - Кастомные SVG-иконки ## Автообновление - Проверка обновлений через Forgejo Releases при запуске - Загрузка и установка AppImage без участия пользователя - Очистка устаревших .desktop-записей и обновление иконки при каждом запуске ## Прочее - Календарь (CalDAV) - Установка через AppImage без root Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 KiB
Aero Mail — Developer Notes
Agent team
Sub-agents live in .claude/agents/. Use claude --agent <name> or mention the agent in your request.
| Agent | When to use |
|---|---|
architect |
First for any complex/cross-cutting feature: designs IPC contract, data model, plan — before coding starts |
backend |
Main process: IMAP/SMTP, IPC handlers, account-manager, credential-store, CalDAV |
frontend |
Renderer: Vue components, Pinia stores, composables, CSS |
test |
Vitest setup, writing unit/integration tests |
review |
Security audit, code review, performance analysis |
devops |
Build, packaging, electron-builder, CI, auto-update |
Routing heuristic:
- New feature touching IPC or both processes →
architectfirst, thenbackend+frontend - Bug or small change only in
src/main/→backenddirectly - Bug or small change only in
src/renderer/→frontenddirectly - "write tests / fix tests" →
test - "review / audit / check for bugs" →
review - "build / package / CI" →
devops
Stack
Electron 35 + Vue 3 Composition API + Pinia + TypeScript + electron-vite.
IMAP (imapflow) for reading, SMTP (nodemailer) for sending.
No Gmail API / Exchange EWS — IMAP+SMTP only.
Architecture
Three Electron processes: main / preload (contextBridge window.api) / renderer (Vue SPA).
IPC: type-safe invoke (Renderer→Main) + push events (Main→Renderer).
Types live in src/shared/types/ipc.ts.
Key files:
| File | Role |
|---|---|
src/main/index.ts |
Electron entry, window management |
src/main/services/account-manager.ts |
Provider map, IPC routing, auto-reconnect |
src/main/providers/imap.provider.ts |
IMAP+SMTP implementation |
src/renderer/src/stores/messages.store.ts |
Message list, LRU body cache, search |
src/renderer/src/stores/folders.store.ts |
Folder tree, unread counts |
src/shared/types/ipc.ts |
All IPC channels |
IPC event listeners — required cleanup pattern
window.api.on(channel, callback) wraps ipcRenderer.on and returns an unsubscribe function.
If the component that registers a listener can be unmounted (i.e. it lives inside a <router-view>),
the unsubscribe must be called in onUnmounted, otherwise listeners accumulate on every remount.
// CORRECT
let unsub: (() => void) | null = null
onMounted(() => {
unsub = on('mail:new', handler)
})
onUnmounted(() => {
unsub?.()
})
// BUG — listener survives unmount, fires N times after N navigations
onMounted(() => {
on('mail:new', handler) // return value discarded
})
Pinia store setup functions run once (singleton) — on() calls inside them do not need cleanup.
Background: NotificationContainer.vue had this bug. It is mounted inside MailView which unmounts
on every route change (→ Settings, → Calendar). Each remount registered a new mail:new listener,
causing duplicate OS push notifications per incoming email.
Fixed in commit on branch feature/fix-notifications.
New-mail notification flow
IMAP exists event
→ ImapProvider.pollSingleFolder()
└→ pollFolderTree() ← dedup via lastUnseenCount + notifiedUids (5 min TTL)
App.vue poll timer (autoCheckInterval)
→ messages:poll IPC
└→ AccountManager.pollNewMessages()
└→ ImapProvider.pollFolderTree() ← same dedup
Both paths → newMailCallback → main sends mail:new IPC → renderer
→ NotificationContainer: OS Notification + in-app toast
→ messages.store: insert envelope, update unread count
Dedup keys in ImapProvider: "folderPath:uid", TTL 5 min. lastUnseenCount is updated
before acquiring the mailbox lock, so concurrent runs of pollFolderTree for the same folder
see the updated count and skip the second notification.
Folder mute
notifications.store.ts stores muted folders in localStorage (muted-folders key).
Mute is per accountId:folderId, supports duration (ms) or permanent (null).
Mute check walks up the folder parent chain — muting a parent silences all children.