Repository navigation
fix: load settings when the autostart probe fails - #259
Merged
Merged
Conversation
GetSettings returned the login-item probe's error as its own, so a build that cannot probe autostart could not read any setting. A server build has no login items and fails that probe on every read, which left the backup and terminal controls disabled behind "could not read the backup setting". The stored value now stands in when the probe fails. SaveSettings is unchanged and still reports the failure when the user changes the switch. Refs #258 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 tasks done
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
RuntimeService.GetSettingsreturned the login-item probe's error as its own. A build that cannot probe autostart therefore could not read any setting, and the Settings page left the backup and terminal controls disabled behind "Could not read the backup setting".The probe failure no longer fails the read: the value stored in the settings file stands in for it.
SaveSettingsis unchanged, so changing the switch on such a build still reports the failure.This is work package P0-A of #258.
Refs #258
Classification
The issue asks that this be classified before it is called a product bug.
autostart_server.goreturnsErrAutostartNotSupportedfrom every status call, so the probe fails on every read. With the backend fix reverted, the new e2e test fails with the backup field stuckdisabled.~/Library/LaunchAgentsand an unavailable or unapprovedSMAppServiceare both reported as "not enabled" without an error. The native error paths that remain are abnormal ones, such as an unreadable LaunchAgents directory or a registry key that cannot be opened. Those are covered by the same change, but no native run was done on macOS, Windows or Linux.Test plan
TestGetSettingsSurvivesAFailingAutostartProbefails before the change and passes aftersettings load in a build that cannot probe autostartfails before the change and passes aftergo test ./...andgo vet ./...pnpm run test(594 passed) andpnpm run buildpnpm run test:e2e(14 passed)🤖 Generated with Claude Code