Skip to content

Add world.inspect methods to the Bevy Remote Protocol - #25883

Merged
alice-i-cecile merged 4 commits into
bevyengine:mainfrom
jbuehler23:jackdaw/inspector-brp-verbs
Sep 25, 2026
Merged

alice-i-cecile merged 4 commits into
bevyengine:mainfrom
jbuehler23:jackdaw/inspector-brp-verbs

Conversation

@jbuehler23

@jbuehler23 jbuehler23 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #25866. Review the last commit only pls!

Objective

Part of #23013.

Expose the inspection backend over the Bevy Remote Protocol so remote tools get labels, metadata, display strings and structured values from one call instead of assembling them from raw queries.

Ported from feathers_inspector, phase 5 of the upstreaming strategy there. The BRP module was originally written by @Nilirad.

Solution

Seven instant methods in a new inspection methods module, registered with the other defaults.

  • world.inspect for an entity, world.inspect_component and world.inspect_component_type
  • world.inspect_resource and world.inspect_all_resources
  • world.summarize for entity, archetype and resource counts
  • registry.component_metadata for the type map clients cache

Structured values are always on for remote replies. Unknown type names return a new error code. Serde derives for the world summary types are here too since they were waiting on the serde PR.

Not exposed: the cached variant of inspect, multi-entity inspection and fuzzy name lookup, which wait on #25010 and #25028.

AI disclosure

This is part of the inspector upstreaming series. When I started it, I worked out the goals and scope with Alice and used AI to split the working Jackdaw and feathers_inspector code into small reviewable pieces. For this one, AI did the mechanical port of the BRP verbs into bevy_remote and wrote the tests, and I reviewed the code and had it double check for problems. That turned up two things. CI never enables the client feature, so the new integration tests (and the client's own round trip tests from #25837) would have compiled empty, which is why bevy_remote now lists itself as a dev-dependency with client on. CodeQL also flagged test assertions that printed whole JSON replies as cleartext logging, so those messages are gone.

@jbuehler23
jbuehler23 force-pushed the jackdaw/inspector-brp-verbs branch from cc2510d to 537c65e Compare September 22, 2026 15:01
@jbuehler23 jbuehler23 added C-Feature A new feature, making something new possible A-Dev-Tools Tools used to debug Bevy applications. D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 22, 2026
Comment thread crates/bevy_remote/src/inspection_methods.rs Fixed
Comment thread crates/bevy_remote/src/inspection_methods.rs Fixed
Comment thread crates/bevy_remote/src/inspection_methods.rs Fixed
@jbuehler23
jbuehler23 force-pushed the jackdaw/inspector-brp-verbs branch from 537c65e to 448a6a5 Compare September 22, 2026 16:16
Comment thread crates/bevy_remote/src/inspection_methods.rs
Comment thread crates/bevy_remote/src/inspection_methods.rs

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM now :)

@jbuehler23
jbuehler23 force-pushed the jackdaw/inspector-brp-verbs branch from 8977af0 to 4b15930 Compare September 24, 2026 07:54

@stuartparmenter stuartparmenter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@stuartparmenter stuartparmenter added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 25, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 25, 2026
Comment thread crates/bevy_remote/src/inspection_methods.rs Outdated
@alice-i-cecile

Copy link
Copy Markdown
Member

Let me know when CI is green :)

@jbuehler23

Copy link
Copy Markdown
Contributor Author

Let me know when CI is green :)

All good now!

@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 25, 2026
Merged via the queue into bevyengine:main with commit 0f38358 Sep 25, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants