Settings Store

Versioned preferences, searchable settings, backup, and OS-keychain storage.

src/lib/settings/ owns a versioned settings.json through tauri-plugin-store. Unlike Electron, the schema, migrations, and persistence logic live in TypeScript; there is no IPC hop. In a native build the file lives in Tauri's app-config directory (typically ~/Library/Application Support/<app> on macOS, %APPDATA%\\<app> on Windows, and ~/.config/<app> on Linux).

The Zod schema validates each load and write. CURRENT_SETTINGS_VERSION is 10; forward migrations seed new defaults, while invalid or newer data falls back to safe defaults. Updates emit the typed settings-changed event, which the TypeScript tray and updater scheduler consume.

Settings center

SettingsPage has eight tabs: General, Appearance, Notifications, Shortcuts, Proxy, Storage, Updates, and Advanced. Account is /account. Updates disappears when the auto-update build flag is off. ?tab=appearance selects a tab, and SettingsSearch searches translated control labels, descriptions, and keywords. Each section uses use-settings-form to load settings once and save a partial patch.

Backup and secure values

The Storage section uses native dialog and filesystem plugins to export/import a Zod-validated JSON backup. It contains preferences and only the names of present secure keys—not token, session, or license values. Restoring on a new device requires signing in again.

Secure values use the Rust keyring crate and OS keychain behind a fixed SecureKey enum; webview code cannot probe arbitrary service keys. The command surface reports ENCRYPTION_UNAVAILABLE or STORAGE_FAILURE, never falls back to plaintext. Unsigned macOS development builds can prompt for keychain access. See Authentication for the session use case.

On this page