Skip to content

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

Closed
NullVoxPopuli-ai-agent wants to merge 3 commits into
emberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/capture-render-tree-render-component-main
Closed

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

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent 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).

captureRenderTree(owner) only reads the owner's renderer:-dom.
renderComponent renders with its own renderer for each owner, so its components do not show up.

@ember/test-helpers 5.5.0 (emberjs/ember-test-helpers#1573, 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, and all 8 smoke jobs on beta and release failed with:

HelloWorld component name is preserved in the render tree (found: )

On main, an application shares its renderer with renderComponent once renderRootComponent runs (#21460).
So the smoke tests pass here, but other owners still get an empty tree.

The fix:

  • the renderComponent renderer registers itself with @ember/debug
  • captureRenderTree adds its roots after the renderer:-dom roots

The registration goes in that direction because @ember/debug importing the renderer is a circular import.

Tests:

  • render-component-test.ts: a plain owner. Fails on main without the fix.
  • render-component-test.ts: a render without an owner uses a new owner, so it stays out of the tree for the test owner.
  • debug-render-tree-test.ts: an application owner. Passes on main either way, but fails on beta and release without the fix. That is the case the backport needs.

The failing tests come first, so CI shows the failure.

Backports: the commits apply to beta and release, with one import conflict in debug-render-tree-test.ts.
Checked on all three branches: the new tests pass with the fix, and the full browser suite passes.
On release, the strictResolver-basics smoke scenario with test-helpers 5.5.0 fails without the fix (same message as CI) and passes with it.

🤖 Generated with Claude Code

NullVoxPopuli and others added 2 commits September 25, 2026 10:37
…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>
]);
}

async '@test components rendered with renderComponent'() {

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.

good test

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>
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

Currently testing this out over here: NullVoxPopuli/limber#2278

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