Commit Graph
425 Commits
Author SHA1 Message Date
Linus Rath d6c923f20e Merge pull request #947 from shukiv/feat/list-attachment-chips
feat(list): show attachments on list rows and open them from there
2026-09-11 17:05:08 +02:00
Linus Rath 60b3d86004 Merge pull request #1005 from dealerweb/fix/hide-body-referenced-cid-parts
fix: hide body-embedded cid parts declared as octet-stream from the attachment list
2026-09-11 11:59:32 +02:00
Linus Rath 0b704f61e0 Merge pull request #1008 from Almost-Senseless-Coder/fix/list-label-accessibility
fix(a11y): Improved accessibility of the email list
2026-09-11 11:59:14 +02:00
dealerweb 1c00812ab7 fix: hide body-embedded cid parts declared as octet-stream from the attachment list
Some senders ship the images their HTML body embeds via cid: as
application/octet-stream with no Content-Disposition and no filename.
The body rendered them fine, but the "hide inline images" check only
recognised parts declared inline with an image/* type, so they also
showed up as nameless "Attachment" chips next to the real files.

Both viewers now scan the HTML they actually render for cid: references
(the same pattern the renderer rewrites to blob URLs) and hide a
referenced part when it is an image or generically typed. An explicit
attachment disposition always keeps its chip, as does a referenced part
with a real non-image type, since that chip is its only download. Plain
text rendering references nothing, so nothing is hidden there. The
shared rule lives in lib/attachment-visibility.ts so the desktop viewer,
the thread view and the decrypted-message path cannot drift apart.
2026-09-10 10:45:45 +02:00
Almost-Senseless-Coder 4947c6c7a4 Improved accessibility of the email list 2026-09-09 19:37:43 +02:00
Linus Rath 565d5c1095 feat: choose exact-address or same-domain matching for reply from received address #1000 2026-09-09 19:27:08 +02:00
Linus Rath 26358c7a63 Merge pull request #991 from rotterp/fix/shared-mailbox-send-identity
fix(composer): send from the address a message was delivered to
2026-09-07 22:38:51 +02:00
Linus Rath 049a1a1292 Merge pull request #663 from shukiv/fix/read-view-auto-direction
fix(rtl): auto-detect text direction in read, print and plain-text views
2026-09-07 22:36:25 +02:00
Linus Rath 8477acf217 fix: keep the mobile actions panel below the status bar #936 2026-09-07 22:34:47 +02:00
Linus Rath c633ce1ff4 fix: keep the reading-mode toggle mounted so toolbar buttons stop jumping #964 2026-09-07 22:34:47 +02:00
Linus Rath ab4bf91b20 fix: let sender tables keep their own max-width #790 2026-09-07 22:34:47 +02:00
Linus Rath b85ba9603d fix: upload composer attachments through the composing identity's account #943 2026-09-07 22:34:47 +02:00
Shuki VakninandClaude Opus 5 e2990da554 fix(rtl): auto-detect direction in the thread view and .eml preview
The same missing dir="auto" as the read view, in the two other places
that build an email document.

thread-conversation-view builds a full document for each card's iframe
and its <body> had no direction, so a thread of right-to-left mail read
left-to-right in the one view that shows several messages at once.

eml-preview hands srcDoc a fragment rather than a document, so the
<body> is the browser's implicit one and cannot be annotated at all.
The wrapper the fragment already needs carries dir="auto" instead: a
<div> around sanitized HTML, and the existing <pre> for plain text.
Neither changes layout - the implicit body and its default margin stay
exactly as they were.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019KwXZEwxijHRbfobfXmcK2
2026-09-07 22:37:17 +03:00
Patrick RotterandClaude Opus 5 4fc7b8b50b fix(composer): send from the address a message was delivered to
On a shared, group or aliased mailbox every reply, reply-all and forward
went out as `identities[0]` - the account owner - whichever mailbox was
open. `autoSelectReplyIdentity` fused two behaviours: matching one of the
user's OWN identities, which never rewrites `From:`, and the domain
catch-all, which puts an address they have not configured into `From:`.
Only the first is safe for everyone, so it is now unconditional; the
rewrite stays behind the setting, which is what its description promises.
`findReplyIdentityId` already implemented that match and was referenced
only from tests.

`forward` is admitted to the match - it was excluded, so a forward from a
shared mailbox went out as the owner - but never takes the rewrite: a reply
continues a thread whose participants know the addressing, while a forward
introduces a rewritten From to a recipient the user just typed. Quick reply
matches own identities only, having no From row to show or correct a
rewrite, and now falls back to the primary's signature as the composer
does, so a shared-mailbox quick reply is still signed.

`findReplyIdentityId` now scans recipients in To, Cc, Bcc order rather than
scanning identities, and prefers an untagged identity over a differently
tagged sibling. Scanning identities let their order decide, and
`sortIdentities` puts the login's own address first - so `To: team@,
Cc: you@` replied as you, the case this is meant to fix.

Automatic selection is restricted to the active account: `composerClient`
follows the chosen identity, and a reply or forward still carries blobIds
only its own account's server can resolve. The dropdown still offers every
account's identities to pick by hand.

New messages are deliberately left gated: `composeFromAccountEmail` falls
back to `AccountEntry.email`, written once at first login, so resolving it
unconditionally would override a user-chosen default sender identity (#507).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 20:37:29 +02:00
Shuki Vaknin 48048f165f fix(rtl): auto-detect text direction in read, print and plain-text views 2026-09-07 21:23:51 +03:00
Linus Rath c8edd1f2e1 Merge pull request #715 from lucletoffe/fix/unread-dot-alignment
fix(list): align the unread dot with the first line, not the row midpoint
2026-09-07 17:56:31 +02:00
Linus Rath 6a44442594 Merge pull request #953 from shukiv/fix/list-avatar-vertical-center
fix(list): centre the sender avatar against the row
2026-09-07 17:56:01 +02:00
Linus Rath 75585f224e Merge pull request #987 from ibayue/feature/composer-sticky-toolbar-font-size
feat(composer): sticky formatting toolbar with font-size and background color
2026-09-07 17:42:52 +02:00
ibayueandClaude cc64a9871a fix(composer): background-color picker uses the text-color palette
The dedicated pastel highlighter palette read washed-out against the
light popover. Use the same 16 TEXT_COLORS swatches, grid and styling
as the text-color picker so the two controls read as siblings (Gmail
does the same for both pickers).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:54 +08:00
ibayueandClaude 0459976138 fix(composer): cleaner font-size glyph, number shown once a size is set
The lucide ALargeSmall icon read poorly and lingered after picking a
size. Replace it with two baseline-aligned A's drawn in text (large +
small sharing a baseline - the classic size glyph), and once a size is
selected show that number on the button as before.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:54 +08:00
ibayueandClaude 3957b35809 feat(composer): add background color and clearer font-size button
- Background color toolbar button next to text color, using the
  BackgroundColor extension from @tiptap/extension-text-style (same
  textStyle-mark pattern as Color) with a 2x8 soft-tint highlighter
  palette and a remove action; emitted as inline
  style="background-color: …" which survives email round-trips.
- Font-size button now shows a big-A/small-A glyph (ALargeSmall) with
  the active size as a small badge, replacing the plain "Aa" text that
  was easy to miss.
- background_color/remove_background_color toolbar labels in all 24
  locales; unit tests for apply/unset/parse/coexistence with color and
  font-size on the same span.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:54 +08:00
ibayueandClaude 8fbe508ba3 fix(composer): keep toolbar background at main's exact muted/30
The previous fix paired bg-muted/30 with
supports-[backdrop-filter]:bg-muted/70, intending a fallback for
browsers without backdrop-filter - but every modern browser supports
it, so the 70%-opaque variant was always active and the toolbar read
darker than main at rest. Drop the override entirely: the background
is bg-muted/30 in every state, identical to main, and pinned
legibility comes from backdrop-blur-sm alone (blurring a solid page
background is a no-op at rest; it only softens body text sliding
underneath once the toolbar is pinned).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:51 +08:00
ibayueandClaude 08e279d21d fix(composer): restore main's translucent toolbar look
The sticky rework had swapped the toolbar background to opaque
bg-muted, which reads darker than main's bg-muted/30. Restore the
translucent background and pair it with backdrop-blur + a slightly
stronger muted overlay (only when backdrop-filter is supported) so
pinned-on-body-text stays legible without the flat solid band.
Also pin the font-size button's line height so the toolbar's row
height matches main exactly.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:51 +08:00
ibayueandClaude 0ead019c5c fix(composer): keep From/To/Cc/Bcc/Subject fields pinned above the body
Move the fields section out of the composer's scroll container so it
stays visible while scrolling long bodies, matching the pinned
formatting toolbar. Since the fields were the first child of the
scroll container, hoisting them above it is visually identical to
making them sticky - but needs no dynamic offset for the toolbar's
own sticky top (the fields' height varies with Cc/Bcc toggling and
recipient-chip wrapping). The scroll container now wraps only the
body and the signature preview.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:51 +08:00
ibayueandClaude 7e0a86a660 feat(composer): sticky formatting toolbar and font-size picker
- Pin the rich-text toolbar to the top of the composer's scroll
  container (sticky) so it stays visible while editing long bodies;
  the previously translucent background becomes opaque so body text
  doesn't bleed through while pinned.
- Add a font-size picker to the toolbar (14/16/18/20/24/32px plus
  "Default") backed by a new TipTap FontSize extension that stores
  the size as an inline style on the TextStyle mark, mirroring how
  @tiptap/extension-color handles colour - inline styles survive
  email round-trips, and unsetting the size leaves other text-style
  attributes (e.g. colour) intact.
- Add font_size / font_size_default toolbar strings to all 25
  locales.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-07 16:58:50 +08:00
bartfaizoli76 06f51486e0 feat: add attachment-actions and composer-attachment-source plugin slots
Two new extension points for third-party attachment/cloud-storage plugins
(e.g. a WebDAV/Nextcloud file browser), neither of which the plugin API
currently supports:

- attachment-actions: a new slot rendered into every attachment's hover
  action row (all six render paths: beside-sender/below-header/mobile,
  each in its compact and expanded-popup form), with the AttachmentInfo
  (name, type, size, blobId, emailId) passed through extraProps. Lets a
  plugin offer a 'save this attachment elsewhere' action next to the
  existing download/preview buttons - previously the only per-attachment
  hook was the read-only onAttachmentDownload observer.

- composer-attachment-source: a new slot rendered in the composer toolbar
  next to the existing composer-toolbar slot, with an onAttach(upload)
  callback in extraProps. Lets a plugin that has already uploaded a file to
  the JMAP server itself (api.jmap.uploadBlob) - e.g. a file picked from an
  external cloud storage browser - have it added to the current draft as a
  real attachment. Previously there was no way for a plugin to add an
  attachment to the draft at all; the closest existing mechanism
  (onBeforeBlobUpload's ExternalAttachmentResult) only replaces a locally
  picked file with body text/a link, it cannot add a brand-new attachment
  from an external source.

Both slots follow the existing PluginSlot pattern (calendar-event-actions):
render nothing when no plugin offers the slot, so this is purely additive.

Motivating use case: the existing nextcloud-attachments community plugin
uploads local files to Nextcloud and appends a share link to the message
body - useful for large files, but there was no way for a plugin to do the
inverse (attach a file that already lives in cloud storage as a real binary
attachment, not a link) or to let attachment recipients save an incoming
attachment back out to their own cloud storage. These two slots make both
directions possible without touching plugin-store or the sandbox bridge -
existing slot/extraProps plumbing (see calendar-event-actions) already
supports arbitrary POJO props.
2026-09-05 11:14:10 +02:00
Shuki Vaknin 6f92547a49 fix(list): centre the sender avatar against the row
List rows lay out with items-start, because the sender line, subject and
preview stack and the body should govern the row height. The avatar
inherited that and pinned itself to the top, level with the sender line,
leaving it visibly high against a two- or three-line row.

Give the avatar self-center in both the single-message and thread rows.
The row keeps items-start, so nothing else moves — in particular the
extra-compact checkbox, which is mutually exclusive with the avatar and
carries its own mt-2 offset, is untouched.
2026-09-02 00:40:54 +03:00
Shuki Vaknin 71dd5f4fed fix(list): stop the batch toolbar hiding the message you just selected
Opening the toolbar feeds its height back into scrollTop so rows keep
their position on screen. At the top of the list there are no rows above
to hold steady, so that scroll instead slides the first message under the
toolbar — select the top message and it disappears behind the bar acting
on it.

Skip the compensation when the list is already at the top and let the
content move down there, which is what the toolbar taking up space
should do. Mid-list behaviour is unchanged, and the scroll is clamped at
zero so collapsing the toolbar cannot drive it negative.
2026-09-01 19:05:35 +03:00
Shuki Vaknin 0e1c34cdec feat(list): show attachments on list rows and open them from there
A message with attachments showed a paperclip and nothing else, so the
only way to reach a file was to open the message, scroll to the bottom
and find it. The list rows never had the information to do better:
EMAIL_LIST_PROPERTIES asked for hasAttachment, a boolean.

Request attachments alongside it and render the files as chips under the
preview, each one opening that file directly. Chips honour the existing
mailAttachmentAction setting, so they preview or download exactly as the
viewer's attachment list does.

Inline parts are filtered out. A single Outlook message routinely carries
half a dozen cid: signature spacers of under 200 bytes; chipping those
would bury the one file the reader actually wants. Only parts that are
neither inline nor cid-referenced, and that carry a filename, are shown —
two at a time, with the remainder collapsed into a count.

Downloads resolve the blob source from the row's own message rather than
the selected one, so they stay correct in the unified inbox where each
row can belong to a different account.
2026-09-01 18:51:51 +03:00
Linus Rath a210b22e49 fix: set name.full on all contact write paths so vCards carry mandatory FN #430 2026-08-31 23:53:24 +02:00
Linus Rath d60eb59575 fix: pad attachment preview overlays for the iOS PWA safe area #936 2026-08-31 21:03:08 +02:00
Linus Rath a69b3651fd fix: render plain-text-only mail as text in the mobile thread view #489 2026-08-31 20:41:45 +02:00
Linus Rath cc90903f05 feat: request delivery notifications and REQUIRETLS when sending 2026-08-29 18:16:52 +02:00
Linus Rath b408b2597a feat: highlight search hits with SearchSnippet/get 2026-08-29 17:47:23 +02:00
Linus Rath 1859783a8b fix: stop the mobile More menu flashing open when a message is opened 2026-08-29 17:29:03 +02:00
Linus Rath 3ea64b2ffe fix: keep message rows in place when the batch toolbar opens 2026-08-29 17:21:02 +02:00
Linus Rath 40cbe82848 fix: drop duplicate selection checkbox in message list 2026-08-29 17:18:49 +02:00
Linus Rath 3ef2e6946f fix: embed the signature into re-opened drafts #848 2026-08-25 19:49:49 +02:00
Linus Rath 3472bc0419 fix: parse calendar invitations in directly viewed shared folders against the folder owner #867 2026-08-25 19:36:04 +02:00
Linus Rath 1faa6f6900 Merge branch 'main' of https://github.com/bulwarkmail/webmail 2026-08-25 19:22:50 +02:00
Linus Rath 3ef2b45fb4 feat: configurable message-list ordering #718 2026-08-25 19:20:48 +02:00
Linus Rath e838794133 Merge pull request #895 from romanvru/feat/upload-progress
Real byte progress for attachment uploads, stock and plugin-offloaded
2026-08-25 18:55:07 +02:00
Linus Rath a29cf27ff8 fix: route multi-account email lookups and invitation parsing by source account #847 2026-08-25 18:50:50 +02:00
Linus Rath 342217ad99 fix: keep read/unread toolbar button a fixed width so buttons don't jump on open #864 2026-08-25 18:16:51 +02:00
Roman Varlakov 7928f72ee2 feat: real byte progress for attachment uploads, stock and plugin-offloaded
The composer chip only knew a boolean: `uploading` flipped on, an
indeterminate bar animated at 40% width, and nothing anywhere carried a
percentage, so a large attachment on a slow link looked frozen for the
whole transfer. The JMAP client has been able to report real progress
since #333 gave uploadBlob an XHR path with onProgress; the composer
just never passed it.

Stock path: pass onProgress and the existing AbortController's signal to
client.uploadBlob. The chip's bar becomes determinate as soon as bytes
are reported (falling back to the indeterminate animation otherwise),
and cancel now aborts the transfer itself instead of being checked only
once the upload has finished.

Plugin offload path (#751): a plugin that offloads an attachment moves
the bytes itself via api.http.post, which the composer cannot observe.
It also cannot be handed a callback: the sandbox bridge marshals
functions host-to-plugin only, and the File a plugin holds is a
structured clone, so object identity cannot correlate its request back
to an attachment. The staged file id can: the composer generated it and
handed it to onBeforeBlobUpload. A plugin echoes it back as the new
optional `progressFileId` on the post options; the host sends the Blob
via XMLHttpRequest (fetch exposes no upload progress events) and reports
bytes into a host-side registry keyed by that id, which the composer
subscribes to before running the hook. Progress never crosses into the
sandbox, and reports for an id the composer is not tracking are dropped,
so the plugin API grows exactly one optional field. Calls without
progressFileId keep the fetch path untouched.

Closes #754
2026-08-23 19:44:56 +06:00
Linus Rath a5d08b573a Merge pull request #862 from dealerweb/fix/signature-unlock
fix: let a double-click unlock the embedded signature for editing
2026-08-21 09:26:50 +02:00
Linus Rath 93fd9068f7 Merge pull request #863 from shukiv/feat/mobile-swipe-actions
feat(mobile): swipe list rows left/right for quick actions
2026-08-20 21:59:15 +02:00
Linus Rath 37d85e5447 feat: fullscreen email view in the standard interface 2026-08-20 16:19:12 +02:00
Linus Rath 5d2b937ae3 fix: keep attachments when re-opening a draft and destroy old draft versions only after a successful create/send #849 2026-08-20 13:25:25 +02:00
dealerweb bc5b18bea9 fix: address the review notes on the signature unlock
- hoist only font longhands from wrapper divs: applying the `font`
  shorthand after the line's own styles would reset the font-family/
  size the line declares itself; the CSSOM exposes shorthand
  declarations through the longhand queries anyway
- only preventDefault on dblclick when the unlock actually ran, so a
  read-only editor keeps its default double-click behaviour
2026-08-19 11:56:18 +02:00