Fix hover flicker on Runs by status chart#4179
Draft
claude[bot] wants to merge 1 commit into
Draft
Conversation
Moving the mouse across the stacked bar chart caused the bars to strobe between bright and dim. Each <Bar> had an onMouseLeave that reset the highlight state, so crossing from one series to the next fired leave (activeBarKey → null, all bars bright) before the next bar's enter (activeBarKey → new key, others dim). That null→key churn produced the flicker. Remove the per-Bar onMouseLeave. Moving between bars now only updates the active key via onMouseEnter, and the existing chart-level onMouseLeave (handleMouseLeave, which calls highlight.reset) still clears the highlight when the cursor leaves the whole chart. Legend hover is unaffected — it uses its own onMouseEnter/onMouseLeave handlers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wP95TbXaujzKBnDJbCD7u
|
matt-aitken
approved these changes
Jul 7, 2026
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.
Requested by Eric Allam · Slack thread
✅ Checklist
Testing
Open a dashboard chart that uses the shared stacked bar primitive (e.g. "Runs by status") and move the mouse across it.
Changelog
Fixed a hover flicker on the shared bar chart primitive (
ChartBar.tsx).Each
<Bar>had anonMouseLeave={highlight.reset}handler. As the cursor crossed from one series to the next, recharts fired the old bar'sonMouseLeave(resetting the active key tonull, so every bar snapped bright) immediately before the new bar'sonMouseEnter(which re-dimmed the others). That rapidnull → key → nullchurn during normal mouse movement was the strobe.How: Removed the per-
<Bar>onMouseLeave={highlight.reset}inapps/webapp/app/components/primitives/charts/ChartBar.tsx. Moving between bars now only updates the active key viaonMouseEnter, with no intermediate reset. The existing chart-levelonMouseLeave(handleMouseLeave, which callshighlight.reset) still clears the highlight when the cursor leaves the whole chart, so exit behavior is unchanged. The legend is unaffected because it uses its ownonMouseEnter/onMouseLeavehandlers.Screenshots
[Screenshots]
💯
Generated by Claude Code