Skip to content

[BUGFIX lts] Include renderComponent roots in captureRenderTree - #21623

Open
NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/capture-render-tree-render-component-main
Open

NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/capture-render-tree-render-component-main

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the nightly Cron failures on beta and release. They started on 2026-09-23 (first beta run, first release run).

PR ported from #21622

Important

@ember/test-helpers 5.5.0 (published 2026-09-22) renders through renderComponent on Ember 6.8 and newer.
The smoke tests install without the lockfile, so the next cron run picked it up


reproduced on limber :

image

main ( @ 2026-09-25 ) - https://limber.glimdown.com/edit?c=JYWwDg9gTgLgBAYQuCA7Apq%2BAzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHAN5wwoAQzoBrdABM4AXzi58xcpWo1BI0cFQk2nFD35oZcvCEJF0IAEYqQECcGzBqOrtHj8omCdSQpm8WXlTYgtrWk9Ub08oFz13OFt7R2ojIMJQ6gBaRIcnGPZ2BlQAZ3gACWA4AF44AB4YCzAyIQaAPgALYFrVRua2jkLm4uK4MvQyMggAdWgyKXQADwbIkd8mTHd2ODgiNTFJOAYAVyxquAAGAe3NOk8qU5qACgBKataBTuKAOmPTgGoagBGK51BrgProVpbbZ1CrbGhQmF1MCtACaECOcHaQgAbuhDhR9lIYO18ZYjjAYIZeLwScBvr8YNJZDBQOhvt0UQUkbVyZTDDAAJ5gdBVABEfKpqDFfF4hjFdEJohldO%2BNzuG2ZrQQSu6krQiLqPXBLUh7GkBSKpTgESiZxyySgj3GFg2bz40NtPkYaA2jzGE2mswkABo%2BHBNFSAFxwF33ALPDjSRMFeq9U2G2pwhHQ2r2HGyr1QLXdfNQ7pgpoZoA&format=gjs

Fix:

image

https://test-ember-source-nvp-captur.limber-glimdown.pages.dev/edit?c=JYWwDg9gTgLgBAYQuCA7Apq%2BAzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHAN5wwoAQzoBrdABM4AXzi58xcpWo1BI0cFQk2nFD35oZcvCEJF0IAEYqQECcGzBqOrtHj8omCdSQpm8WXlTYgtrWk9Ub08oFz14AFk7BycoABo%2BOFt7R2ojIMJQ6gBaLOTnXW53OBJ0GAB5AHcMKDyTM0LaCCbnDnYGVABneAAJYDgAXjgAHhgLMDIhWYA%2BAAtgKdU5heXeugWBgbhh9DIyCAB1aDIpdAAPWcjD3yZMd3Y4OCI1MUk4BgBXLATOAABl6H00dE8VCBkwAFABKCZLARrAYAOgBQIA1JMAIzg6azcDbdBLd4faajD40cmU6ZgJYATQg-zgKyEADd0H8KD8pDAVjzLP8YDBDLxeILgBisTBpLIYKB0BiNoz2BSPlMRWLDDAAJ5gdDjABEOvFqBNfF4hhNe2AYit0oxkOhrwVSwQfNEG3NaDp002JMWZPY0g1eyEBzgESicDuDwkh0S2RSfAppWw%2BrhJwsryRvE1fzQQzgXWawJq9W6UDhzoRHHp-QGEDI6HRZxIcPL1AbRaLsZ8jDQrzhx1OFyuEnSBhr6U04oAXPG2zCAn2KeHwzMtiGA1NqbSKVN7JzrYOoB6NqfyRtifM90A&format=gjs

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

A follow-up idea, not for this PR.

renderComponent roots show up as separate top-level roots, not under the component that rendered them.
Nesting by caller is not possible, because Ember does not know who called renderComponent.

We could nest by DOM position at capture time instead:
move each root under the deepest captured node whose bounds contain its into element.
A modifier node's bounds are its element, so a renderComponent call from a modifier would land under that modifier.

This adds a DOM walk to every capture, and the inspector captures the whole tree on each runloop end (up to 4 times per second, per emberjs/ember-inspector#2777).
So these inspector PRs need a look first:

Until then, separate top-level roots are the cheaper option.

`captureRenderTree` only read the owner's `renderer:-dom`.
`renderComponent` renders with its own renderer, and accepts any
object as the owner, so its components never showed up.

`@ember/test-helpers` 5.5.0 renders through `renderComponent` on
Ember 6.8 and newer, so `captureRenderTree` in a rendering test
returned nothing. This broke the nightly smoke tests on `beta`
and `release`. Tools that pass a wrapper owner, like the limber
repl, were missing from Ember Inspector for the same reason.

Every renderer already joins the `renderers` list at its first root
and leaves it after its last root. `captureRenderTree` now reads
that list, so it covers each application and every `renderComponent`
call, whatever the owner. The list moved into its own module so
`@ember/debug` can import it without importing the renderer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@NullVoxPopuli-ai-agent
NullVoxPopuli-ai-agent force-pushed the nvp/capture-render-tree-render-component-main branch from 598b682 to 990e15b Compare September 25, 2026 18:04
@NullVoxPopuli
NullVoxPopuli marked this pull request as ready for review September 25, 2026 18:23

This branch has not been deployed

No deployments
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.

2 participants