Repository navigation
feat(settings): add Start on system startup toggle - #1799
Open
MoriDanWork wants to merge 1 commit into
Open
MoriDanWork wants to merge 1 commit into
MoriDanWork wants to merge 1 commit into
Conversation
…ettings dialog Adds an autostart switch to the General section of the dashboard Settings dialog. In a desktop build it reads and writes the OS-level "open at login" flag through the preload bridge, mirroring the tray popover's existing login-item toggle; in a plain browser the row is hidden. - desktop: expose freeapi:get-login-item IPC and a __FREEAPI_LOGIN_ITEM__ preload bridge (get/set) for the dashboard renderer - client: useDesktopLoginItem hook + Settings row with an optimistic toggle that rolls back if the shell rejects the change - i18n: add startAtLogin / startAtLoginHelp to all 60 locales - tests: settings-start-at-login.test.tsx covering render, hide, toggle and rollback
This branch has not been deployed
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.
Summary
Adds a Start on system startup toggle to the dashboard Settings → General dialog. When enabled in a desktop build, FreeLLMAPI launches automatically when the user signs into the OS — the same "open at login" flag the tray popover already controls, now reachable from the Settings UI.
What changed
desktop/src/main.tsfreeapi:get-login-itemIPC handler mirroring the existingset-login-item; both read/writeapp.getLoginItemSettings().desktop/src/preload.ts__FREEAPI_LOGIN_ITEM__preload bridge (get/set) so the dashboard renderer can read and flip the OS flag.client/src/lib/desktop-login-item.tsuseDesktopLoginItem()hook: resolves the current state once, toggles optimistically, and rolls back if the shell rejects the change.client/src/components/settings-dialog.tsxRow+Switchpattern (label + info hint on the left, switch on the right). Hidden in a plain browser where there is no desktop shell.client/src/i18n/locales/*.jsonstartAtLogin/startAtLoginHelpstrings added to all 60 locales.client/src/components/settings-start-at-login.test.tsxDesign
Follows the existing Settings dialog conventions exactly: the shared
Rowlayout, theSwitchcontrol, anInfoHinttooltip, and the samet('settings.…')i18n keys as every other row. The row appears under General, after language and theme.Testing
npm test -w client— 440 tests pass, i18n validation passes for all 60 locales.npm test(desktop) — 76 tests pass.tsc -b,vite build, and the desktopbuild:main+build:preloadall succeed.