Update REFACTOR_PLAN.md tree view and few features to TODO.md

This commit is contained in:
2026-10-17 00:05:37 +03:00
parent 82d2f677aa
commit 1ef934045f
2 changed files with 29 additions and 16 deletions
+21 -10
View File
@@ -13,21 +13,32 @@ Improve the maintainability and auditability of ep-mail without changing its pro
- Existing tests focus mainly on OpenPGP and attachments; IPC, storage, and mail workflow boundaries need more coverage. - Existing tests focus mainly on OpenPGP and attachments; IPC, storage, and mail workflow boundaries need more coverage.
- The web content is sanitized and remote images are approval-gated. Preserve and add regression coverage for these protections. - The web content is sanitized and remote images are approval-gated. Preserve and add regression coverage for these protections.
## Target boundaries ## Current boundaries and target direction
```text ```text
desktop/ desktop/
main.cjs # Electron startup and lifecycle main.cjs, preload.cjs # Electron startup, lifecycle, narrow bridge
ipc/ # Request validation and handler registration ipc/ # Mail, DAV, and OpenPGP handler registrars
mail/ # Account, IMAP, SMTP, sync, outbox, message mapping mail/ # IMAP/SMTP, sync, outbox, snooze, attachments
dav/ # DAV services and iCalendar/vCard codecs dav/ # DAV remote-reference validation
security/ # Secure storage and shared boundary validation security/ # IPC sender and request validation
pgp/ # OpenPGP services (existing focused modules) pgp-*.cjs # OpenPGP key, mail, and key-server services
renderer/ account-store.cjs # Account-record migration
app/ mail/ accounts/ dav/ pgp/ shared/ secure-json-store.cjs # Encrypted JSON persistence
mail-*.cjs, dav-codecs.cjs # Mail models, content projection, DAV codecs
index.html # Shared desktop/browser/Capacitor entry point
app.js, *-ui.js, *.css # Shared renderer sources (canonical)
renderer-state.js # Shared namespaced renderer state
renderer-mail-api.js # Shared renderer feature API factory
mail-content-security.js # HTML sanitizer and remote-image policy
platform-bridge.js # Generated platform bridge
www/ # Generated Capacitor web assets; do not edit
scripts/prepare-android-web.cjs # Copies root web assets into www/
``` ```
This is a gradual destination, not a requirement to move everything at once. IPC modules should validate and translate renderer requests, then call services. Services should not depend on Electron IPC or window objects. Pass dependencies such as storage, network clients, clocks, and notification callbacks explicitly where practical. Keep the shared renderer outside `desktop/`: Electron, the browser build, and Android all use these web sources. The root files are canonical and `www/` is generated. Desktop service boundaries are reflected by the existing `desktop/ipc/`, `desktop/mail/`, `desktop/dav/`, and `desktop/security/` directories.
IPC modules should validate and translate renderer requests, then call services. Services should not depend on Electron IPC or window objects. Pass dependencies such as storage, network clients, clocks, and notification callbacks explicitly where practical. A future move of shared UI sources into a dedicated `renderer/` directory is optional, not required for this plan; it would need coordinated updates to `index.html` script/style URLs, Electron Builder file inclusion, Android copying, service-worker precache paths, and asset-parity tests.
## Steps and acceptance criteria ## Steps and acceptance criteria
+8 -6
View File
@@ -12,7 +12,7 @@
## Mail workflow ## Mail workflow
- [x] Snooze messages until a chosen time and show a follow-up reminder when they return. - [x] Snooze messages until a chosen time and show a follow-up reminder when they return.
- [ ] Add Undo Send and scheduled sending. - [ ] Add a configurable Undo Send delay and scheduled sending.
- [x] Improve mail search with sender, subject, date, folder, and attachment filters. - [x] Improve mail search with sender, subject, date, folder, and attachment filters.
- [x] Cache recent messages and save drafts offline; queue supported sends and message actions for retry when connectivity returns. - [x] Cache recent messages and save drafts offline; queue supported sends and message actions for retry when connectivity returns.
- [ ] Group related messages into conversations, with controls to expand or collapse threads. - [ ] Group related messages into conversations, with controls to expand or collapse threads.
@@ -31,13 +31,14 @@
- [x] Phase 2: receive — detect PGP/MIME and inline PGP mail, decrypt on open, verify signatures, show encryption/signature status, handle missing keys and wrong passphrases. - [x] Phase 2: receive — detect PGP/MIME and inline PGP mail, decrypt on open, verify signatures, show encryption/signature status, handle missing keys and wrong passphrases.
- [x] Phase 3: send — public-key keyring and key import from contacts/messages, encrypt and sign when composing, encrypted copy in Sent, warn instead of silently downgrading. - [x] Phase 3: send — public-key keyring and key import from contacts/messages, encrypt and sign when composing, encrypted copy in Sent, warn instead of silently downgrading.
- [x] Phase 4 (desktop): trust levels and fingerprint verification, key-change warnings, passphrase cache timeout. - [x] Phase 4 (desktop): trust levels and fingerprint verification, key-change warnings, passphrase cache timeout.
- [ ] Phase 4 (Android): Android Keystore key storage, biometric unlock, and the reading/sending bridge (encryption is desktop-only until then). - [ ] Phase 4 (Android): add Android Keystore key storage, biometric unlock, and the reading/sending bridge (encryption is desktop-only until then).
- [x] Phase 5 (automated): large attachments, multiple recipients, corrupted/tampered payloads, inline PGP and PGP/MIME tests. - [x] Phase 5 (automated): large attachments, multiple recipients, corrupted/tampered payloads, inline PGP and PGP/MIME tests.
- [x] Phase 5 (GnuPG): automated interoperability tests with GnuPG 2.5 (both directions: PGP/MIME, inline, clear-signed, detached signatures). - [x] Phase 5 (GnuPG): automated interoperability tests with GnuPG 2.5 (both directions: PGP/MIME, inline, clear-signed, detached signatures).
- [x] Phase 6: documentation and release. - [x] Phase 6: documentation and release.
- [x] Manual interoperability check with Thunderbird. - [x] Manual interoperability check with Thunderbird.
- [x] Address findings from the automated OpenPGP security reviews (see [SECURITY_REVIEW.md](./SECURITY_REVIEW.md)). - [x] Address findings from the automated OpenPGP security reviews (see [SECURITY_REVIEW.md](./SECURITY_REVIEW.md)).
- [ ] Complete an independent human security review of the encryption code before relying on it. - [ ] Complete an independent human security review of the encryption code before expanding OpenPGP support to Android.
- [ ] Add direct IPC-handler tests for both accept and cancel paths of the main-process plaintext-send confirmation.
## Appearance and settings ## Appearance and settings
@@ -48,6 +49,7 @@
## Account settings ## Account settings
- [ ] Add OAuth2 account setup for Google and Microsoft mail accounts.
- [ ] Fix the mailbox space indicator; it is not working. - [ ] Fix the mailbox space indicator; it is not working.
- [x] Fix automatic mail sync so the message list refreshes when new mail arrives. - [x] Fix automatic mail sync so the message list refreshes when new mail arrives.
- [x] Sync all connected accounts' mailboxes in the Electron main process at launch/resume and periodically in the background. - [x] Sync all connected accounts' mailboxes in the Electron main process at launch/resume and periodically in the background.
@@ -64,8 +66,8 @@
- [x] Remove the display name initials from the bottom-left corner. - [x] Remove the display name initials from the bottom-left corner.
- [x] Add the ability to delete draft mails. - [x] Add the ability to delete draft mails.
- [x] Fix IMAP folder creation, which does not work. - [x] Fix IMAP folder creation, which does not work.
- [ ] Give the sidebar (Inbox, Folders, etc.) more room so every item fits on screen: make the box scrollable with a slider, or remove or collapse less-used items. - [ ] Improve sidebar usability so all folders fit or can be reached by scrolling; consider collapsing less-used sections.
- [ ] Make labels work and add the ability to create more labels. - [ ] Make labels work reliably and support creating and managing additional labels.
- [x] Fix created IMAP folders not showing in the mail rules folder list; only Inbox, Archive and Trash are shown. - [x] Fix created IMAP folders not showing in the mail rules folder list; only Inbox, Archive and Trash are shown.
- [x] Fix draft mail deletion to work like the Inbox: select multiple drafts and delete the selected drafts at once. - [x] Fix draft mail deletion to work like the Inbox: select multiple drafts and delete the selected drafts at once.
- [x] Show created IMAP folders in the same list as Inbox and the other folders, and move the folder list and the add-folder button to the top row above Inbox. Add scrolling to the IMAP folders area. - [x] Show created IMAP folders in the same list as Inbox and the other folders, and move the folder list and the add-folder button to the top row above Inbox. Add scrolling to the IMAP folders area.