Refractoring Stage 6.11 The account manager now uses explicit mail and DAV feature APIs, is scoped locally instead of exposing a global helper, and loads after the DAV feature registers its API. Root and www/ assets are synchronized.

This commit is contained in:
2026-10-16 22:11:52 +03:00
parent 3013e489ed
commit e80f285e8c
11 changed files with 45 additions and 18 deletions
+4
View File
@@ -15,7 +15,11 @@ test('renderer bootstrap loads shared state and mail security before the applica
const app = html.indexOf('<script src="app.js"></script>');
const platformBridge = html.indexOf('<script src="platform-bridge.js"></script>');
const mailUi = html.indexOf('<script src="mail-ui.js"></script>');
const productivity = html.indexOf('<script src="productivity.js"></script>');
const davUi = html.indexOf('<script src="dav-ui.js"></script>');
const accountUi = html.indexOf('<script src="account-ui.js"></script>');
assert.ok(state >= 0 && contentSecurity > state && app > contentSecurity && mailApi > platformBridge && mailUi > mailApi);
assert.ok(productivity > mailUi && davUi > productivity && accountUi > davUi);
});
test('core app shell uses the namespaced renderer state', () => {
+5
View File
@@ -63,6 +63,7 @@ test('account and snooze UI consume the explicit mail API instead of selected le
const attachmentUi = fs.readFileSync(path.join(root, 'attachments.js'), 'utf8');
const pgpMailUi = fs.readFileSync(path.join(root, 'pgp-mail-ui.js'), 'utf8');
const pgpUi = fs.readFileSync(path.join(root, 'pgp-ui.js'), 'utf8');
const davUi = fs.readFileSync(path.join(root, 'dav-ui.js'), 'utf8');
const appShell = fs.readFileSync(path.join(root, 'app.js'), 'utf8');
const mailUi = fs.readFileSync(path.join(root, 'mail-ui.js'), 'utf8');
const shortcutsUi = fs.readFileSync(path.join(root, 'shortcuts.js'), 'utf8');
@@ -72,6 +73,10 @@ test('account and snooze UI consume the explicit mail API instead of selected le
assert.match(attachmentUi, /window\.epMailFeatures\.mail/);
assert.match(pgpMailUi, /window\.epMailFeatures\.mail/);
assert.match(pgpUi, /window\.epMailFeatures\.mail\.connectedAccount/);
assert.match(accountUi, /const accountDavUi = window\.epMailFeatures\.dav/);
assert.match(accountUi, /accountDavUi\.openManager/);
assert.doesNotMatch(accountUi, /(?<!\.)\b(?:esc|toast)\s*\(|(?<!\.)\$\(/);
assert.match(davUi, /window\.epMailFeatures\.dav = Object\.freeze/);
assert.match(appShell, /window\.epMailShell = Object\.freeze/);
assert.match(mailUi, /appShell\.wrapOpenMessage/);
assert.match(mailUi, /appShell\.wrapShowCompose/);