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
|
close #12159
close #12175
Summary by CodeRabbit