From 3a2be9a7d45cdb20ef45d0d57b9facec73cc03b3 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Wed, 4 Nov 2026 12:38:38 +0100
Subject: [PATCH] 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.
---
components/identity/identity-form.tsx | 10 +-
.../identity/identity-manager-modal.tsx | 27 ++--
.../account-switcher-remove.test.tsx | 42 +++---
components/layout/account-switcher.tsx | 54 ++-----
...ccount-settings-name-and-accounts.test.tsx | 112 ++++++++++++++
.../__tests__/identity-settings.test.tsx | 14 ++
.../settings-editors-unsaved.test.tsx | 5 +-
.../settings/account-security-settings.tsx | 54 -------
components/settings/account-settings.tsx | 138 ++++++++++--------
components/settings/identity-settings.tsx | 20 +--
components/settings/your-name-row.tsx | 76 ++++++++++
.../settings-search-addresses.test.ts | 34 +++++
lib/account-utils.ts | 14 ++
lib/settings-search.ts | 6 +-
locales/ar/common.json | 33 +++++
locales/ca/common.json | 33 +++++
locales/cs/common.json | 33 +++++
locales/da/common.json | 33 +++++
locales/de/common.json | 33 +++++
locales/en/common.json | 33 +++++
locales/es/common.json | 33 +++++
locales/et/common.json | 33 +++++
locales/fa/common.json | 33 +++++
locales/fr/common.json | 33 +++++
locales/he/common.json | 33 +++++
locales/hu/common.json | 33 +++++
locales/it/common.json | 33 +++++
locales/ja/common.json | 33 +++++
locales/ko/common.json | 33 +++++
locales/lv/common.json | 33 +++++
locales/mn/common.json | 33 +++++
locales/nb/common.json | 33 +++++
locales/nl/common.json | 33 +++++
locales/pl/common.json | 33 +++++
locales/pt/common.json | 33 +++++
locales/ro/common.json | 33 +++++
locales/ru/common.json | 33 +++++
locales/sk/common.json | 33 +++++
locales/th/common.json | 33 +++++
locales/tr/common.json | 33 +++++
locales/uk/common.json | 33 +++++
locales/vi/common.json | 33 +++++
locales/zh-TW/common.json | 33 +++++
locales/zh/common.json | 33 +++++
.../__tests__/auth-store-display-name.test.ts | 59 +++++---
stores/auth-store.ts | 19 ++-
stores/identity-store.ts | 18 ++-
47 files changed, 1451 insertions(+), 241 deletions(-)
create mode 100644 components/settings/__tests__/account-settings-name-and-accounts.test.tsx
create mode 100644 components/settings/your-name-row.tsx
create mode 100644 lib/__tests__/settings-search-addresses.test.ts
diff --git a/components/identity/identity-form.tsx b/components/identity/identity-form.tsx
index e48c83d54..b1717b352 100644
--- a/components/identity/identity-form.tsx
+++ b/components/identity/identity-form.tsx
@@ -34,6 +34,7 @@ export function IdentityForm({ identity, onSave, onCancel, onDirtyChange }: Iden
const t = useTranslations('identities.form');
const tValidation = useTranslations('identities.validation_errors');
const tOrg = useTranslations('org_signature');
+ const tName = useTranslations('uxs2_ident.your_name');
const isEditing = !!identity;
// Composing > Plain text only: the signature is plain text too.
const plainTextMode = useSettingsStore((s) => s.plainTextMode);
@@ -156,8 +157,9 @@ export function IdentityForm({ identity, onSave, onCancel, onDirtyChange }: Iden