Commit Graph
47 Commits
Author SHA1 Message Date
Linus Rath e80f5ade81 feat: let admins turn off downloads, export, printing and the install prompt, and add a watermark
Organisation > Devices now sets policy.json `organisation.devices`, each
switch off by default and scoped per domain or group:

- No downloads: attachments and files only preview (reader, conversation
  view, Pro tab, list chips, .eml previews, the Files app). Download,
  Download all, Open in new tab, Save to Files, drag-out, the browser's
  PDF viewer (pdf.js instead) and media download controls go away.
- No export: no .eml export, View source, message drag-out, or folder and
  account export; a running export stops and its file is deleted when
  the switch turns on. Import stays.
- No printing: no Print buttons in mail, calendar and contacts; Ctrl+P
  prints a note; the reader frame prints blank.
- No install prompt: no card, and the browser's own banner is held back.
- Watermark: the user's address and the date over the reader,
  previews and every printout (mail, calendar, contacts, plugins).

A message follows its own account's policy; what isn't about one message
follows the strictest signed-in account. Every user path hides its
button, and the anchor and new-tab helpers refuse as a backstop
(lib/download-guard.ts), never the blob readers. The plugin APIs
`ui.downloadFile` and `ui.print` refuse too, and the office editor frame
loses `allow-downloads`.

Two assertions in components/mail/__tests__/blob-routing.test.tsx now
expect `{ kind: 'export' }` as the fifth argument of downloadBlob for an
.eml export: the export says what it is, so the backstop checks "No
export" rather than "No downloads" for it.
2026-11-01 08:52:34 +01:00
Linus Rath 391f22cf7d test: open attachments through the bar's tile button in the blob routing tests 2026-11-01 00:51:10 +01:00
Linus Rath b8223a4492 Merge pull request #1466 from HOLOEYE-JZ/feat/plugin-open-email
feat(plugins): api.ui.openEmail opens a message in the reader
2026-10-31 16:25:05 +01:00
Linus Rath e5ed50dc92 Merge pull request #1467 from HOLOEYE-JZ/feat/plugin-hooks-account-and-composer
feat(plugins): star and after-send hooks name the mail's account
2026-10-31 16:25:00 +01:00
Linus Rath a0da9eb6c2 fix: show the results when searching with a message open in mountain view #1468 2026-10-31 16:15:57 +01:00
Jacob Zeitz d5cd3c6e40 feat(plugins): star and after-send hooks name the mail's account
Message ids repeat across accounts, so a hook payload naming only an
emailId could not tell a plugin which mailbox the message lies in when
it is a shared or group account's.

onBeforeEmailStarToggle and onEmailStarToggle now carry accountId when
the starred message is not in the user's own account, as the
message-row-actions click context does. Every star (the row's button,
the reader's star, the key, the menu) goes through toggleStar, one
message at a time, so one accountId names it; the account is resolved
before the plugins are asked. An own message's payload is unchanged.

onAfterEmailSend now carries accountId, the JMAP account the sent
message lies in (a mail sent from a shared or group identity lies in
that account), so api.email.get finds it. sendEmail returns that account
as emailAccountId, the S/MIME send too. The hook also carries
composerId, the id the sending composer's slots and actions gave
plugins, so a plugin can act on what the user chose in that composer.
2026-10-31 14:15:06 +01:00
Jacob Zeitz 54ad6390b3 feat(plugins): api.ui.openEmail opens a message in the reader
A plugin opens a message as a click on a list row or on a search result
entry naming one does, also a message of a shared or group account,
reached through the login that reads it. On the mail page it opens in
place, in the Pro shell in an email tab as a message link does there;
elsewhere the tab loads the message's link, at most five times a minute.
A message no login reads, or one its account does not have, is refused
with an error the plugin sees, as is one the mail page could not open.
Needs email:read.
2026-10-31 14:14:48 +01:00
Linus Rath 9af0304616 fix: return to the list after moving or reporting the open message as spam #1458 2026-10-31 01:03:08 +01:00
Linus Rath 3406580a3f fix: return to the list after archiving the open message #1458 2026-10-31 00:56:03 +01:00
Linus Rath ed988a2aae ci: keep the a11y guard out of lint and vitest and mock narrowerThan in attachment tests 2026-10-29 21:08:59 +01:00
Linus Rath b4483b8739 test: give the mail app tests the category tab panel props 2026-10-29 18:03:01 +01:00
Linus Rath 863806fc65 fix: translate system folder names in the advanced search folder list #1429 2026-10-29 14:24:07 +01:00
Linus Rath 4406a6435e Merge pull request #1426 from VasilisNtovolos/fix/attachment-download-error-feedback 2026-10-29 14:10:42 +01:00
Linus Rath 764ee97692 test: bring the main test suite back to green after the vitest 5 upgrade and header rework 2026-10-29 14:07:40 +01:00
VasilisNtovolos 35064316ad fix: show errors when attachment downloads fail 2026-10-29 13:19:29 +02:00
Linus Rath 96797597c5 Merge branch 'main' into feat/org-features 2026-10-28 15:14:34 +01:00
Linus Rath 2bb63f648b fix: keep the phone conversation's reply buttons readable and count its messages with each language's plural forms 2026-10-28 12:46:18 +01:00
Linus Rath 8597858865 fix: bring mail back to its list after the tour on phones instead of an empty reading pane 2026-10-28 12:34:27 +01:00
Linus Rath e654eadd37 Merge branch 'main' into ux/mail3 2026-10-28 11:10:56 +01:00
Linus Rath 768f3fe19b fix: make Undo after Report spam put the message back and say Moved back, and name the Spam folder as the sidebar shows it 2026-10-28 10:40:17 +01:00
Linus Rath f1c209beaa fix: name the account or parent folder in the palette's go to folder entries 2026-10-28 10:26:55 +01:00
Linus Rath 9304557819 fix: look up another signed-in account for the external mail checks only when an admin turned them on 2026-10-28 08:07:55 +01:00
Linus Rath af6deee047 feat: add Mail's commands to the command palette: reply, archive, delete, move, read state, spam and go to a folder 2026-10-28 05:27:17 +01:00
Linus Rath 6c5aead20b feat: undo a delete to Trash, archive, move, spam report or remove from folder from its toast 2026-10-28 03:11:43 +01:00
Linus Rath 7a93b0e6c8 fix: follow the Delete action setting when deleting a message, and delete for good when it says so 2026-10-28 02:37:18 +01:00
Linus Rath 272fc5e1f4 fix: reuse a group account's year and month archive folders instead of creating them again or in the own account 2026-10-26 16:14:19 +01:00
Linus Rath 34ad859ce4 fix: refuse Undo and Send now for a delayed send of a signed-out account instead of acting through the active one 2026-10-26 16:11:53 +01:00
Linus Rath 54b197080c fix: keep a discarded draft of a signed-out account instead of deleting another account's message with its id 2026-10-26 16:11:52 +01:00
Linus Rath 0b917d6262 fix: mark the replied, forwarded or receipted message as answered in its own account, not another account's message with the same id 2026-10-26 16:11:52 +01:00
Linus Rath acac3128bc fix: archive and delete a message from its own account's folders in tag and unified views 2026-10-26 16:11:51 +01:00
VasilisNtovolos 41b70853fa fix: preserve message ownership in Pro blob downloads 2026-10-20 14:33:42 +03:00
VasilisNtovolos a73ac09035 fix: route conversation blobs by originating message 2026-10-19 15:43:38 +03:00
Peterka35 bbc3c2123e fix: follow markAsReadDelay when expanding a conversation or opening a Pro folder row
Expanding a conversation in the message list (row click, expand chevron,
or the `x` shortcut) and clicking a row in a Pro folder tab marked the
messages read straight away. They ignored "Mark as read: Never" and any
delay, which the reading pane and the conversation view follow.

Route them through one helper, scheduleAutoMarkAsRead: -1 never marks,
0 marks at once, any other value marks after that many milliseconds and
returns a cancel function.

- New store action autoMarkExpandedThreadAsRead keeps one pending timer
  per thread key. Collapsing the thread, or collapsing all threads, drops
  it. Both expansion paths (EmailList and the `x` handler in MailApp) use
  it.
- MailApp's handleEmailSelect drops the pending mark of every expanded
  thread other than the one the newly opened message belongs to, through
  cancelAutoMarkThreadAsRead. Moving on with `j`/`k` or a click no longer
  lets the delayed mark land on a conversation the user has left. The
  thread stays expanded.
- ProFolderTabBody schedules the row mark through the helper and drops a
  pending one when another row is opened or the tab unmounts.
2026-10-17 21:01:34 +02:00
Linus Rath 8491f7d8db perf: stop loading the editor while the login form renders 2026-10-15 04:44:51 +02:00
Linus Rath a30ae541f9 perf: show the login form without loading the app a second time 2026-10-15 03:27:44 +02:00
Linus Rath 86e593a752 feat: add a command palette on Ctrl+K where plugins can add their own commands 2026-10-14 05:10:10 +02:00
Linus Rath b57fa64557 feat: let plugins add buttons to the top bar, and to the header menu on phones 2026-10-14 04:50:21 +02:00
Linus Rath 8ad8f44e78 Merge branch 'feat/plugin-host-apis' into feat/plugin-system-audit
# Conflicts:
#	lib/plugin-sandbox/permission-text.ts
#	lib/plugin-sandbox/permissions.ts
#	lib/protocol-handlers/mailto.ts
#	locales/en/common.json
2026-10-14 04:34:14 +02:00
Linus Rath ead925c1b8 feat: let plugins open a filled-in composer and save drafts 2026-10-14 04:23:17 +02:00
Linus Rath 2fe865f108 feat: tell plugins when the server accepted a sent or scheduled message, but not an undone one 2026-10-14 03:58:58 +02:00
Linus Rath 7b2119456d feat: let plugins stop or prefill the composer and mailto links, and tell them when it opens, closes and saves a draft 2026-10-14 03:50:55 +02:00
Linus Rath a5c60ef597 fix: hide Undo send when the delay is over and say when an undo fails 2026-10-11 19:13:10 +02:00
Linus Rath 1614cab78b fix: return to the message list after sending a new message on a phone 2026-10-11 19:04:02 +02:00
lucamzanon 96cdeb1d66 Merge remote-tracking branch 'origin/main' into up/fix/cross-account-selection-key
# Conflicts:
#	components/email/email-list.tsx
#	stores/email-store.ts
2026-10-08 10:11:20 +02:00
Linus Rath a60768eb17 test: wait for the lazy viewer in the blob routing tests #1188 2026-10-07 19:49:37 +02:00
Linus Rath 7bf5e0d802 fix: keep a shared-folder message's thread key in line with its row #1188 2026-10-07 19:34:20 +02:00
VasilisNtovolos bb3ef6d9fc fix: route shared-account blob downloads by message owner 2026-10-07 15:57:45 +03:00