fix(renderer): dispose desync sentinel listener on HMR

This commit is contained in:
m4air
2026-09-15 16:44:53 -07:00
parent fa75b72697
commit 478c28c565
@@ -118,3 +118,12 @@ function removeClickListener(): void {
clickListener = null
}
}
if (import.meta !== undefined && import.meta.hot) {
// Vite can replace this module without a full renderer reload. Remove the
// opt-in gesture hook so dev sessions do not retain stale pane closures.
import.meta.hot.dispose(() => {
removeClickListener()
stopRenderDesyncSampleBurst()
})
}