From 4b426e1469c6e6621d2b13171ed9780c6ef5e426 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 4 Nov 2026 12:38:35 +0100 Subject: [PATCH] fix: find the desktop app's own settings in search, and drop browser words from its pages Settings search knew none of the desktop app's rows, short words matched a dozen descriptions, and the app's Notifications, Privacy and Backup pages talked about websites, browsers and Safari. - Search indexes the app's rows when its bridge is there (tray, start at sign-in, menu bar, quiet hours, taskbar, default mail app, updates, developer tools, usage info, crash reports) with translated synonyms, and the browser-only push rows only in a browser. New synonyms for threads, block images, dark mode, timezone, reading pane, week start, empty trash and quiet hours. A single word of up to five letters looks only in names and synonyms, so "about" finds About. - In the app, Notifications has no push relay section; one row says the app tells about new mail while it runs, with a link to General. Its taskbar and quiet hours section is "On this computer". Privacy has no relay link there, Backup says "other devices". - In a browser that can't push, two sentences, and the home screen hint only on iPhone and iPad. - Several accounts get one notification switch each instead of a checklist with "Enable for selected" and "Disable for selected". - Developer tools show only with advanced settings on. - "Two-step sign-in" heads its section, "Pictures from company websites" replaces "Sender favicons", the Privacy relay link no longer points to a hidden choice, Offline warns about disk encryption once, and the reset confirm says what stays and whether other devices change. A reset keeps the choice to sync settings. Changed assertions: account-security-signin looks for the heading by its new name, settings-search expects the renamed rows, multi-account-push tests the switches that replace the checklist. --- .../__tests__/offline-settings.test.tsx | 10 + components/offline/offline-settings.tsx | 3 +- .../account-security-signin.test.tsx | 14 +- .../__tests__/multi-account-push.test.tsx | 115 ++++++----- .../__tests__/notification-settings.test.tsx | 37 ++++ .../__tests__/settings-p2-pages.test.tsx | 185 ++++++++++++++++++ .../settings-search-advanced.test.tsx | 3 +- .../settings-search-anchors.test.tsx | 92 ++++++++- components/settings/about-data-settings.tsx | 11 +- .../settings/account-security-settings.tsx | 3 +- .../settings/desktop-devtools-settings.tsx | 3 +- components/settings/desktop-os-settings.tsx | 15 +- components/settings/multi-account-push.tsx | 178 ++++++----------- components/settings/notification-settings.tsx | 40 +++- components/settings/privacy-settings.tsx | 20 +- components/settings/settings-app.tsx | 14 +- lib/__tests__/settings-search.test.ts | 106 +++++++++- lib/settings-search.ts | 94 +++++++-- locales/ar/common.json | 42 ++++ locales/ca/common.json | 42 ++++ locales/cs/common.json | 42 ++++ locales/da/common.json | 42 ++++ locales/de/common.json | 42 ++++ locales/en/common.json | 42 ++++ locales/es/common.json | 42 ++++ locales/et/common.json | 42 ++++ locales/fa/common.json | 42 ++++ locales/fr/common.json | 42 ++++ locales/he/common.json | 42 ++++ locales/hu/common.json | 42 ++++ locales/it/common.json | 42 ++++ locales/ja/common.json | 42 ++++ locales/ko/common.json | 42 ++++ locales/lv/common.json | 42 ++++ locales/mn/common.json | 42 ++++ locales/nb/common.json | 42 ++++ locales/nl/common.json | 42 ++++ locales/pl/common.json | 42 ++++ locales/pt/common.json | 42 ++++ locales/ro/common.json | 42 ++++ locales/ru/common.json | 42 ++++ locales/sk/common.json | 42 ++++ locales/th/common.json | 42 ++++ locales/tr/common.json | 42 ++++ locales/uk/common.json | 42 ++++ locales/vi/common.json | 42 ++++ locales/zh-TW/common.json | 42 ++++ locales/zh/common.json | 42 ++++ stores/settings-store.ts | 5 +- 49 files changed, 1987 insertions(+), 221 deletions(-) create mode 100644 components/settings/__tests__/settings-p2-pages.test.tsx diff --git a/components/offline/__tests__/offline-settings.test.tsx b/components/offline/__tests__/offline-settings.test.tsx index e7f87f5af..1e7ee9c2b 100644 --- a/components/offline/__tests__/offline-settings.test.tsx +++ b/components/offline/__tests__/offline-settings.test.tsx @@ -174,3 +174,13 @@ describe('the offline banner', () => { expect(screen.queryByTestId('offline-banner')).toBeNull(); }); }); + +// settings-p2-18: in a browser the page said "use disk encryption" twice, +// once in the warning and again in the key note below it. +describe('Settings > Offline in a browser', () => { + it('warns about the browser profile once', async () => { + await act(async () => { render(); }); + expect(screen.getByTestId('offline-warning').textContent).toBe('warning'); + expect(screen.queryByText('browser_note')).toBeNull(); + }); +}); diff --git a/components/offline/offline-settings.tsx b/components/offline/offline-settings.tsx index e68c57ac7..a96f5d15a 100644 --- a/components/offline/offline-settings.tsx +++ b/components/offline/offline-settings.tsx @@ -68,7 +68,8 @@ export function OfflineSettings() {