feat(electron): add Windows startup and system tray support (#2112)

Add Windows launch-at-login with background startup support and extend the
native tray integration to Windows.

Add a Windows-only setting to minimize or close the main window to the
system tray, persist it through desktop settings, and expose it in Settings
search and all locale dictionaries.

Keep tray state synchronized with live sessions on both macOS and Windows,
while preserving the existing macOS behavior.
This commit is contained in:
achcyano
2026-07-10 12:40:48 +03:00
committed by GitHub
parent 51e6ae7e3f
commit 4296efb64d
20 changed files with 325 additions and 39 deletions
@@ -181,6 +181,9 @@ export const createSettingsHelpers = (dependencies) => {
if (typeof candidate.desktopKeepAwakeEnabled === 'boolean') {
result.desktopKeepAwakeEnabled = candidate.desktopKeepAwakeEnabled;
}
if (typeof candidate.desktopMinimizeToTrayEnabled === 'boolean') {
result.desktopMinimizeToTrayEnabled = candidate.desktopMinimizeToTrayEnabled;
}
if (typeof candidate.desktopUiPassword === 'string') {
result.desktopUiPassword = candidate.desktopUiPassword.trim();
}
@@ -100,6 +100,17 @@ describe('settings helpers', () => {
});
});
it('accepts desktopMinimizeToTrayEnabled as a persisted shared setting', () => {
const helpers = createTestHelpers();
expect(helpers.sanitizeSettingsUpdate({ desktopMinimizeToTrayEnabled: true })).toEqual({
desktopMinimizeToTrayEnabled: true,
});
expect(helpers.sanitizeSettingsUpdate({ desktopMinimizeToTrayEnabled: false })).toEqual({
desktopMinimizeToTrayEnabled: false,
});
});
it('accepts desktopUiPassword as a persisted shared setting', () => {
const helpers = createTestHelpers();