Skip to content

fix(runtime-vapor): don't make out-in wait for a branch that left to nothing - #15913

Merged
edison1105 merged 1 commit into
minorfrom
edison/fix/out-in-empty-slot-unpaired
Oct 18, 2026
Merged

edison1105 merged 1 commit into
minorfrom
edison/fix/out-in-empty-slot-unpaired

Conversation

@edison1105

@edison1105 edison1105 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Fixed transitions that leave to no content so returning content appears without being held back while the previous content finishes leaving.
    • Prevented content that is still leaving from being removed early when the returning content has a different element or component type.
    • Improved consistency across conditional content, slots, and cached components.

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e4e6f1a-ea34-4f3f-a289-19c673b166ae
📥 Commits

Reviewing files that changed from the base of the PR and between e291103 and 596a8b4.

📒 Files selected for processing: 3
  • packages/runtime-vapor/__tests__/components/Transition.spec.ts
  • packages/runtime-vapor/src/components/Transition.ts
  • packages/runtime-vapor/src/fragment.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

DynamicFragment.update now clears an active unpaired leave before considering teardown. New Vapor and VDOM parity tests cover out-in transitions where a branch leaves to no content and returns while its leave is pending.

Changes: Vapor out-in transitions

Layer / File(s) Summary
Clear unpaired leave before teardown
packages/runtime-vapor/src/fragment.ts, packages/runtime-vapor/src/components/Transition.ts
DynamicFragment.update clears leaving and pending before teardown when an unpaired leave is active. Comments describe the unpaired condition in terms of no paired incoming branch or no render.
Test empty-branch transition cases
packages/runtime-vapor/__tests__/components/Transition.spec.ts
Parity tests cover direct, slotted, forwarded, conditional-slot, and KeepAlive branches. They also check returns with a different element or component vnode while a leave is pending.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 596a8

Returning content is not held back by the pending leave, and no issue requiring a fix before merge was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main runtime-vapor fix: preventing an out-in transition from waiting when the leaving branch renders no content.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15913
npm i https://pkg.pr.new/@vue/compiler-core@15913
yarn add https://pkg.pr.new/@vue/compiler-core@15913.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15913
npm i https://pkg.pr.new/@vue/compiler-dom@15913
yarn add https://pkg.pr.new/@vue/compiler-dom@15913.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15913
npm i https://pkg.pr.new/@vue/compiler-sfc@15913
yarn add https://pkg.pr.new/@vue/compiler-sfc@15913.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15913
npm i https://pkg.pr.new/@vue/compiler-ssr@15913
yarn add https://pkg.pr.new/@vue/compiler-ssr@15913.tgz

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15913
npm i https://pkg.pr.new/@vue/compiler-vapor@15913
yarn add https://pkg.pr.new/@vue/compiler-vapor@15913.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15913
npm i https://pkg.pr.new/@vue/reactivity@15913
yarn add https://pkg.pr.new/@vue/reactivity@15913.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15913
npm i https://pkg.pr.new/@vue/runtime-core@15913
yarn add https://pkg.pr.new/@vue/runtime-core@15913.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15913
npm i https://pkg.pr.new/@vue/runtime-dom@15913
yarn add https://pkg.pr.new/@vue/runtime-dom@15913.tgz

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15913
npm i https://pkg.pr.new/@vue/runtime-vapor@15913
yarn add https://pkg.pr.new/@vue/runtime-vapor@15913.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15913
npm i https://pkg.pr.new/@vue/server-renderer@15913
yarn add https://pkg.pr.new/@vue/server-renderer@15913.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15913
npm i https://pkg.pr.new/@vue/shared@15913
yarn add https://pkg.pr.new/@vue/shared@15913.tgz

vue

pnpm add https://pkg.pr.new/vue@15913
npm i https://pkg.pr.new/vue@15913
yarn add https://pkg.pr.new/vue@15913.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15913
npm i https://pkg.pr.new/@vue/compat@15913
yarn add https://pkg.pr.new/@vue/compat@15913.tgz

commit: 596a8b4

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.4 kB 30.7 kB 27 kB
runtime-dom.global.prod.js 119 kB 44.8 kB 40.2 kB
vue.global.prod.js 180 kB 65.1 kB 58 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 54.6 kB 21.2 kB 19.4 kB
createApp 63.5 kB 24.5 kB 22.2 kB
createApp + vaporInteropPlugin 139 kB (+1 B) 50 kB (+3 B) 44.9 kB (+67 B)
createVaporApp 34.2 kB 13.2 kB 12.2 kB
createSSRApp 68.6 kB 26.5 kB 24.1 kB
createVaporSSRApp 41 kB 15.6 kB 14.4 kB
defineCustomElement 70.1 kB 26.5 kB 24.1 kB
defineVaporCustomElement 49.1 kB 18 kB 16.5 kB
overall 79.1 kB 30.1 kB 27.2 kB

@edison1105
edison1105 merged commit b6efd2b into minor Oct 18, 2026
17 checks passed
@edison1105
edison1105 deleted the edison/fix/out-in-empty-slot-unpaired branch October 18, 2026 04:34
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant