From e2afe1d6286ae23880802dca8b315b8dfebb3930 Mon Sep 17 00:00:00 2001 From: sacha <23283108+sacha-l@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:16:08 +0100 Subject: [PATCH] fix(results-panel): guard Recharts 0-width canvas crash on admin panel open Add debounce=50 and minWidth:1 to ResponsiveContainer in FeedbackChart. Recharts fires its first resize measurement before the admin panel layout settles, getting width=0, which causes createPattern to throw on a 0-dim canvas. debounce defers the first render tick; minWidth prevents a 0 from ever being reported. --- .../src/components/admin/ProgramResultsSummarySection.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/admin/ProgramResultsSummarySection.tsx b/client/src/components/admin/ProgramResultsSummarySection.tsx index b6e09e0..59a0125 100644 --- a/client/src/components/admin/ProgramResultsSummarySection.tsx +++ b/client/src/components/admin/ProgramResultsSummarySection.tsx @@ -163,9 +163,11 @@ function FeedbackChart({ const maxVal = Math.max(...data.map((d) => d.value)); return ( -