(remote): keep descriptors on a failed refresh, let a manual refresh force reconnection - #255
Merged
Merged
Conversation
…force reconnection A transient ssh timeout used to wipe the remote descriptor cache, so every remote session read as non-attachable for the whole backoff window while the tmux sessions were alive, and refreshHostNow/refreshNow honoured the backoff unconditionally, leaving a manual refresh powerless during that window. Descriptors now survive a failed cycle; a forced refresh (sidebar button, or a per-host action next to the host dot) ignores backoff and restarts the watch channel for the affected host.
This was referenced Sep 11, 2026
Merged
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.
Closes #252.
Why
Measured on 2026-09-10 17:41, right after an app restart: the first inventory refresh hit an ssh connect timeout while the watch channel had opened 17 s earlier and probes right after answered in 0.5–7.6 s. On a failed refresh
remote-index.jswiped the host's descriptors, so every remote session became non-attachable (click opened the transcript) for the whole 300 s backoff, while the tmux sessions were alive. The manual refresh could not help:refreshHostNowhonoured the backoff, and the only way out was toggling the host in Settings.What
refreshNow({ force })/refreshHostNow(alias, { force })reset the backoff and run immediately; the automatic caller stays unforced.remote-hosts-refreshis forced and restarts the watch channel per enabled host; newremote-host-refresh(alias)does it for one host.killChildalready clears a pending restart timer, so a restart never double-spawns.remote-host-connectinguntil the next render.Proof
Mutations on the shipped files: restore the wipe → "keeps the last known descriptors" test red; drop the
forcebranch → forced-refresh test red, automatic-backoff test green.task check: 1235 pass, 0 fail, 8 pre-existing skips.Not covered by a test: the watch-channel restart inside the IPC handlers (
main.jshas no IPC harness).