Skip to content

fix(kit): keep scheduler draining after a batch rejects - #1160

Merged
webfansplz merged 1 commit into
mainfrom
fix/scheduler-rejected-batch
Oct 15, 2026
Merged

webfansplz merged 1 commit into
mainfrom
fix/scheduler-rejected-batch

Conversation

@webfansplz

Copy link
Copy Markdown
Member

When `run()` was called while a batch was in flight, it chained the follow-up with `running.then(...)` and no rejection handler. If any task in that batch threw, the follow-up never ran, queued tasks stayed in the map, and `pending` stayed `true`, so `schedule()` never armed another run. All later scheduled work (e.g. component updates) was silently dropped until `clear()`.

The follow-up now runs on both fulfilment and rejection. The caller that started the failing batch still receives its error.

Added a regression test in `tests/unit/runtime/scheduler.test.ts`; it fails without the fix. `pnpm vitest run tests/unit` passes (265 tests).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 04:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vue-devtools-docs ready!

Name Link
🔨 Latest commit 3e57df7
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/6ad058376cc496a7a208f371
😎 Deploy Preview https://deploy-preview-1160--vue-devtools-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vuejs/devtools/@vue/devtools-agent@1160
npm i https://pkg.pr.new/vuejs/devtools/@vue/devtools-api@1160
npm i https://pkg.pr.new/vuejs/devtools/@vue/devtools-kit@1160
npm i https://pkg.pr.new/vuejs/devtools/vite-plugin-vue-devtools@1160

commit: 3e57df7

@webfansplz
webfansplz merged commit 4361949 into main Oct 15, 2026
8 checks passed
@webfansplz
webfansplz deleted the fix/scheduler-rejected-batch branch October 15, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants