Skip to content

feat: Show the component lifecycle state in DevTools - #4245

Merged
spydon merged 4 commits into
flame-engine:mainfrom
ywt-helloworld:feat/devtools-lifecycle-state-4171
Dec 1, 2026
Merged

spydon merged 4 commits into
flame-engine:mainfrom
ywt-helloworld:feat/devtools-lifecycle-state-4171

Conversation

@ywt-helloworld

@ywt-helloworld ywt-helloworld commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

This adds the component lifecycle state to the DevTools extension, as requested in #4171.

  • Adds a lifecycleState(Component) helper in ComponentTreeConnector that reports where a component is in its lifecycle: Removing, Mounted, Loaded, Loading, or Detached, following the issue's suggested implementation (checked in that exact order).
  • The state is included in the ext.flame_devtools.getComponentInfo service extension response.
  • On the extension side, Repository.getComponentLifecycleState reads it, a componentLifecycleStateProvider exposes it, and the selected component section shows it as State: <state>. It is refreshed by the existing selected-component poller, so it updates live (e.g. when a component is being removed).

Each state is covered by a new test on the game side (packages/flame/test/devtools/component_tree_connector_test.dart).

Closes #4171

@ufrshubham

Copy link
Copy Markdown
Member

@ywt-helloworld there are some failing checks on your PR

ywt-helloworld and others added 2 commits December 1, 2026 07:30
Adds a `lifecycleState` helper that reports where a component is in its
lifecycle (Removing/Mounted/Loaded/Loading/Detached), following the
suggested implementation in flame-engine#4171. The state is included in the
`getComponentInfo` service extension response, exposed through the
DevTools repository, and shown for the selected component in the
component tree section. Each state is covered by a test on the game side.

Closes flame-engine#4171
@spydon
spydon force-pushed the feat/devtools-lifecycle-state-4171 branch from d280a9d to fe883d0 Compare December 1, 2026 06:31
@spydon spydon changed the title feat(devtools): show component lifecycle state in DevTools feat: Show the component lifecycle state in DevTools Dec 1, 2026

@spydon spydon 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.

Extremely sloppy, but fixed up now.

@spydon
spydon added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Dec 1, 2026
# Conflicts:
#	packages/flame/lib/src/devtools/connectors/component_tree_connector.dart
@spydon
spydon added this pull request to the merge queue Dec 1, 2026
Merged via the queue into flame-engine:main with commit c7bb58a Dec 1, 2026
9 checks passed
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.

Show the component lifecycle state in DevTools

3 participants