Refractoring Stage 6.4 Migrate remaining mail-related consumers and remove transitional global dependencies.

This commit is contained in:
2026-10-16 20:17:22 +03:00
parent d14c1cfb07
commit f19573a337
10 changed files with 97 additions and 64 deletions
+4 -3
View File
@@ -103,6 +103,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
- [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`).
- [x] Add an explicit mail feature API and migrate the account manager to it (`renderer-mail-api.js`, `account-ui.js`).
- [x] Migrate snooze UI state/sync access to the mail feature API (`snooze-ui.js`).
- [ ] 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.
@@ -129,7 +130,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
- Electron Builder and the desktop Actions artifact name derive from `package.json`.
- Android `versionName` derives from the same package version. Its current `versionCode` mapping is `major * 10000 + minor * 100 + patch`; keep minor and patch below 100, and revise the mapping before reaching that boundary to avoid collisions.
- `scripts/build-all.ps1` uses the package version for APK naming. Before a release, bump once with `npm run bump:build`, verify the lockfile and computed Android version code, and build every target without another bump.
- Latest version check: `package.json` and both lockfile version fields are `0.4.15`; Android derives `versionName 0.4.15` and `versionCode 415`. `release/` contains Windows artifacts through `0.4.14`; the `0.4.15` artifact has not been built yet.
- Latest version check: `package.json` and both lockfile version fields are `0.4.16`; Android derives `versionName 0.4.16` and `versionCode 416`. `release/` contains Windows artifacts through `0.4.15`; the `0.4.16` artifact has not been built yet.
## Progress log
@@ -148,9 +149,9 @@ This is a gradual destination, not a requirement to move everything at once. IPC
- Step 5 moved OpenPGP handler registration and message-source fetching into a feature module and added registration/schema coverage.
- Step 5 moved DAV handler registration into a feature module and added registration/schema coverage; the full suite passes 110 tests.
- Step 5 grouped mail/account handlers in `desktop/ipc/mail.cjs`; all 114 tests pass and the remaining app-version handler stays in the Electron shell.
- Added a build-version consistency check. Package/lockfile are now `0.4.15`, with Android build number `415`; the latest artifact observed is Windows `0.4.14`.
- Added a build-version consistency check. Package/lockfile are now `0.4.16`, with Android build number `416`; the latest artifact observed is Windows `0.4.15`.
- Step 5 grouped mail/account handlers and added a release-version consistency test; current package/lockfile/Android version alignment was checked and documented.
- Step 6 added `renderer-state.js`, extracted the mail HTML security API, and introduced `renderer-mail-api.js`; `account-ui.js` now uses that explicit API instead of several mail globals. Transitional aliases remain for other classic scripts.
- Step 6's renderer API slice passes 120 tests. The `0.4.15` artifact has not been built as part of this renderer change.
- Step 6's renderer API slice passes 121 tests. The `0.4.16` artifact has not been built as part of this renderer change.
- 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.