From 4f1766b5011c02aa889212678f1565e49ae5a5f2 Mon Sep 17 00:00:00 2001 From: AndyMik90 Date: Thu, 18 Dec 2025 20:49:46 +0100 Subject: [PATCH] fix: correct CompetitorAnalysisViewer to match type definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix TypeScript errors by using correct property names from types: - Replace userQuotes with source and frequency fields - Change opportunityScore to opportunity - Replace summary with insightsSummary structure - Display top pain points, differentiator opportunities, and market trends All properties now match the CompetitorPainPoint and CompetitorAnalysis type definitions in roadmap.ts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../components/CompetitorAnalysisViewer.tsx | 74 ++++++++++++++----- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/auto-claude-ui/src/renderer/components/CompetitorAnalysisViewer.tsx b/auto-claude-ui/src/renderer/components/CompetitorAnalysisViewer.tsx index f8f900c6..c71043d7 100644 --- a/auto-claude-ui/src/renderer/components/CompetitorAnalysisViewer.tsx +++ b/auto-claude-ui/src/renderer/components/CompetitorAnalysisViewer.tsx @@ -107,24 +107,26 @@ export function CompetitorAnalysisViewer({

{painPoint.description}

- {painPoint.userQuotes && painPoint.userQuotes.length > 0 && ( -
- {painPoint.userQuotes.map((quote, idx) => ( -

- "{quote}" -

- ))} -
- )} - {painPoint.opportunityScore !== undefined && ( + {painPoint.source && (
- Opportunity Score:{' '} + Source: {painPoint.source} + +
+ )} + {painPoint.frequency && ( +
+ + Frequency: {painPoint.frequency} + +
+ )} + {painPoint.opportunity && ( +
+ + Opportunity:{' '} - {painPoint.opportunityScore}/10 + {painPoint.opportunity}
@@ -139,11 +141,43 @@ export function CompetitorAnalysisViewer({ ))} - {/* Summary */} - {analysis.summary && ( -
-

Market Summary

-

{analysis.summary}

+ {/* Insights Summary */} + {analysis.insightsSummary && ( +
+

Market Insights Summary

+ + {analysis.insightsSummary.topPainPoints.length > 0 && ( +
+

Top Pain Points:

+
    + {analysis.insightsSummary.topPainPoints.map((point, idx) => ( +
  • • {point}
  • + ))} +
+
+ )} + + {analysis.insightsSummary.differentiatorOpportunities.length > 0 && ( +
+

Differentiator Opportunities:

+
    + {analysis.insightsSummary.differentiatorOpportunities.map((opp, idx) => ( +
  • • {opp}
  • + ))} +
+
+ )} + + {analysis.insightsSummary.marketTrends.length > 0 && ( +
+

Market Trends:

+
    + {analysis.insightsSummary.marketTrends.map((trend, idx) => ( +
  • • {trend}
  • + ))} +
+
+ )}
)}