Repository navigation
Connect every saved host at the app's start - #55
Merged
Merged
Conversation
A saved host can be left unconnected when the app starts, until the user opens it (hosts.Host.NoStartConnect). It is on for every host, those already saved included, in Hosts › Edit… and when adding one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: enowdev <enowdev@gmail.com>
The app already watched every host it didn't show, but a host signed in to by password waited for the user: its watch never read the keychain, so it connected only once the user switched to it and typed or unlocked the password, and only then did its sessions show. A watch now reads a saved password once per run, and a host it can't get one for waits as before. A watch's connecting gives up after 2 minutes, so a host that doesn't answer reads offline and is tried later; one offline is tried again at once when the window comes back or the machine wakes from sleep. A host with Connect at start off is watched only once the user opened it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: enowdev <enowdev@gmail.com>
Merged
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.
Saved hosts now connect in the background when the app starts, and their sessions list under On other hosts as soon as each answers, without switching to it.
Cause. The app already followed every saved host it didn't show over a background connection (
ui/watch.go), and listed their sessions. But that connection never read a saved password from the keychain (watchPasswordinui/secrets.go). A host signed in to by password therefore waited in "connect to sign in" until the user switched to it, which read the keychain. Only then did its sessions show.What changed
hosts.Host.NoStartConnect), is on by default, for hosts already saved too. Off, the host connects only once the user opens it, and is followed in the background from then on until the app quits.docs/daemon.md, "Every saved host, from the app's start".Still never automatic: a password not saved, an SSH key's passphrase, trusting a new server key, choosing whom to run as, a Tailscale SSH browser check. Those hosts show "connect to sign in" until the user opens them.
Tests:
TestHostsConnectAtStart, with stand-in connections:TestEditHostConnectAtStart: the switch at 900 and 520 px, saved and read back.go test ./ui/... ./core/hosts/...,go vetandGOOS=windows go vetpass.Not tried in the real app yet. In particular the macOS keychain prompt: after an update, macOS may ask once per host whether enowX can read the saved password. Sleep and wake, start-up time with an unreachable host, and the switch's look in the Edit dialog also need a hand check.
🤖 Generated with Claude Code