[BUGFIX lts] Include renderComponent roots in captureRenderTree - #21622
Closed
NullVoxPopuli-ai-agent wants to merge 3 commits into
Closed
NullVoxPopuli-ai-agent wants to merge 3 commits into
NullVoxPopuli-ai-agent wants to merge 3 commits into
Conversation
…nent Components rendered with `renderComponent` are missing from `captureRenderTree(owner)` when the owner's `renderer:-dom` is not the renderer that `renderComponent` uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`renderComponent` renders with its own renderer for each owner. `captureRenderTree` only read the owner's `renderer:-dom`, so those roots never showed up. On `main`, an application shares its renderer with `renderComponent` once `renderRootComponent` runs, so apps are fine there. Other owners, and every owner before 7.5, are not. `@ember/test-helpers` 5.5.0 renders through `renderComponent` on Ember 6.8 and newer, so `captureRenderTree` in a rendering test returns nothing on those versions. This broke the nightly smoke tests on `beta` and `release`. The renderer now registers itself with `@ember/debug`, and `captureRenderTree` includes its roots. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 25, 2026
| ]); | ||
| } | ||
|
|
||
| async '@test components rendered with renderComponent'() { |
Without an `owner`, `renderComponent` renders with a new owner that no caller can reach. `captureRenderTree` for another owner leaves those components out. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Currently testing this out over here: NullVoxPopuli/limber#2278 |
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.

Fixes the nightly
Cronfailures onbetaandrelease. They started on 2026-09-23 (first beta run, first release run).captureRenderTree(owner)only reads the owner'srenderer:-dom.renderComponentrenders with its own renderer for each owner, so its components do not show up.@ember/test-helpers5.5.0 (emberjs/ember-test-helpers#1573, published 2026-09-22) renders throughrenderComponenton Ember 6.8 and newer.The smoke tests install without the lockfile, so the next cron run picked it up, and all 8 smoke jobs on
betaandreleasefailed with:On
main, an application shares its renderer withrenderComponentoncerenderRootComponentruns (#21460).So the smoke tests pass here, but other owners still get an empty tree.
The fix:
renderComponentrenderer registers itself with@ember/debugcaptureRenderTreeadds its roots after therenderer:-domrootsThe registration goes in that direction because
@ember/debugimporting the renderer is a circular import.Tests:
render-component-test.ts: a plain owner. Fails onmainwithout the fix.render-component-test.ts: a render without anowneruses a new owner, so it stays out of the tree for the test owner.debug-render-tree-test.ts: an application owner. Passes onmaineither way, but fails onbetaandreleasewithout the fix. That is the case the backport needs.The failing tests come first, so CI shows the failure.
Backports: the commits apply to
betaandrelease, with one import conflict indebug-render-tree-test.ts.Checked on all three branches: the new tests pass with the fix, and the full browser suite passes.
On
release, thestrictResolver-basicssmoke scenario with test-helpers 5.5.0 fails without the fix (same message as CI) and passes with it.🤖 Generated with Claude Code