Skip to content

fix: load settings when the autostart probe fails - #259

Merged
yujiezhang-ops merged 1 commit into
mainfrom
fix/settings-autostart-probe
Nov 19, 2026
Merged

yujiezhang-ops merged 1 commit into
mainfrom
fix/settings-autostart-probe

Conversation

@yujiezhang-ops

Copy link
Copy Markdown
Collaborator

Summary

RuntimeService.GetSettings returned 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. SaveSettings is 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.

  • Server / e2e build: reproduced. Wails' autostart_server.go returns ErrAutostartNotSupported from every status call, so the probe fails on every read. With the backend fix reverted, the new e2e test fails with the backup field stuck disabled.
  • Native desktop: not reproduced, and not expected in normal use. I read the Wails darwin implementation rather than running a native window: a missing ~/Library/LaunchAgents and an unavailable or unapproved SMAppService are 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

  • New Go test TestGetSettingsSurvivesAFailingAutostartProbe fails before the change and passes after
  • New e2e test settings load in a build that cannot probe autostart fails before the change and passes after
  • go test ./... and go vet ./...
  • pnpm run test (594 passed) and pnpm run build
  • pnpm run test:e2e (14 passed)
  • Settings page checked in a native desktop window

🤖 Generated with Claude Code

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>
@yujiezhang-ops
yujiezhang-ops requested a review from a team November 19, 2026 08:22
@yujiezhang-ops
yujiezhang-ops merged commit 3bfbef1 into main Nov 19, 2026
4 checks passed
@yujiezhang-ops
yujiezhang-ops deleted the fix/settings-autostart-probe branch November 19, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant