Update REFACTOR_PLAN.md tree view and few features to TODO.md
This commit is contained in:
+21
-10
@@ -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.
|
||||
- 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
|
||||
desktop/
|
||||
main.cjs # Electron startup and lifecycle
|
||||
ipc/ # Request validation and handler registration
|
||||
mail/ # Account, IMAP, SMTP, sync, outbox, message mapping
|
||||
dav/ # DAV services and iCalendar/vCard codecs
|
||||
security/ # Secure storage and shared boundary validation
|
||||
pgp/ # OpenPGP services (existing focused modules)
|
||||
renderer/
|
||||
app/ mail/ accounts/ dav/ pgp/ shared/
|
||||
main.cjs, preload.cjs # Electron startup, lifecycle, narrow bridge
|
||||
ipc/ # Mail, DAV, and OpenPGP handler registrars
|
||||
mail/ # IMAP/SMTP, sync, outbox, snooze, attachments
|
||||
dav/ # DAV remote-reference validation
|
||||
security/ # IPC sender and request validation
|
||||
pgp-*.cjs # OpenPGP key, mail, and key-server services
|
||||
account-store.cjs # Account-record migration
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user