Refractoring Stage 6.9 Moved the OpenPGP key UI’s active-account lookup to the mail feature API. The renderer now uses explicit APIs for account, snooze, attachment, OpenPGP mail/key, shortcuts, and DAV integrations; remaining transitional globals are mainly in the core shell and cross-feature hooks.

This commit is contained in:
2026-10-16 21:48:40 +03:00
parent 1445d42563
commit 718ceb6efe
8 changed files with 228 additions and 222 deletions
+3
View File
@@ -62,18 +62,21 @@ test('account and snooze UI consume the explicit mail API instead of selected le
const snoozeUi = fs.readFileSync(path.join(root, 'snooze-ui.js'), 'utf8');
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 shortcutsUi = fs.readFileSync(path.join(root, 'shortcuts.js'), 'utf8');
const productivityUi = fs.readFileSync(path.join(root, 'productivity.js'), 'utf8');
assert.match(accountUi, /window\.epMailFeatures\.mail/);
assert.match(snoozeUi, /window\.epMailFeatures\.mail/);
assert.match(attachmentUi, /window\.epMailFeatures\.mail/);
assert.match(pgpMailUi, /window\.epMailFeatures\.mail/);
assert.match(pgpUi, /window\.epMailFeatures\.mail\.connectedAccount/);
assert.match(shortcutsUi, /window\.epMailFeatures\.mail/);
assert.match(shortcutsUi, /window\.epMailFeatures\.productivity/);
assert.doesNotMatch(accountUi, /\bconnectedMailAccount\b|\bmailPageOffset\b|(?<!\.)\bsyncMailbox\s*\(/);
assert.doesNotMatch(snoozeUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bselectedIds\b|(?<!\.)\bsyncMailbox\s*\(/);
assert.doesNotMatch(attachmentUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bmessages\.find/);
assert.doesNotMatch(pgpMailUi, /(?<!\.)\bmessages\.find|(?<!\.)\bactiveMessage\b|window\.pgpPrepareSend/);
assert.doesNotMatch(pgpUi, /\bconnectedMailAccount\b/);
assert.match(productivityUi, /window\.epMailFeatures\.productivity/);
assert.doesNotMatch(shortcutsUi, /(?<!\.)\bactiveMessage\b|(?<!\.)\bopenMessage\s*\(/);
});