From 9763ffa2a33de993bda0b4b95038e8884de552c2 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 21 May 2026 15:39:02 +0200 Subject: [PATCH] fix: keep proInterface per-device instead of syncing it --- stores/settings-store.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/stores/settings-store.ts b/stores/settings-store.ts index 3b013192..3c2ebd7a 100644 --- a/stores/settings-store.ts +++ b/stores/settings-store.ts @@ -43,6 +43,14 @@ export type MailLayout = 'split' | 'focus' | 'horizontal'; export type CalendarHoverPreview = 'off' | 'instant' | 'delay-500ms' | 'delay-1s' | 'delay-2s'; export type ProtocolOpenMode = 'active-session' | 'new-tab'; +/** + * Settings that must never round-trip through the cross-device sync API. + * Decided per device and kept only in the local zustand-persist storage — + * a value already stored on the server (from a prior build) is ignored on + * import. + */ +const DEVICE_LOCAL_SETTING_KEYS = new Set(['proInterface']); + export type HoverAction = 'delete' | 'star' | 'markRead' | 'archive' | 'tag' | 'spam'; export type HoverActionsMode = 'inline' | 'floating'; export type HoverActionsCorner = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; @@ -512,7 +520,8 @@ export const useSettingsStore = create()( toolbarPosition: state.toolbarPosition, hideAccountSwitcher: state.hideAccountSwitcher, showRailAccountList: state.showRailAccountList, - proInterface: state.proInterface, + // proInterface is intentionally omitted — it's a per-device choice + // (see DEVICE_LOCAL_SETTING_KEYS) and must not be synced. enableUnifiedMailbox: state.enableUnifiedMailbox, senderFavicons: state.senderFavicons, showAvatarsInJunk: state.showAvatarsInJunk, @@ -557,6 +566,9 @@ export const useSettingsStore = create()( if (key === 'subAddressDelimiter' && !isValidSubAddressDelimiter(settings[key])) { return; } + if (DEVICE_LOCAL_SETTING_KEYS.has(key)) { + return; + } set({ [key]: settings[key] }); } });