Skip to content

Conversation

@edison1105
Copy link
Member

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch edison/refactor/withVaporCtx

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 85.2 kB 29.9 kB 26.4 kB
runtime-dom.global.prod.js 108 kB 40.5 kB 36.4 kB
vue.global.prod.js 166 kB 60.5 kB 53.8 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.2 kB 18.8 kB 17.2 kB
createApp 57.2 kB 22 kB 20.1 kB
createApp + vaporInteropPlugin 95.9 kB (-96 B) 35.4 kB (-30 B) 31.9 kB (-7 B)
createVaporApp 40.9 kB (-97 B) 15.2 kB (-31 B) 13.8 kB (-35 B)
createSSRApp 61.6 kB 23.8 kB 21.7 kB
defineCustomElement 63.3 kB 23.8 kB 21.7 kB
overall 71.9 kB 27.2 kB 24.8 kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 4, 2025

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@14166

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@14166

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@14166

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@14166

@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@14166

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@14166

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@14166

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@14166

@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@14166

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@14166

@vue/shared

npm i https://pkg.pr.new/@vue/shared@14166

vue

npm i https://pkg.pr.new/vue@14166

@vue/compat

npm i https://pkg.pr.new/@vue/compat@14166

commit: 8b9d9d0

@edison1105 edison1105 force-pushed the edison/refactor/withVaporCtx branch from c779617 to 985209c Compare December 4, 2025 05:58
@edison1105 edison1105 added version: minor scope: vapor related to vapor mode labels Dec 4, 2025
@edison1105 edison1105 marked this pull request as ready for review December 4, 2025 07:14
Copilot AI review requested due to automatic review settings December 4, 2025 07:14
Copilot finished reviewing on behalf of edison1105 December 4, 2025 07:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the slot owner tracking mechanism in Vue Vapor runtime to use a dedicated currentSlotOwner variable instead of manipulating currentInstance within withVaporCtx. This provides cleaner separation of concerns and improves code maintainability.

Key changes:

  • Introduces currentSlotOwner and getScopeOwner() to track slot ownership separately from component instances
  • Removes the parentInstance parameter from component creation, using currentInstance directly instead
  • Optimizes compiler to conditionally wrap slots with withVaporCtx only when needed (i.e., when slots contain components or slot outlets)

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/runtime-vapor/src/componentSlots.ts Introduces currentSlotOwner tracking and getScopeOwner() function; refactors withVaporCtx to only manage slot owner context
packages/runtime-vapor/src/component.ts Removes parentInstance parameter from VaporComponentInstance constructor; uses currentInstance and getScopeOwner() directly
packages/runtime-vapor/src/fragment.ts Simplifies DynamicFragment to capture currentInstance locally instead of storing parent component
packages/runtime-vapor/src/vdomInterop.ts Updates to use getScopeOwner() for scopeId inheritance
packages/runtime-vapor/src/components/Teleport.ts Updates to use currentInstance directly instead of getParentInstance()
packages/runtime-vapor/src/components/TransitionGroup.ts Removes unused group flag and related update trigger logic
packages/runtime-vapor/src/components/Transition.ts Removes group flag handling
packages/runtime-vapor/src/apiCreateFor.ts Removes TransitionGroup update trigger logic
packages/compiler-vapor/src/generators/component.ts Adds needsVaporCtx() optimization to conditionally wrap slots only when they contain components or slot outlets
Test files Updates tests to remove unnecessary withVaporCtx wrappers where slots don't contain components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@edison1105 edison1105 merged commit 078e754 into minor Dec 4, 2025
17 checks passed
@edison1105 edison1105 deleted the edison/refactor/withVaporCtx branch December 4, 2025 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode version: minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants