Skip to content

Conversation

@edison1105
Copy link
Member

@edison1105 edison1105 commented Jan 26, 2026

close #14357

Summary by CodeRabbit

  • Tests

    • Added coverage verifying reactive updates continue to trigger correctly when scopes are stored on reactive objects and are started/stopped.
  • New Features

    • Effect scope now exposes a skip flag to support improved handling of scoped reactive behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

The changes add a new test case validating effect scope lifecycle behavior when scopes are stored on reactive objects, and introduce a public __v_skip flag to the EffectScope class.

Changes

Cohort / File(s) Summary
Test Suite Enhancement
packages/reactivity/__tests__/effectScope.spec.ts
New test "should still trigger updates after stopping scope stored in reactive object" verifying staged updates and effectScope start/stop behavior when a scope is stored on a reactive object.
EffectScope Public Surface
packages/reactivity/src/effectScope.ts
Adds public readonly field __v_skip = true to the EffectScope class (new public property).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

ready to merge, scope: reactivity, :hammer: p3-minor-bug

Suggested reviewers

  • jh-leong

Poem

🐰 I hopped into scopes both near and deep,
Watched effects that wake and those that sleep,
With a tiny flag — __v_skip in view —
The renders danced, stopped, and started anew. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a __v_skip flag to EffectScope to prevent reactive conversion, which directly addresses the issue of render updates stopping after effectScope.stop().
Linked Issues check ✅ Passed The PR adds __v_skip flag to EffectScope and includes a test case validating that scope stored in reactive objects can still trigger updates after stopping, directly addressing issue #14357's requirement to fix render updates after scope.stop().
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the EffectScope reactive conversion issue: the __v_skip flag addition and the test case validating the fix remain within the scope of issue #14357.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@github-actions
Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 103 kB (+17 B) 39.1 kB (+3 B) 35.2 kB (+25 B)
vue.global.prod.js 162 kB (+17 B) 59.1 kB (+2 B) 52.6 kB (+52 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47 kB (+17 B) 18.4 kB (+3 B) 16.8 kB (-2 B)
createApp 55.2 kB (+17 B) 21.4 kB (+3 B) 19.6 kB (+1 B)
createSSRApp 59.4 kB (+17 B) 23.2 kB (+3 B) 21.1 kB (+2 B)
defineCustomElement 60.8 kB (+17 B) 23.2 kB (+3 B) 21.1 kB (+6 B)
overall 69.5 kB (+17 B) 26.7 kB (+3 B) 24.3 kB (+11 B)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: a6e8ce6

Copy link

@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

🤖 Fix all issues with AI agents
In `@packages/reactivity/__tests__/effectScope.spec.ts`:
- Around line 383-385: Remove the debug logging from the test by deleting the
console.log call inside the watch callback (the line that logs '-- rs', values)
in the test using watch([() => status.stage], ...); if the output was intended
for assertion, replace it with an appropriate expect assertion against values or
a spy, otherwise simply remove the console.log to avoid noisy test output.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@edison1105 edison1105 added scope: reactivity 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. ready to merge The PR is ready to be merged. labels Jan 26, 2026
@edison1105
Copy link
Member Author

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Jan 27, 2026

📝 Ran ecosystem CI: Open

suite result latest scheduled
pinia success success
test-utils success success
nuxt success success
primevue success success
vuetify success success
vite-plugin-vue success success
language-tools success success
vant success failure
vue-macros success success
quasar success success
radix-vue success success
vitepress success success
vueuse success success
vue-i18n success success
router failure failure
vue-simple-compiler success success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. ready to merge The PR is ready to be merged. scope: reactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is this a bug? After calling effectScope.stop(). The component render function outside the scope will not update anymore.

3 participants