Repository navigation
Say why home-network sync can't find a linked machine - #218
Merged
Merged
Conversation
When Home network sync can't find a linked machine, the Sync & backup line now names it and, when this machine can tell, why: a VPN or virtual adapter carrying the broadcasts, no network, Windows calling the network Public, macOS Local Network access off, another Patch Pilot version, or another rig's Patch Pilot on the network. It no longer says "In sync" while nobody is here. The details list each machine and a checklist. - patchpilot_local::lan_diagnosis: pure diagnose() over gathered facts, adapter classification (name and Windows description), egress kind, bind error wording; tested with hand-built facts. - patchpilot_local::netinfo: read-only probes (UDP connect + local_addr, sysinfo interfaces, PowerShell adapter description and profile with a 5 s deadline at below-normal priority). - lan::read tells this rig, another version, another rig and noise apart. - sync.rs keeps the relay's list of linked machines, so machines added from an export file or removed never show as missing. - lan.rs gathers facts on the existing 10 s beacon thread, looks at the network only while a machine is missing and none is here, and tells the UI only when the diagnosis changes. Decision #123 (amends #94). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # app/CHANGELOG.md
bfieser
added a commit
that referenced
this pull request
Nov 7, 2026
4 of 6 tasks
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 #216. Decision #123 (amends #94), marked Proposed for you to accept or change.
Why
I linked my desktop and laptop and picked Home network. The laptop was on another Wi-Fi and a VPN, so the machines never heard each other's beacons. Linking had worked (relay only) and the top bar said "Machines linked", but the Sync & backup line showed "Looking for your other machines on this network…" forever (or a green "In sync…"), with no reason. Send errors and other-rig beacons were silently dropped.
What the user sees now
Causes this machine can actually tell, surest first: other Patch Pilot version · no Wi-Fi/Ethernet address · broadcasts leaving via a VPN or virtual adapter · macOS Local Network denied (strong guess) · Windows network set to Public · another rig's Patch Pilot on the network · VPN holding the internet route (guess). Anything on the other machine's side stays on the checklist; comparing both machines over the relay is a later PR.
How
crates/local/src/lan_diagnosis.rs(new): purediagnose(Facts) -> Diagnosis, adapter classification by name and Windows description (GlobalProtect calls its adapter "Ethernet 4"), egress kind (a "virtual" adapter carrying the internet route counts as home network, for Hyper-V external switches), bind error wording (10013 = Windows reserved port, not "another app").crates/local/src/netinfo.rs(new, read-only, sends nothing): UDP connect +local_addrfor the broadcast and default-route source addresses; sysinfonetworkfeature for interfaces (unsafe stays inside sysinfo); PowerShellGet-NetAdapter/Get-NetConnectionProfilewith exact name match, env-var input, no window, below-normal priority, 5 s deadline.lan::readtells this rig / other version / other rig / noise apart (minimum sealed length so junk is noise).sync.rskeeps the relay'smachine/listing ids (no extra relay reads, Release 0.4.2, with "Bring over all Reaper scripts" #113), recorded before pulling.lan.rs: facts gathered on the existing 10 s beacon thread. The network is looked at only while a machine is missing, nobody is here and the grace is over (at most every 30 s; PowerShell cached 10 min per adapter). The UI is told only when the diagnosis changes.view()only reads caches. Nothing happens while unlinked. Only the broadcast's send result counts. A pull error clears (atomically) once its machine is gone.syncLine/ newLanMachinesinBackup.tsx; types inapi.ts(optional fields per Bring over: scripts and packages travel with every file they need; whole folders from Compare #112).Changelog: added under Unreleased since #215 is cutting 0.4.57; rename it when releasing.
Testing
cargo fmt --check,cargo clippy -D warnings(workspace and app),cargo test --workspace(463 pass, new tests for every diagnosis case, beacon classes, adapters, egress, external switch, bind errors, PowerShell output parsing), appcargo test,npm run build.🤖 Generated with Claude Code