fix(releases): guard echarts handlers against disposed instances in useReleaseBubbles#119469
Draft
billyvg wants to merge 1 commit into
Draft
fix(releases): guard echarts handlers against disposed instances in useReleaseBubbles#119469billyvg wants to merge 1 commit into
billyvg wants to merge 1 commit into
Conversation
Mouse event handlers (mousemove, mouseover, mouseout, globalout) in useReleaseBubbles were calling setOption/getOption/dispatchAction on echarts instances that could already be disposed during chart state transitions, causing TypeError crashes on the dashboard page. Adds isDisposed() checks alongside the existing null guards, matching the pattern already used in useChartBoxZoom. Fixes JAVASCRIPT-3AP8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes JAVASCRIPT-3AP8 —
TypeError: Cannot read properties of undefined (reading 'get')escalating on/dashboard/:dashboardId/.Root cause: Mouse event handlers (
mousemove,mouseover,mouseout,globalout) inuseReleaseBubbles.tsxwere callingechartsInstance.setOption()/getOption()/dispatchAction()on an echarts instance that had already been disposed during chart state transitions (e.g. component unmount/remount racing with an in-flight mousemove event). The existing!echartsInstancenull guard didn't cover the disposed case.Fix: Added
echartsInstance.isDisposed()checks to all four handlers alongside the existing null guards. This matches the established pattern inuseChartBoxZoom.tsx(line 123) which has the same comment and guard.Evidence from Sentry:
useReleaseBubbles.tsx:552→handleMouseOut→echartsInstance.setOption()Session: https://claude.ai/code/session_01Vi9sPcdPUAQFGdtxcNjJ5R
Generated by Claude Code