Skip to content

feat: Added commands and payload size to editor network stats#354

Open
eserkokturk-skyboxlabs wants to merge 2 commits intomainfrom
editor/payload-metrics-commands
Open

feat: Added commands and payload size to editor network stats#354
eserkokturk-skyboxlabs wants to merge 2 commits intomainfrom
editor/payload-metrics-commands

Conversation

@eserkokturk-skyboxlabs
Copy link

This PR adds support for showing action buttons under MinecraftMultiColumnStatisticTable header and support for running Minecraft commands from diagnostics_panel. Also added actions to control Editor network stats view and columns to display Sent/Received payload total sizes.

image

actions={actions}
keyLabel="Packet Type"
valueLabels={['Sent Count', 'Received Count', 'Min Size', 'Max Size']}
valueLabels={[

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work if you're using it with an older client that only sends 4 fields?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table will look distorted until you use the correct version. I think data driving this will help with that.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI actions to the diagnostics “Editor Network Stats” table and wires the diagnostics webview to forward “run Minecraft command” requests to the extension, alongside new columns for sent/received payload total sizes.

Changes:

  • Add action buttons (Reset/Pause/Resume) to MinecraftMultiColumnStatisticTable and expose an actions prop.
  • Add diagnostics webview → extension message flow for run-minecraft-command, routed through the existing shared event emitter.
  • Extend the “Editor Network Stats” table to display additional payload total size columns.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
webview-ui/src/diagnostics_panel/prefabs/tabs/EditorNetworkStats.tsx Adds table actions and new payload size columns for editor network stats.
webview-ui/src/diagnostics_panel/prefabs/TabPrefab.ts Extends tab prefab params with onRunCommand.
webview-ui/src/diagnostics_panel/controls/MinecraftMultiColumnStatisticTable.tsx Adds optional action button rendering under the table header.
webview-ui/src/diagnostics_panel/App.tsx Posts run-minecraft-command messages and passes handler into tab prefabs.
webview-ui/src/diagnostics_panel/App.css Styles the new action button row.
src/panels/minecraft-diagnostics.ts Forwards run-minecraft-command from diagnostics webview to the shared event emitter.
src/extension.ts Passes shared event emitter into diagnostics panel render calls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants