From c007a8604d60f1498b10c0c25bb8b88560ff35bc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 13:01:46 +0000 Subject: [PATCH] Fix hover flicker on Runs by status chart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moving the mouse across the stacked bar chart caused the bars to strobe between bright and dim. Each 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 Claude-Session: https://claude.ai/code/session_018wP95TbXaujzKBnDJbCD7u --- apps/webapp/app/components/primitives/charts/ChartBar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/webapp/app/components/primitives/charts/ChartBar.tsx b/apps/webapp/app/components/primitives/charts/ChartBar.tsx index ef9daeb532..e900ed47a8 100644 --- a/apps/webapp/app/components/primitives/charts/ChartBar.tsx +++ b/apps/webapp/app/components/primitives/charts/ChartBar.tsx @@ -320,7 +320,10 @@ export function ChartBarRenderer({ highlight.setHoveredBar(hoveredKey, index); } }} - onMouseLeave={highlight.reset} + // No per-Bar onMouseLeave: moving between bars would fire leave→reset + // (all bars snap bright) before the next bar's enter, causing a hover + // flicker. The chart-level onMouseLeave (handleMouseLeave) clears the + // highlight when the cursor exits the whole chart. isAnimationActive={false} /> );