Skip to content

refactor(runtime-vapor): simplify slot fallback and slot binding cache#14819

Merged
edison1105 merged 4 commits into
minorfrom
edison/refactor/vaporSlot
May 15, 2026
Merged

refactor(runtime-vapor): simplify slot fallback and slot binding cache#14819
edison1105 merged 4 commits into
minorfrom
edison/refactor/vaporSlot

Conversation

@edison1105
Copy link
Copy Markdown
Member

@edison1105 edison1105 commented May 14, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed slot fallback behavior when local fallbacks become invalid in nested component scenarios.
    • Improved interoperability between VDOM and Vapor slot systems, particularly for fallback rendering.
    • Enhanced hydration support for interop slot fallback transitions.
  • Tests

    • Expanded slot fallback test coverage for various fallback scenarios.
    • Added tests for nested fallback validity transitions and outlet-driven behavior.
    • Added hydration interop tests validating slot fallback behavior across mode changes.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Draft detected.

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.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4a637ad-8dae-481b-8f1f-5525364aa9aa

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

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edison/refactor/vaporSlot

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 14, 2026

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 6cef67e

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 86.5 kB 30.3 kB 26.6 kB
runtime-dom.global.prod.js 113 kB 42.6 kB 38.1 kB
vue.global.prod.js 172 kB 62.4 kB 55.6 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 51.5 kB 20.1 kB 18.3 kB
createApp 60.5 kB 23.4 kB 21.3 kB
createApp + vaporInteropPlugin 103 kB (-139 B) 37.3 kB (+150 B) 33.6 kB (+58 B)
createVaporApp 27.6 kB (+43 B) 10.7 kB (+17 B) 9.84 kB (+17 B)
createSSRApp 65 kB 25.2 kB 22.9 kB
createVaporSSRApp 33.9 kB (+43 B) 12.9 kB (+17 B) 11.8 kB (+16 B)
defineCustomElement 67.1 kB 25.4 kB 23.1 kB
defineVaporCustomElement 39.8 kB (-564 B) 14.3 kB (-28 B) 13.1 kB (-33 B)
overall 75.8 kB 28.9 kB 26.2 kB

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/runtime-vapor/src/vdomInterop.ts`:
- Around line 1378-1379: markSlotFallbackDirty() can re-run an outlet without
frag.onUpdated firing, so leaving notifyFallbackValidityChange as NOOP causes
parent boundaries to remain stale; update the implementation so that when
recheckSlotFallback() detects a valid↔invalid transition it calls the same
upward notification used by frag.onUpdated (e.g., invoke inheritedBoundary's
fallback-dirty API or call
inheritedBoundary.markFallbackValidityDirty()/equivalent) instead of NOOP—locate
notifyFallbackValidityChange: NOOP and change it to call the inherited boundary
dirty/notify method when recheckSlotFallback() flips validity, preserving
existing behavior when frag.onUpdated runs.
🪄 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: a2b98b0f-9358-4a68-b2a6-43c07faf224e

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8a0ce and b8bedf4.

📒 Files selected for processing (4)
  • packages/runtime-vapor/__tests__/componentSlots.spec.ts
  • packages/runtime-vapor/src/componentSlots.ts
  • packages/runtime-vapor/src/fragment.ts
  • packages/runtime-vapor/src/vdomInterop.ts

Comment thread packages/runtime-vapor/src/vdomInterop.ts Outdated
@edison1105 edison1105 added the scope: vapor related to vapor mode label May 14, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/runtime-vapor/src/fragment.ts`:
- Around line 1264-1268: The outlet lacks a disposal flag so post-flush fallback
callbacks can resurrect an unmounted SlotFragment; add a boolean property (e.g.,
isDisposed) to SlotFragment and set it true in disposeSlotFallback/removeSlot,
then guard any code that creates or re-runs fallback rendering (places
referencing activeFallback, fallbackScope, pendingRecheck, isRenderingFallback,
rerunRecheckAfterFallbackRender and the post-flush callback from
renderVaporSlot) to no-op if isDisposed is true; also ensure dispose clears any
fallbackScope and cancels queued post-flush callbacks so no new EffectScope is
allocated for disposed outlets.
🪄 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: 1a9ea9b4-1cba-4ae5-ba61-142d9576738b

📥 Commits

Reviewing files that changed from the base of the PR and between b8bedf4 and ae79950.

📒 Files selected for processing (7)
  • packages/runtime-vapor/__tests__/componentSlots.spec.ts
  • packages/runtime-vapor/__tests__/hydration.spec.ts
  • packages/runtime-vapor/__tests__/vdomInterop.spec.ts
  • packages/runtime-vapor/src/block.ts
  • packages/runtime-vapor/src/componentSlots.ts
  • packages/runtime-vapor/src/fragment.ts
  • packages/runtime-vapor/src/vdomInterop.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/runtime-vapor/src/componentSlots.ts

Comment thread packages/runtime-vapor/src/fragment.ts
@edison1105 edison1105 marked this pull request as ready for review May 15, 2026 01:42
@edison1105 edison1105 merged commit fb72a8b into minor May 15, 2026
16 of 17 checks passed
@edison1105 edison1105 deleted the edison/refactor/vaporSlot branch May 15, 2026 01:42
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