[BUGFIX lts] Include renderComponent roots in captureRenderTree (lts-6-12) - #21638
Open
NullVoxPopuli-ai-agent wants to merge 1 commit into
Conversation
`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. Differences from the main commit on lts-6-12: - The list moves out of `renderer.ts`. There is no `base-renderer.ts`. - `@ember/-internals` gets an explicit `./glimmer/lib/renderers` export, because it has no `./*` export. - The tests use `defComponent` with named `templateOnlyComponent` definitions, and the expected nodes keep the `template` field. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 990e15b)
This branch has not been deployed
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.
Backport of #21623 to
lts-6-12.captureRenderTreenow includes components thatrenderComponentrendered, whatever their owner.On 6.8 and newer,
@ember/test-helpers5.5.0 renders throughrenderComponent, socaptureRenderTreein a rendering test returns nothing on 6.12 today.releaseandbetaalready have this fix.The fix is the same as on
main:captureRenderTreereads therendererslist, which every renderer joins at its first root.lts-6-12already has that list with the same register and deregister logic, so no other PR needs to come first.Differences from the
maincommit:renderer.ts. There is nobase-renderer.tson this branch.@ember/-internals/package.jsongets an explicit./glimmer/lib/renderersexport. This branch has no./*export.defComponentwith namedtemplateOnlyComponentdefinitions. Without a name, this branch shows(unknown template-only component)in the tree.templatefield.Checked locally:
tsc,eslint,prettier, andpnpm buildpass. The build has one sharedrendererslist.🤖 Generated with Claude Code