From 469d9860dee1066c7d2a36ad10464f71653511f1 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Mon, 22 Dec 2025 11:54:30 +0100 Subject: [PATCH] fix: Apply chart/catalogNumber duplicate detection to all components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend the duplicate detection logic from PatternCanvas to ProgressMonitor and PatternInfo. Now all components only show the chart field when it differs from catalogNumber, preventing redundant information display. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/PatternInfo.tsx | 8 +++++++- src/components/ProgressMonitor.tsx | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/PatternInfo.tsx b/src/components/PatternInfo.tsx index a8fcc20..165ff75 100644 --- a/src/components/PatternInfo.tsx +++ b/src/components/PatternInfo.tsx @@ -117,7 +117,13 @@ export function PatternInfo({ .join(" "); // Secondary metadata: chart and description - const secondaryMetadata = [color.chart, color.description] + // Only show chart if it's different from catalogNumber + const secondaryMetadata = [ + color.chart && color.chart !== color.catalogNumber + ? color.chart + : null, + color.description, + ] .filter(Boolean) .join(" "); diff --git a/src/components/ProgressMonitor.tsx b/src/components/ProgressMonitor.tsx index 87128a0..48b5dd7 100644 --- a/src/components/ProgressMonitor.tsx +++ b/src/components/ProgressMonitor.tsx @@ -281,8 +281,12 @@ export function ProgressMonitor() { .join(" "); // Secondary metadata: chart and description + // Only show chart if it's different from catalogNumber const secondaryMetadata = [ - block.threadChart, + block.threadChart && + block.threadChart !== block.threadCatalogNumber + ? block.threadChart + : null, block.threadDescription, ] .filter(Boolean)