Repository navigation
Offer to restart a daemon older than the window - #119
Merged
Merged
Conversation
An update that only raises proto.Level keeps the old daemon serving the new window, and what the new Levels added that needs the daemon (pinned tabs, the remote control mark) quietly does nothing. A local window now shows Restart to finish on the update button while its daemon is behind; the click asks first, since programs in panes stop, then restarts it. dialOrStart's restart now also replaces a daemon of this Version at a lower Level. A --host window does not offer it: the restart would start that machine's own pitwall, which may be just as old.
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.
BLUF
After an update that only raises the protocol level, the old daemon keeps serving the new window, and the new daemon-side features (pinned tabs, the remote-control mark) silently do nothing. The sidebar's update button now reads Restart to finish while a local daemon is behind. Clicking it asks first, then restarts the daemon. Users no longer have to find a PID and
killit.Changes
cmd/pitwall/main.go:dialOrStartwithrestartalso replaces a daemon of this Version at a lower Level. Withoutrestartit connects as before.internal/ui/app/restart.go:daemonBehindis true for a local, connected daemon at a lower Level.updateLabelfalls back to "Restart to finish". The click opens a confirm dialog (Later / Restart now) that callsLinker.Restart.--hostwindows don't offer it, because the restart would start that machine's own pitwall, which may be just as old.docs/troubleshooting.mdand a CHANGELOG line.Linear
None.
Verification
gofmt,go vet ./...,go test ./...(-tags=novulkan).TestDialOrStartRestartsOlderLevel: a fake daemon atLevel-1servesdialOrStart(restart=false)and stays up. Withrestart=trueit's stopped and the replacement answers.TestRestartOlderDaemon: the label and the dialog show for an older local daemon, and not for a current one, a dropped link, or--host.🤖 Generated with Claude Code