Updated the documentation set to reflect the current architecture and status:

This commit is contained in:
2026-10-16 23:35:32 +03:00
parent 60d692f8b4
commit 82d2f677aa
5 changed files with 45 additions and 24 deletions
+18 -9
View File
@@ -31,7 +31,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
## Steps and acceptance criteria
### 1. Baseline and guardrails — in progress
### 1. Baseline and guardrails — complete
- [x] Record the current test baseline.
- [x] Confirm the current root/`www/` web assets match.
@@ -98,7 +98,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
**Result:** OpenPGP, mail/account, and DAV handler groups now register through the same sender and payload validation wrapper. Registration/schema tests cover all feature modules.
### 6. Modularize renderer incrementally — in progress
### 6. Modularize renderer incrementally — complete
- [x] Introduce a namespaced shared renderer-state module with transitional classic-script accessors (`renderer-state.js`).
- [x] Extract mail HTML sanitization and remote-image approval checks into a dedicated renderer API (`mail-content-security.js`).
@@ -127,17 +127,24 @@ This is a gradual destination, not a requirement to move everything at once. IPC
- [x] Register content security helpers under the shared feature namespace instead of a standalone global (`mail-content-security.js`, `app.js`).
- [x] Migrate additional mail-related consumers to unique local aliases to avoid classic-script lexical redeclarations.
- [x] Add a combined-script parse test to prevent duplicate top-level lexical declarations from stopping later UI scripts.
- [ ] Migrate remaining mail-related consumers and remove transitional global dependencies.
- Replace hidden globals and script-order dependencies with imports or passed dependencies.
- Keep root web assets canonical and generated copies out of hand-edited workflows.
- Preserve CSP, HTML sanitization, and per-message remote-image approval behavior.
- [x] Migrate remaining mail-related consumers and remove legacy/transitional global dependencies.
- [x] Make cross-feature dependencies explicit through namespaced APIs and test the required classic-script load order.
- [x] Keep root web assets canonical and verify generated `www/` parity.
- [x] Preserve CSP, HTML sanitization, and per-message remote-image approval behavior with regression coverage.
**Acceptance:** both desktop and Android builds include the intended modules and existing user-visible flows still work.
### 7. Security regression coverage and review
**Result:** renderer features are locally scoped behind `epMailState`, `epMailShell`, and `epMailFeatures` APIs. The classic-script bootstrap remains intentionally ordered for desktop/Capacitor compatibility, with that order covered by tests. The user has confirmed successive built artifacts work.
- Add coverage for HTML sanitization, remote images, DAV URL/object handling, send downgrade decisions, and OpenPGP trust/replacement paths.
- Review pending items from `SECURITY_REVIEW.md`, including key-store/IPC/signature UI review, dependency audit, and Android encryption limitations.
**Deferred follow-up:** migrate the renderer from classic scripts to native ES modules; this is not required to complete the incremental modularization step above.
### 7. Security regression coverage and review — in progress
- [x] Cover HTML sanitization and remote-image validation/approval gating.
- [x] Cover DAV URL/object validation and current ETag binding.
- [ ] Add direct IPC-handler coverage for main-process plaintext-send downgrade confirmation (the confirmation behavior exists; its critical accept/cancel branch is not directly tested yet).
- [x] Cover native OpenPGP trust elevation and replacement-key confirmation, including cancellation behavior.
- [ ] Complete the human review and remaining items in `SECURITY_REVIEW.md` (dependency audit/version pinning and Android encryption limitations included).
**Acceptance:** security-sensitive behaviors have regression tests, and unresolved risks are documented rather than silently treated as fixed.
@@ -194,5 +201,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
- Step 6 at version `0.4.36` consolidates the HTML sanitization and remote-image policy API under `window.epMailFeatures.contentSecurity`.
- Step 7 at version `0.4.37` adds focused sanitizer coverage for dangerous DOM nodes/attributes and verifies that remote images remain data-only pending explicit loading.
- Step 7 at version `0.4.38` tests main-process native confirmation for OpenPGP key replacement and trust elevation; cancellation must not mutate stored key state.
- Step 7 coverage status: sanitizer/remote-image, DAV reference/ETag, and OpenPGP trust/replacement paths have regression coverage. A direct plaintext-send IPC confirmation test and the documented human/security review remain open.
- Renderer modularization step 6 is complete: feature modules are scoped, legacy renderer-state aliases are removed, public cross-feature interfaces are namespaced, and root/`www/` parity plus classic-script ordering are tested. Native ES module conversion remains a deferred follow-up.
- The current IPC/DAV validation changes pass the full suite: 108 tests.
- While work continued, `package.json` and `package-lock.json` reflected a version bump to `0.4.6`; those changes were preserved.