From 194075c5b8a48bda1aa4d059deff3517eebf0d6f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 27 Jul 2026 11:43:00 +0000 Subject: [PATCH] fix(reporting): mark genuine ties on the compare "Best" tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A row with more than one joint-best column is a real tie (e.g. two scenarios upgrading the same 7 homes — an integer count, no rounding). Show "Best · tie" on those tags so the shared Best reads as intentional, and note in the caption that every column tying for best is tagged. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../reporting/compare/CompareClientArea.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/portfolio/[slug]/(portfolio)/reporting/compare/CompareClientArea.tsx b/src/app/portfolio/[slug]/(portfolio)/reporting/compare/CompareClientArea.tsx index 9156c26e..6f102cc1 100644 --- a/src/app/portfolio/[slug]/(portfolio)/reporting/compare/CompareClientArea.tsx +++ b/src/app/portfolio/[slug]/(portfolio)/reporting/compare/CompareClientArea.tsx @@ -330,8 +330,8 @@ export function CompareClientArea({

The Best tag marks - the best value in each row — no overall winner is crowned; trade-offs - stay visible. + the best value in each row — or every column that ties for it. No overall + winner is crowned; trade-offs stay visible.

); @@ -375,6 +375,10 @@ function GroupRows({ best.clear(); } } + // More than one joint-best column = a genuine tie (e.g. two scenarios + // upgrading the same 7 homes). Flag it on each tag so the reader knows + // the shared Best is intentional, not a bug. + const tie = best.size > 1; // "before" cell: baseline has no scenario metric, so most rows show —. const baselineCell = row.label === "Average EPC after" @@ -397,7 +401,7 @@ function GroupRows({ > {best.has(i) && ( - Best + {tie ? "Best · tie" : "Best"} )} {row.render(v)}