fix(ssr): dedupe inherited scope ids during vnode rendering#15005
Conversation
📝 WalkthroughWalkthroughSSR element rendering now avoids appending duplicate scope IDs, and the SSR scopeId spec adds recursive component-root cases that verify a single ChangesSSR scopeId de-duplication
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
|
/ecosystem-ci run |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/server-renderer/src/render.ts`:
- Around line 307-317: appendScopeId in render.ts is skipping scope IDs based
only on hasOwn(props, id), which does not match the SSR attr renderability rules
used by ssrRenderAttrs. Update the predicate to mirror the same check used for
rendering attrs so scope IDs are only skipped when the prop would actually be
rendered, and keep the existing renderedScopeIds de-duplication logic intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cdf5d28e-646a-46ea-a552-cabd7325d99d
📒 Files selected for processing (2)
packages/server-renderer/__tests__/ssrScopeId.spec.tspackages/server-renderer/src/render.ts
|
📝 Ran ecosystem CI: Open
|
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [vue](https://vuejs.org/) ([source](https://github.com/vuejs/core)) | [`3.5.38` → `3.5.39`](https://renovatebot.com/diffs/npm/vue/3.5.38/3.5.39) |  |  | --- ### Release Notes <details> <summary>vuejs/core (vue)</summary> ### [`v3.5.39`](https://github.com/vuejs/core/blob/HEAD/CHANGELOG.md#3539-2026-06-25) [Compare Source](vuejs/core@v3.5.38...v3.5.39) ##### Bug Fixes - **compiler-core:** correct filter rewrite recursion ([#​14959](vuejs/core#14959)) ([be7ce31](vuejs/core@be7ce31)) - **hydration:** force patch dynamic props when hydrating ([#​9083](vuejs/core#9083)) ([024cf06](vuejs/core@024cf06)), closes [#​9033](vuejs/core#9033) - **hydration:** respect data-allow-mismatch on conditional branches ([#​12801](vuejs/core#12801)) ([164af63](vuejs/core@164af63)), closes [#​12782](vuejs/core#12782) - **reactivity:** avoid triggering effects when set fails ([#​14964](vuejs/core#14964)) ([e450973](vuejs/core@e450973)) - **runtime-core:** handle non-isomorphic block element update ([#​15002](vuejs/core#15002)) ([932ddd0](vuejs/core@932ddd0)), closes [#​6385](vuejs/core#6385) - **runtime-core:** normalize function children for elements and Teleport ([#​9108](vuejs/core#9108)) ([2f374cd](vuejs/core@2f374cd)), closes [#​9107](vuejs/core#9107) - **runtime-core:** pause tracking when invoking function refs ([#​14985](vuejs/core#14985)) ([3ac052b](vuejs/core@3ac052b)) - **runtime-core:** preserve once event listener name ([#​8341](vuejs/core#8341)) ([87b73b6](vuejs/core@87b73b6)), closes [#​8342](vuejs/core#8342) - **runtime-dom:** preserve option modifier event names ([#​8338](vuejs/core#8338)) ([4b659e6](vuejs/core@4b659e6)), closes [#​8334](vuejs/core#8334) - **ssr:** dedupe inherited scope ids during vnode rendering ([#​15005](vuejs/core#15005)) ([027da6b](vuejs/core@027da6b)), closes [#​12159](vuejs/core#12159) [#​12175](vuejs/core#12175) - **ssr:** resolve nested async teleport content ([#​9431](vuejs/core#9431)) ([31d0f23](vuejs/core@31d0f23)), closes [#​6207](vuejs/core#6207) - **teleport:** handle teleport unmount edge case ([#​12705](vuejs/core#12705)) ([671997a](vuejs/core@671997a)), closes [#​12702](vuejs/core#12702) - **types:** support named tuple emits ([#​12676](vuejs/core#12676)) ([232f402](vuejs/core@232f402)), closes [#​12673](vuejs/core#12673) - **types:** validate defineModel defaults ([#​14968](vuejs/core#14968)) ([747f57e](vuejs/core@747f57e)), closes [#​14966](vuejs/core#14966) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTcuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIxNy4xIiwidGFyZ2V0QnJhbmNoIjoiZXZvbHV0aW9ucy1wb3N0LTEuMS44IiwibGFiZWxzIjpbXX0=--> Co-authored-by: leuwen-lc <leuwen-lc@noreply.codeberg.org> Reviewed-on: https://codeberg.org/leuwen-lc/rhdemo/pulls/180
close #12159
close #12175
Summary by CodeRabbit