Commit Graph
307 Commits
Author SHA1 Message Date
Linus Rath c87c11734b feat: add a setting to keep the account switcher at the top of the sidebar, on by default 2026-11-04 15:19:11 +01:00
Linus Rath 1b7b689662 Merge branch 'feat/desktop-offline' into feat/do-ux-p2-mail-fix
# Conflicts:
#	components/ui/first-start-notice.tsx
2026-11-04 13:46:47 +01:00
Linus Rath 6975f96a4b Merge branch 'feat/desktop-offline' into feat/do-ux-p2-mail-fix
# Conflicts:
#	components/email/email-viewer.tsx
#	components/email/thread-conversation-view.tsx
#	components/mail/mail-app.tsx
#	components/ui/toast.tsx
#	lib/keyboard-shortcuts/mail.ts
#	lib/window-controls-overlay.ts
2026-11-04 13:37:49 +01:00
Linus Rath 09335c76c5 Merge branch 'feat/do-ux-p2-settings-fix' into feat/desktop-offline
# Conflicts:
#	components/settings/__tests__/notification-settings.test.tsx
2026-11-04 13:32:16 +01:00
Linus Rath 641489775b Merge branch 'feat/do-ux-p2-settings-ident' into feat/do-ux-p2-settings-fix 2026-11-04 12:39:57 +01:00
Linus Rath 3a2be9a7d4 fix: edit the name recipients see on the Account page and stop cutting account addresses
Settings > Account had a "Display name" that edited Stalwart's account
description, while mail went out with the identity's name, so changing
it changed nothing people saw. The page now shows "Your name", the
primary address's name, and saves it to that identity. The account
switcher and avatars take the same name; the principal description is
only used for an account without an identity name. The address editor
calls the field "Your name" too, and "identities" are "addresses" in
the Account section and its dialog, said once instead of twice.

Logged-in accounts show the server only for an account in trouble or
one sharing its address with another, with no drag hint or arrows for a
single account. The switcher wraps addresses instead of cutting them and
has no remove button per row; an account you're not in is removed from
Settings > Account.

Changed tests: auth-store-display-name now expects the identity name to
win over the principal; account-switcher-remove expects no remove
button on the rows; settings-editors-unsaved uses the renamed "Add
address" button and the "Your name" label, which has no placeholder.
2026-11-04 12:38:38 +01:00
Linus Rath 5e34dc59ab fix: name keys in the app's language in menus, hints and the shortcut help (Strg, Umschalt, Entf in German) 2026-11-04 12:09:08 +01:00
Linus Rath 760a400074 feat: turn out of office off from the banner in the mail sidebar 2026-11-04 12:04:03 +01:00
Linus Rath 78c9d9fba9 feat: tell folded folders apart, show their unread mail, and float out the whole tree on hover or from All folders 2026-11-04 11:50:12 +01:00
Linus Rath c2f80e2d29 fix: count every account's unread mail in the rail's Mail badge and the tab title, as the favicon does 2026-11-04 11:42:22 +01:00
Linus Rath 0a09fec123 fix: offer Empty Trash and Empty Spam only there, with the message count, and drop folder actions that can't apply
The folder menu tests no longer expect "Empty folder" on a folder of
your own: emptying is offered on Trash and Spam only now. The Mountain
View list test expects the entry to read "Empty Trash".
2026-11-04 11:30:11 +01:00
Linus Rath aa62855759 Merge branch 'feat/do-ux-settings-fixes' into feat/desktop-offline
# Conflicts:
#	components/layout/__tests__/account-switcher-mountain-view.test.tsx
#	components/layout/account-switcher.tsx
#	components/settings/accessibility-settings.tsx
#	components/settings/reading-settings.tsx
2026-11-04 09:44:51 +01:00
Linus Rath 81d017b2df Merge branch 'feat/do-ux-mail-fixes' into feat/desktop-offline 2026-11-04 09:24:33 +01:00
Linus Rath c2d7addbd7 fix: point the Alt menu bar's submenu arrows the right way in right-to-left languages 2026-11-04 09:24:29 +01:00
Linus Rath 4a764150b2 Merge branch 'feat/desktop-offline' into feat/do-ux-settings-fixes 2026-11-04 09:22:44 +01:00
Linus Rath fcc9fc0cc0 Merge branch 'feat/desktop-offline' into feat/do-ux-mail-fixes
# Conflicts:
#	components/email/email-viewer.tsx
#	components/mail/mail-app.tsx
#	components/offline/offline-host.tsx
#	components/ui/welcome-banner.tsx
#	locales/ar/common.json
#	locales/ca/common.json
#	locales/cs/common.json
#	locales/da/common.json
#	locales/de/common.json
#	locales/en/common.json
#	locales/es/common.json
#	locales/et/common.json
#	locales/fa/common.json
#	locales/fr/common.json
#	locales/he/common.json
#	locales/hu/common.json
#	locales/it/common.json
#	locales/ja/common.json
#	locales/ko/common.json
#	locales/lv/common.json
#	locales/mn/common.json
#	locales/nb/common.json
#	locales/nl/common.json
#	locales/pl/common.json
#	locales/pt/common.json
#	locales/ro/common.json
#	locales/ru/common.json
#	locales/sk/common.json
#	locales/th/common.json
#	locales/tr/common.json
#	locales/uk/common.json
#	locales/vi/common.json
#	locales/zh-TW/common.json
#	locales/zh/common.json
2026-11-04 09:11:09 +01:00
Linus Rath 044647ff34 fix: keep the desktop layout in a half-screen window and at 150 % zoom
A window snapped to half the screen (640-800 px) or a 1366x768 laptop
at 150 % (911 px) got the phone and tablet layout: bottom tab bar,
folders in a drawer, Settings as a phone list with a Back arrow. The
layout switched at the 64rem (1024 px) breakpoint.

Now the phone layout starts below 600 px. From 600 to 1024 px the app
is a compact desktop: app rail at the side, folder sidebar folded to
its icons (the existing collapsed state, opened per session with its
toggle), Settings with its two panes and a narrower page list. Below
840 px the split layout opens a message in the list's place, as the
focused layout does. This holds in the browser and the desktop app,
in the Pro shell (which now runs from 600 px) and under Mountain View.

- `hooks/use-media-query.ts`: classifyWidth, PHONE_BELOW 600,
  FULL_DESKTOP 1024; the tablet class (`isTablet`) is gone, the store
  has `isCompact` instead. Plugins still see "tablet" for it.
- `app/globals.css`: a `desk:` breakpoint at 37.5rem for the layout
  classes, and a `tap:` variant for 44px rows on phones and touch
  screens below 1024 px (was every window below 1024 px).
- Touch screens below 1024 px keep swiping list rows (was phones only).
- The boot skeletons, boot script, mail app, sidebar, reader, admin
  shell and calendar, contacts and files follow the new widths.

Tests changed with the behaviour: the tablet cases in pro-gate,
mail-app-mv-composer-move, mail-app-compose-handoff,
mail-app-thread-expand-mark-read, mobile-tour-end and
thread-list-item-columns now run on a phone or a compact desktop, as
those widths no longer exist as a tablet. mail-app-short-window-tab-bar
is replaced by mail-app-compact-layout: a phone on its side is a
compact desktop with the rail at the side, so the short-window tab bar
rule is gone. Class and media-query assertions follow desk:/tap: and
37.5rem; the 32px-text test uses 1100 px, since 1440 px at 32px is now
a compact desktop.
2026-11-04 09:07:06 +01:00
Linus Rath 2a726c0f4b fix: show unread counts in the account switcher and keep the open account's name
Each row shows name, address and the Inbox's unread count; the server
host only shows for an account in trouble or when two accounts share
an address. "Set as default" reads "Open this account at start" and the
star says so on hover. "Manage accounts…" opens Settings > Account. The
sidebar button keeps the open account's name with its address under
it, instead of switching to the address when another account with the
same name is added (the rows still lead with the address then).

Changed assertions: the Mountain View test expected the server line to
be hidden (it is no longer drawn) and the default layout to show no
unread counts (it shows them now); the same-name test expected the
sidebar button to lead with the address.
2026-11-04 08:08:26 +01:00
Linus Rath efa875ccc7 Merge branch 'feat/do-ux-mail-accounts' into feat/do-ux-mail-fixes
# Conflicts:
#	components/email/email-list.tsx
2026-11-04 07:23:30 +01:00
Linus Rath e29a6553e6 fix: keep notices and the offline bar clear of the window's controls, give each a close, and put a pane's close first where it would sit beside the window's 2026-11-04 07:02:53 +01:00
Linus Rath 0202803e77 fix: name system folders as the sidebar does in search result chips, the folder menu and the Spam banner 2026-11-04 06:53:17 +01:00
Linus Rath 295eb35671 fix: say a move, archive or delete once in its toast and drop the menu's ellipsis from the New folder dialog title
The delete Undo test looked for the "Email deleted" toast; a delete to Trash now says "Moved to Trash", so it looks for that one.
2026-11-04 06:44:45 +01:00
Linus Rath 4224149ab5 feat: move Compose to the top of the folder sidebar on desktop and keep one account switcher and one list menu
Two mail-app tests clicked the round Compose button on a desktop; their
mocked sidebar now draws the Compose button the real one has there.
2026-11-04 06:39:16 +01:00
Linus Rath 277e1aa55d Merge branch 'feat/do-menu-altbar' into feat/do-menu-fixes 2026-11-04 06:19:29 +01:00
Linus Rath 5fc87eafbd Merge branch 'feat/do-menu-audit' into feat/do-menu-fixes
# Conflicts:
#	components/email/email-context-menu.tsx
#	components/mail/mail-app.tsx
2026-11-04 06:19:07 +01:00
Linus Rath 60a97303c2 fix: open the folder when its unread count is clicked, and search all folders again on a new search
Two sidebar tests asserted the old unread-count button (it filtered the
folder to unread without opening it, in a 24px target); they now check
that the count is plain text and opens the folder.
2026-11-04 06:17:05 +01:00
Linus Rath daf67152eb Merge branch 'feat/do-menu-winctl' into feat/do-menu-fixes 2026-11-04 06:12:10 +01:00
Linus Rath 6efa589448 Merge branch 'feat/do-menu-pos' into feat/do-menu-fixes 2026-11-04 06:12:08 +01:00
Linus Rath 9ce7ac8172 feat: show unread per account in the switcher and count every account on the app badge and tray
The default layout's switcher listed accounts without their unread, so an
existing test asserted that (account-switcher-mountain-view, 'unread-free');
it now expects each account's count. The idle-outside-Pro hook test now
uses one account, since a second connected account loads in every layout.
2026-11-04 06:06:37 +01:00
Linus Rath f92b7d942d fix: grey out folder and message actions that can't work offline or with nothing unread 2026-11-04 05:32:23 +01:00
Linus Rath e74d2aaa72 fix: keep the app's own buttons out from under the window's controls and move a pane's close away from the window's 2026-11-04 05:27:57 +01:00
Linus Rath d8b2488f88 fix: order rule folder pickers like Move to, and refuse Drafts as a drop target 2026-11-04 05:22:03 +01:00
Linus Rath ff0e16c755 feat: show the desktop app's menu bar as a row at the top on Alt, or always 2026-11-04 05:20:02 +01:00
Linus Rath 3fa82849a8 fix: open menus next to what opened them and show their keys apart from the label 2026-11-04 05:00:02 +01:00
Linus Rath c8c98e79d4 feat: sign in to the desktop app in your browser, with your password manager
The desktop login page gets "Sign in with your browser…" as its main
button. On an instance it opens the instance's real login page in the
system browser, with a PKCE challenge. The page checks the password or
runs SSO, parks the sign-in under a one-time code, asks once, and sends
the code to the app's loopback listener. This browser gets no session
out of it, and the app's own page redeems the code, so SameSite=Strict
is fine. Standalone runs the mail server's OAuth against the listener,
with a page from main for a server with no OAuth at all.

- `/api/auth/desktop-handoff/park` and `redeem`, and `sso/complete` parks
  tokens the same way for a loopback target
- `auth.claim()`: the calls are taken once per document, in the first
  render, in `WindowControlsHost`
- `BrowserSignIn` policy, default on, with its ADMX and samples
- strings in all 30 languages, and the old button's are gone

`runDesktopBrowserSignIn`'s tests changed because the code no longer goes
through the callback page's address: it's redeemed where it arrives.
2026-11-04 01:09:12 +01:00
Linus Rath 529d334496 Merge branch 'fix/ui-bug-hunt' 2026-11-03 19:44:46 +01:00
Linus Rath deb73cc6e2 Merge branch 'feat/do-native-ui' into feat/desktop-offline 2026-11-03 18:28:49 +01:00
Linus Rath 383e579eec feat: run the app to the top of the window, with the window's controls in its own toolbars
The desktop app and an installed PWA had a row across the whole window
with the title and the window controls. That row is gone. The rail,
sidebar, list and reader run to the top of the window in their own
colours, and the controls sit in the top row of whatever is rightmost.

- `lib/window-controls-overlay.ts` finds and marks those rows before
  paint, and they reserve the controls' width through
  `--titlebar-right-inset`
- the rows and the rail are the drag area, everything clickable is
  `no-drag`, and an invisible band lets a page with no row still move
- settings and the admin shell get a row only under the overlay, Pro's
  tab strip and Mountain View's bar match the controls' height
- Alt floats the menu over the top left, in `window-menu-bar.tsx`
- skeletons carry the same marks, so nothing shifts when the app loads
2026-11-03 16:52:42 +01:00
Linus Rath af6cdfb997 fix: keep unsent mail through the idle and session limits, and mark a signed-out account in the switcher
The timers used to delete everything an account kept, unsent mail included.
They now follow the refused-login rule: sign out and hide, the next sign-in
brings it back, otherwise it goes after 30 days. A login without "Remember
me" that ends with the browser, an admin wipe and a wipe from settings don't
change.

- `wipeOnRefusedLogin` is now `wipeOnForcedSignOut`, since it also covers the
  limits. The server's `SESSION_TOO_OLD` goes the same way, as `session`.
- A refused account beside one that stays signed in shows in the switcher as
  needing sign-in, with the count and the date, and gets one toast.

Existing tests changed because the rule did: the session timer tests expected
a plain `logoutAll`, and the auth store tests expected no hook at the session
limit.
2026-11-03 16:36:13 +01:00
Linus Rath 2edd6b5ea7 fix: hold forced policies against spoofed plugins, recommended values and stopped servers
A forced value could be got around from inside the app. Only a forced
value may now decide what's allowed: the keys that do are forced-only,
so a recommended one no longer acts as forced. With a plugin list a
package can name any id, so uploads are refused and only managed
plugins can match. A server taken off AllowedJmapServers stops its
accounts without signing out: client, push and sync stop, the switcher
drops them, restore and refresh answer 403 with the cookie kept, and
listing it again resumes with no sign-in. OAuth and SSO starts check
the list too.

- `policy.onWipeOfflineData` is gone from the bridge: main runs the wipe
- `KeystoreAllowedOrigins` added, and `POLICY_CONSUMERS` names who acts
  on each key or who still owes it
- a Bulwark server's name must be plain after parsing, a wildcard in the
  auth lists needs a domain of two labels
2026-11-03 12:06:21 +01:00
Linus Rath fb0eeca9c5 fix: put the focus on the desktop menu strip once its names are on screen 2026-11-03 10:49:25 +01:00
Linus Rath d9c9fc03f7 feat: give the desktop app a native menu bar and native right-click menus built from the webmail's own 2026-11-03 10:44:03 +01:00
Linus Rath e24dd5876b fix: show folder names in the drawer when the sidebar was collapsed on a wider window 2026-11-03 09:22:17 +01:00
Linus Rath 6feb561d9a fix: keep the Mountain View Compose button inside the sidebar at large text 2026-11-03 08:30:12 +01:00
Linus Rath b086f45511 fix: give the Mountain View search field the free width and keep it clear of the bell at large text 2026-11-03 08:30:10 +01:00
Linus Rath c11f383fd7 fix: keep the Mountain View account card on screen on small phones 2026-11-03 07:41:54 +01:00
Linus Rath c8eeac19ad fix: show half of the next entry on a full phone tab bar instead of a cut-off sliver 2026-11-03 07:13:21 +01:00
Linus Rath bb2393cf04 feat: open messages and drafts in their own windows and save all attachments to a folder
An installed app had no title bar of its own, no way to save attachments
except a zip, and "pop out" stayed inside the page. A new window was a
second copy of the app that had to restore the session itself, and on
start-up that evicts any login made without "Remember me" from the list
every window shares.

- Title bar: `display_override` with `window-controls-overlay`, one
  `--titlebar-inset` variable at the page roots and skeletons, and a drag
  strip with the window title. 0 without an overlay, so nothing moves.
- Save all to a folder: `showDirectoryPicker`, asking the device policy
  before the picker and before each file, with the zip as the fallback.
- Pop-out routes `/popout/message/<id>` and `/popout/compose`, on offer in
  an installed app or when the desktop bridge has windows. Hidden in Lite.
- A pop-out borrows the main window's session and never evicts or starts a
  token timer. Every renewal now takes a Web Lock, so two windows can't
  send the same refresh token, which Stalwart 1.0 may treat as a replay.
- A draft moves to its window under the same id. A closing window hands
  unsaved text to the main window to save, since its own request wouldn't
  survive the close.
- Read state, drafts, theme and language follow across windows, and
  `html[data-desktop]` gates the app-like behaviour in `app/desktop.css`.
2026-11-03 06:50:21 +01:00
Linus Rath aa4851162e fix: fit all seven tab bar entries on a phone without cutting a German label 2026-11-03 06:44:26 +01:00
Linus Rath 2ba66e95e9 fix: let the whole rail scroll on a short window so every app stays reachable 2026-11-03 05:39:05 +01:00