feat: per-account All Mail folder selection

Replaces the global allMailFolderIds (string[] | null) with a per-account
Record<accountId, string[]>, so each account chooses which of its own folders
the "All Mail" view merges. A missing entry = "not configured" (defaults to
every no-role folder); an explicit [] = "no folders".

- settings-store: type/default -> Record (default {}); persist version 4 -> 5,
  migration drops the legacy global list (the active account isn't known at
  migrate time); onRehydrate + importSettings coerce/ignore any non-record
  (legacy global string[] | null) shape. isPlainRecord() guard.
- email-store.resolveAllMailJmapIds: reads the entry for the account the view is
  scoped to (viewingAccountId ?? activeAccountId); undefined -> all no-role,
  [] -> none.
- layout-settings: read/write the active account's entry; when more than one
  account is logged in, an italic hint names the account the selection applies
  to (settings.appearance.all_mail.account_hint, 19 locales; de/ro translated).
- Test: stores/__tests__/settings-store-all-mail.test.ts (per-account
  independence, explicit-empty vs not-configured, importSettings legacy guard).
This commit is contained in:
Stefan Hildebrandt
2026-06-24 15:52:09 +02:00
committed by Linus Rath
parent 5c2f206c74
commit 751f3c1685
23 changed files with 133 additions and 12 deletions
+1
View File
@@ -922,6 +922,7 @@
"description": "Afișați o intrare „Toate mesajele” deasupra folderelor, care reunește mesajele din toate folderele acestui cont într-o singură listă.",
"folders_label": "Dosare în „Toate mesajele”",
"folders_description": "Alegeți ce dosare să fie incluse în vizualizarea „Toate mesajele”.",
"account_hint": "Se aplică pentru {account}.",
"no_folders": "Nu sunt disponibile foldere."
},
"colorful_sidebar_icons": {