Improve active device discovery, ISP lookup, and identity persistence - #48
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed shutdown and active-probe thread-lifetime hazards that can lead to use-after-free/stack-use-after-scope in normal execution paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR enhances LinkPulse’s Windows network discovery and UI by combining passive neighbor snapshots with bounded active ARP probing, persisting device identity metadata across restarts, and adding background ISP/public-IP enrichment that is displayed on the network map and used for more informative notifications.
Changes:
- Add bounded active IPv4 ARP probing and improve neighbor-state filtering so disconnected devices don’t linger and idle devices can still be found.
- Introduce a persistent MAC-keyed XML device metadata store (XmlLite) and apply it to both map rendering and join/leave notifications.
- Add background ISP lookup (WinHTTP) and expandable ISP details in the network map UI, plus device-type icons.
File summaries
| File | Description |
|---|---|
| src/ui/tray_win32.c | Starts ISP/device-store workflows, enriches discovery events, and wires new shutdown behavior. |
| src/ui/network_map_win32.c | Adds device-type glyphs and expandable ISP detail rendering in the map UI. |
| src/platform/win32/isp_win32.c | Implements WinHTTP-based ISP/public-IP lookup. |
| src/platform/win32/discovery_win32.c | Improves neighbor filtering and adds bounded active ARP probing. |
| src/platform/win32/device_store_win32.c | Implements XmlLite-backed persisted device metadata store. |
| include/linkpulse/isp.h | Adds the ISP info data model + lookup API. |
| include/linkpulse/discovery.h | Extends neighbor/network structs to carry persisted identity + ISP info. |
| include/linkpulse/device_store.h | Declares the Win32 device store API. |
| CMakeLists.txt | Adds new Win32 sources and links XmlLite/Shlwapi. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Validation