Link online players to their network traffic - #916
Open
sven-n wants to merge 1 commit into
Open
Conversation
The analyzer page can now be opened for a player, from the list of the
online accounts and from the player list of the live map.
Instead of resolving the connection id in the page which offers the link,
the analyzer page got a route which takes the server and the name:
/network-analyzer/player/{ServerId:int}/{PlayerName}
The lookup then happens when the link is opened, so a link doesn't get
stale while the page which shows it is open. When the player is gone by
then, the page says so instead of silently showing nothing.
The map keeps its independence from the admin panel: the route is passed
down as a cascading value, just like the route of the live map itself, and
without one the button simply isn't rendered - which is what happens in the
game server host of the distributed deployment, where there is no analyzer
page to link to.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pb82LmoaUVdZtBtQs7xrtA
This was referenced Aug 29, 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.
Phase 4 of #895. The analyzer page can now be opened for a specific player, from the list of the online accounts and from the player list of the live map.
A route instead of a resolved id
The plan had the linking page resolve the connection id through
IPacketCaptureService.Find(serverId, name)and link tonetwork-analyzer/{id}. The analyzer page got a second route which takes the name instead:The lookup happens when the link is opened, not while the list is rendered, so a link can't go stale in a list which is a few seconds old — and the account list is a paged
DataTablewhich doesn't refresh on its own at all. When the player is gone by the time the link is used, the page says so instead of showing an empty grid:The note disappears as soon as a connection is selected in the sidebar.
PlayerNameis matched against the character and the account name (that's whatFindConnectionAsync(serverId, name)from phase 2 does), so the account name from the online list and the character name from the map both work.The two links
LoggedIn.razor— a button next to Disconnect for each online account. The offline/AFK-trade players in the second table have no connection, so they don't get one (decision 1 of the issue).MapPlayerList.razor— a button in the row of each player, next to Disconnect and Ban.Both are only rendered when the analyzer is actually there: the admin panel page asks the service provider for an
IPacketCaptureService, exactly like the menu entry does.The Map project stays independent of the admin panel. It gets no reference to the analyzer: the route arrives as a cascading value from the hosting page — the same mechanism
LiveMapRoutealready uses — and without one no button is rendered. That's what happens inDapr/GameServer.Host, which renders the map but has no analyzer page to link to.Tests
5 new tests in
MUnique.OpenMU.Web.Tests:network-analyzer/player/3/Test%20Account;There is no component test for the map's button: a
MapPlayerListrow needs aPlayerwith a selected character, which can only be reached through the real character selection — that's more test scaffolding than the markup is worth. The page-side of the same mechanism is covered by the two link tests above.Verification
dotnet build src/MUnique.OpenMU.sln -p:ci=true→ 0 errors, no warning from a file this PR touches.MUnique.OpenMU.Tests802,Web.Tests68,PlugIns.Tests41,Persistence.Initialization.Tests12/2 skipped,Network.Testsgreen).🤖 Generated with Claude Code
https://claude.ai/code/session_01Pb82LmoaUVdZtBtQs7xrtA
Generated by Claude Code