feat(desktop): keep PearPass running in system tray when window is closed - #562
Open
andrey-dru-me1 wants to merge 1 commit into
Open
feat(desktop): keep PearPass running in system tray when window is closed#562andrey-dru-me1 wants to merge 1 commit into
andrey-dru-me1 wants to merge 1 commit into
Conversation
Keep PearPass running in the tray when the window is closed to maintain the browser extension connection without keeping a visible window open. - Intercept window close: hide to tray instead of quitting - Tray icon with Show/Quit context menu - Settings toggle persisted via devicePreferences.json - macOS dock show/hide on tray interaction - Refactor devicePreferences to generic boolean-key pattern
|
@andrey-dru-me1 i verified this on Linux and works just fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #561
Keep PearPass running in the tray when the window is closed, so the browser-extension connection stays alive without a visible window taking up space.
Requirements
Changes
Traycreation, window-close interception (win.on('close')),forceQuitflag,backgroundModeEnabledstate, and IPC handlers for show/hide/quitting.backgroundModeEnabledto the renderer.loggingEnabledkey to aDEFAULTSmap withcoerce()for any future boolean preferences. AddedbackgroundModeEnabled: falsedefault.backgroundModeEnabledvia the preload bridge.backgroundModeEnabledto theElectronAPItype.BACKGROUND_MODE_ENABLEDconstant.Testing Notes
devicePreferencesupdated and passing.Things reviewers should pay attention to
forceQuitflag pattern to distinguish close-vs-quit on macOS — check thatapp.quit()andapp.exit()are used in the right places.coerce()function in devicePreferences — this changes the write path forloggingEnabledtoo. Existing users upgrading will get theirloggingEnabledre-written as a boolean (already the case) but now via the generic function.isMacguards are in place, but dual-platform behavior should be verified.Screenshots/Recordings
Dependencies
TrayandMenumodules.