test(web): incidental <Dynamic> uses move to dynamic() - #3509
Merged
Merged
Conversation
`<Dynamic>` is deprecated in favour of `dynamic()`. Six test sites used it only as a convenient element factory — a `<li>`/`<span>`/`<button>`/`<div>` tag, or a component value on the escape resolver path — rather than to test `Dynamic` itself. They now build the same shape on `dynamic()`, which is what a library writes and what the polymorphic harness already does. The `separator-dynamic-element-list` artifact changes its hydration keys (`_hk=110/130/150` → `100/110/120`): `<Dynamic>` was a `createComponent` layer over `dynamic()`, so one fewer id level. Markup is otherwise identical. Files whose subject is `<Dynamic>` — dynamic.spec, dynamic-namespace, dynamic-hydration*, dynamic-tag.bench, the ssr-stream Promise-component case — keep it; they are its coverage until it is removed. Co-authored-by: Claude via Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Coverage Report for CI Build 35185305440Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 71.46%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This was referenced Sep 17, 2026
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.
<Dynamic>is deprecated in favour ofdynamic()(#3436). Six test sites still used it, none to testDynamicitself — it was a convenient element factory for a<li>/<span>/<button>/<div>tag, or a way to put a component value on the escape resolver's memo path. They now build the same shape ondynamic(), which is what a library writes and whattest/harness/polymorphic.tsxalready does.harness/scenarios.tsx(DynamicElementList)<Dynamic component="li">SepLi = dynamic(() => "li")server/ssr-text-separators.spec.tsx<Dynamic component="span">dynamic(() => "span")server/ssr-element-nullish-attrs.spec.tsx<Dynamic component="button" {...props}>dynamic(() => "button")server/spread-function-source.spec.tsx<Dynamic component="div" {...props}>dynamic(() => "div")server/escape-late-values.spec.tsx(5 cases)<Dynamic component={Text}>etc.dynamic(() => Text)etc. — still the memo-yielding resolver path the file pinsOne artifact changes:
separator-dynamic-element-list.json, hydration keys_hk=110/130/150→100/110/120.<Dynamic>was acreateComponentlayer overdynamic(), so the scenario has one fewer id level; markup is otherwise identical, and the server + hydrate parity checks for the scenario pass against the new artifact.Left as-is on purpose:
dynamic.spec,dynamic-namespace.spec,dynamic-hydration*.spec,dynamic-tag.bench, and thessr-stream"Dynamic awaits a Promise component prop" case. Their subject is<Dynamic>; they go when it does.Tests only — no changeset. All three web suites pass (dom 825, server 1001, hydrate 185).
Prompted by the yak-bench
polymorphic-chaincase having the same non-idiomatic<Dynamic component={props.as}>; ondynamic()that case gains 9% SSR throughput, since the wrapper was an extraomit+mergeper instance.