From 7da51fd7f060d4dd09da08f1970bb2ed271cccac Mon Sep 17 00:00:00 2001
From: n30nex
Date: Sun, 11 Oct 2026 23:34:03 -0400
Subject: [PATCH] Keep region handles and filters accessible during Follow
---
README.md | 2 +-
docs/netgraph.md | 2 +-
web/e2e/netgraph-regions.spec.ts | 2 ++
web/netgraph/index.html | 2 +-
web/src/netgraph/areas.ts | 1 +
web/src/netgraph/layout.ts | 4 +++-
web/src/netgraph/regionControls.ts | 21 +++++++++++++--------
web/src/netgraph/regionLayout.test.ts | 9 ++++++---
web/src/netgraph/renderer.ts | 1 -
web/src/netgraph/styles.css | 8 ++++++--
10 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/README.md b/README.md
index 93753cc..64d5dd2 100644
--- a/README.md
+++ b/README.md
@@ -180,7 +180,7 @@ the arrow buttons. **Reset region layout** restores the geographic arrangement.
Nodes keep their positions inside each bubble; routes and live packets follow
when the bubble moves. These controls change the diagram, not reported locations.
-Use **Regions** to search IATA/region codes or names and select multiple regions.
+Use **Regions** to search geographic region codes or names and select multiple regions.
**None** followed by one checkbox isolates a region; **All** restores the full mesh.
Only connections with both endpoints in the selected regions are shown. Search
and Follow respect this selection. Use **Routes** to hide standing connections;
diff --git a/docs/netgraph.md b/docs/netgraph.md
index b04203c..0ab047d 100644
--- a/docs/netgraph.md
+++ b/docs/netgraph.md
@@ -16,7 +16,7 @@ the arrow buttons. **Reset region layout** restores the geographic arrangement.
Nodes keep their positions inside each bubble; routes and live packets follow
when the bubble moves. These controls change the diagram, not reported locations.
-Use **Regions** to search IATA/region codes or names and select multiple regions.
+Use **Regions** to search geographic region codes or names and select multiple regions.
**None** followed by one checkbox isolates a region; **All** restores the full mesh.
Only connections with both endpoints in the selected regions are shown. Search
and Follow respect this selection. Use **Routes** to hide standing connections;
diff --git a/web/e2e/netgraph-regions.spec.ts b/web/e2e/netgraph-regions.spec.ts
index dc9d267..b840644 100644
--- a/web/e2e/netgraph-regions.spec.ts
+++ b/web/e2e/netgraph-regions.spec.ts
@@ -59,9 +59,11 @@ test('spacing and dragging survive refresh while live packets keep their routes
const touch = info.project.name !== 'desktop' ? await context.newCDPSession(page) : null;
if (touch) {
await touch.send('Input.dispatchTouchEvent', { type: 'touchStart', touchPoints: [{ id: 1, ...point }] });
+ await expect(stage).toHaveAttribute('data-moving-region', code);
await touch.send('Input.dispatchTouchEvent', { type: 'touchMove', touchPoints: [{ id: 1, x: point.x + 30, y: point.y + 24 }] });
} else {
await page.mouse.move(point.x, point.y); await page.mouse.down();
+ await expect(stage).toHaveAttribute('data-moving-region', code);
await page.mouse.move(point.x + 30, point.y + 24, { steps: 4 });
}
await page.evaluate(() => window.dispatchEvent(new CustomEvent('visual-packet', { detail: { seq: 1, id: 'new-connection', at: Date.now(), payloadType: 'Text', mode: 'route', segments: [{ routeId: 'reverse-hop', fromId: 'visual-b', toId: 'visual-a' }] } })));
diff --git a/web/netgraph/index.html b/web/netgraph/index.html
index 422f941..78ef59f 100644
--- a/web/netgraph/index.html
+++ b/web/netgraph/index.html
@@ -94,7 +94,7 @@
- Regions · All
+ Regions · All
Region layout
Drag a region label to move its whole bubble. Saved on this device.