Topology interaction improvements#113
Merged
Merged
Conversation
- Click empty space to deselect a selected node - Auto-clear client focus when the focused client disconnects: sessions are refetched immediately on SSE session_torn_down events and a watcher clears the focus state as soon as the client leaves the list
GyulyVGC
approved these changes
Jun 26, 2026
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.
Click empty space to deselect
Clicking anywhere on the topology canvas that isn't a node or edge now closes the detail panel and deselects the current selection. Previously the only way to deselect was to click the same node again.
Implementation: a transparent full-size
<rect>is added as the first (bottom) SVG child and firesPANEL_CLOSEDon click. Node and edge handlers callstopPropagation()so their clicks don't bubble through to the background.Auto-clear client focus on disconnect
When a client was selected from the Internet node panel and then disconnected, the topology stayed in the dimmed/focused state indefinitely. Now it clears automatically.
Two complementary mechanisms handle this:
session_torn_down, ifevent.client_ipmatches the focused client,FOCUS_CLEAREDis dispatched immediately without waiting for a data refresh.useEffecton[sessions, focusedClientIp]checks whether the focused IP still exists in the session list and dispatchesFOCUS_CLEAREDif not. This fires promptly because sessions are now also refetched on everysession_created/session_torn_downSSE event (previously only graph and chains were refetched on SSE).The two paths are complementary: the SSE check is the fast path; the sessions watcher is the reliable fallback in case of IP format differences between the SSE payload and the sessions API.