fix(p2p stats): improve own-IP geolocation and world map accuracy (#1138)

* fix(p2p stats): improve own-IP geolocation and world map accuracy

Resolve the user's public endpoint when libp2p only advertises private listen addresses, look up an accurate country flag for "Your IP", snap peer markers to country centroids, and add leeching seeder link plus panel layout tweaks.

* fix(p2p stats): skip caching own-IP lookups cancelled by abort

When the P2P stats panel unmounts mid-request, its AbortSignal cancels
the in-flight fetchOwnPublicEndpoint / fetchOwnIpCountryCode calls. Those
empty results were still cached for 30-60s, so reopening the panel within
that window showed "Your IP" as unavailable or without a country flag even
though nothing had actually failed. Skip caching when the signal aborted so
a later open retries. Addresses Cursor Bugbot finding.
This commit is contained in:
Tommaso Casaburi
2026-05-23 22:47:41 +07:00
committed by GitHub
parent 9c4bb28940
commit f5039285a7
12 changed files with 995 additions and 276 deletions
+2
View File
@@ -55,6 +55,8 @@
"scripts": {
"generate:assets": "node scripts/generate-asset-manifest.js",
"llms:generate": "node scripts/generate-llms-files.mjs",
"map:generate": "node scripts/generate-world-map-dots.mjs",
"centroids:generate": "node scripts/generate-country-centroids.mjs",
"release:manifest": "node scripts/generate-release-manifest.mjs",
"release:manifest:keygen": "node scripts/generate-release-manifest-keypair.mjs",
"sync:directories": "node scripts/sync-directories.js",