Skip to content

fix(kit): keep handle ids unique after the registry is cleared - #1161

Merged
webfansplz merged 1 commit into
mainfrom
fix/handle-ids-reuse-after-clear
Oct 18, 2026
Merged

webfansplz merged 1 commit into
mainfrom
fix/handle-ids-reuse-after-clear

Conversation

@webfansplz

Copy link
Copy Markdown
Member

`ValueHandleRegistry.clear()` reset `seed` to 0. The runtime clears the timeline handle registry when the last DevTools client disconnects, so after a reconnect new values were handed the same ids (`value:0`, `value:1`, …) as values from the previous session. A client still holding an old handle would then read or edit an unrelated object instead of getting a missing-handle result.

`clear()` now keeps `seed` increasing, so a stale handle simply misses.

Added a regression test in `tests/unit/codec/handles.test.ts`; it fails without the fix. `pnpm vitest run tests/unit tests/integration` passes (364 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 06:43
@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit ffa91b5
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/6ad0762fb35a18bdc3bc228d

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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: ffa91b5

@webfansplz
webfansplz merged commit 013d02a into main Oct 18, 2026
8 checks passed
@webfansplz
webfansplz deleted the fix/handle-ids-reuse-after-clear branch October 18, 2026 12:21
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