From 0d60ad03dec19e9ecc468b9b7f7913acaefbd958 Mon Sep 17 00:00:00 2001 From: Floke Date: Wed, 18 Feb 2026 14:35:21 +0000 Subject: [PATCH] =?UTF-8?q?[30b88f42]=20L=C3=A4uft=20wieder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Läuft wieder --- .dev_session/SESSION_INFO | 2 +- .gemini/env_old | 1 + .gitignore | 3 + .../frontend/src/components/Inspector.tsx | 85 +++++++++++++------ .../src/components/RoboticsSettings.tsx | 44 +++++++++- 5 files changed, 108 insertions(+), 27 deletions(-) create mode 100644 .gemini/env_old diff --git a/.dev_session/SESSION_INFO b/.dev_session/SESSION_INFO index 321a1b9a..9396b1ca 100644 --- a/.dev_session/SESSION_INFO +++ b/.dev_session/SESSION_INFO @@ -1 +1 @@ -{"task_id": "30a88f42-8544-819a-b5fc-c85cd80f43b7", "token": "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", "session_start_time": "2026-02-17T07:16:11.126812"} \ No newline at end of file +{"task_id": "30b88f42-8544-80ea-88a7-e7c03e749c30", "token": "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", "session_start_time": "2026-02-18T14:32:47.873998"} \ No newline at end of file diff --git a/.gemini/env_old b/.gemini/env_old new file mode 100644 index 00000000..cf6c484c --- /dev/null +++ b/.gemini/env_old @@ -0,0 +1 @@ +GEMINI_API_KEY=AIzaSyBNg5yQ-dezfDs6j9DGn8qJ8SImNCGm9Ds diff --git a/.gitignore b/.gitignore index 72d4be11..69d5ad73 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,6 @@ Log_from_docker/ # Node.js specific !package.json !package-lock.json + +.gemini/.env +gemini_api_key.txt diff --git a/company-explorer/frontend/src/components/Inspector.tsx b/company-explorer/frontend/src/components/Inspector.tsx index bc2a576a..cf94576d 100644 --- a/company-explorer/frontend/src/components/Inspector.tsx +++ b/company-explorer/frontend/src/components/Inspector.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import axios from 'axios' -import { X, ExternalLink, Bot, Briefcase, Globe, Users, DollarSign, MapPin, Tag, RefreshCw as RefreshCwIcon, Search as SearchIcon, Pencil, Check, Download, Clock, Lock, Unlock, Calculator, Ruler, Database, Trash2, Flag, AlertTriangle, Scale, Target, Save } from 'lucide-react' +import { X, ExternalLink, Bot, Briefcase, Globe, Users, DollarSign, MapPin, Tag, RefreshCw as RefreshCwIcon, Search as SearchIcon, Pencil, Check, Download, Clock, Lock, Unlock, Calculator, Ruler, Database, Trash2, Flag, AlertTriangle, Scale, Target } from 'lucide-react' import clsx from 'clsx' import { ContactsManager, Contact } from './ContactsManager' @@ -453,41 +453,78 @@ export function Inspector({ companyId, initialContactId, onClose, apiBase }: Ins ) } - // CRM Comparison Renderer - const renderCRMComparison = () => { - if (!data?.crm_name && !data?.crm_website) return null; + // CRM Comparison and Data Quality Renderer + const renderDataQualityCard = () => { + if (!data) return null; + const hasCrmData = data.crm_name || data.crm_website; + const hasQualityScores = data.confidence_score != null || data.data_mismatch_score != null; + + if (!hasCrmData && !hasQualityScores) return null; + const confidenceScore = data.confidence_score ?? 0; + const mismatchScore = data.data_mismatch_score ?? 0; + + const getConfidenceColor = (score: number) => { + if (score > 0.8) return { bg: "bg-green-100", text: "text-green-700" }; + if (score > 0.5) return { bg: "bg-yellow-100", text: "text-yellow-700" }; + return { bg: "bg-red-100", text: "text-red-700" }; + } + + const getMismatchColor = (score: number) => { + if (score <= 0.3) return { bg: "bg-green-100", text: "text-green-700" }; + if (score <= 0.5) return { bg: "bg-yellow-100", text: "text-yellow-700" }; + return { bg: "bg-red-100", text: "text-red-700" }; + } + + const confidenceColors = getConfidenceColor(confidenceScore); + const mismatchColors = getMismatchColor(mismatchScore); + return (
-
+

- Data Match (CRM vs. AI) + Data Quality & CRM Sync

- {data.data_mismatch_score != null && ( - 0.5 ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700" - )}> - Match Score: {((1 - data.data_mismatch_score) * 100).toFixed(0)}% - - )}
-
-
+
+ {/* AI Quality Metrics */} +
+
AI Quality Scores
+ {data.confidence_score != null && ( +
+ Classification Confidence + + {(confidenceScore * 100).toFixed(0)}% + +
+ )} + {data.data_mismatch_score != null && ( +
+ CRM Data Match + + {((1 - mismatchScore) * 100).toFixed(0)}% + +
+ )} +
+ + {/* CRM Data Display */} +
SuperOffice (CRM)
-
Name: {data.crm_name || "-"}
-
Web: {data.crm_website || "-"}
-
Addr: {data.crm_address || "-"}
-
VAT: {data.crm_vat || "-"}
+
Name: {data.crm_name || "-"}
+
Web: {data.crm_website || "-"}
- -
-
Company Explorer (AI)
+
+ +
+
+
Enriched Data (AI)
Name: {data.name}
-
Web: {data.website}
+
Web: {data.website}
@@ -715,7 +752,7 @@ export function Inspector({ companyId, initialContactId, onClose, apiBase }: Ins
- {renderCRMComparison()} + {renderDataQualityCard()} {renderStrategyCard()}
diff --git a/company-explorer/frontend/src/components/RoboticsSettings.tsx b/company-explorer/frontend/src/components/RoboticsSettings.tsx index 3e90eb14..798f355a 100644 --- a/company-explorer/frontend/src/components/RoboticsSettings.tsx +++ b/company-explorer/frontend/src/components/RoboticsSettings.tsx @@ -179,7 +179,21 @@ export function RoboticsSettings({ isOpen, onClose, apiBase }: RoboticsSettingsP )}
-

{ind.name}

+
+

{ind.name}

+ {ind.priority && ( + + {ind.priority} + + )} + {ind.ops_focus_secondary && ( + + SEC-PRODUCT + + )} +
{ind.status_notion && {ind.status_notion}}
@@ -191,7 +205,33 @@ export function RoboticsSettings({ isOpen, onClose, apiBase }: RoboticsSettingsP
-

{ind.description || "No definition"}

+ +
+

{ind.description || "No definition"}

+ + {(ind.pains || ind.gains) && ( +
+ {ind.pains && ( +
+
Pains
+
{ind.pains}
+
+ )} + {ind.gains && ( +
+
Gains
+
{ind.gains}
+
+ )} +
+ )} + + {ind.notes && ( +
+ Notes: {ind.notes} +
+ )} +
Whale >{ind.whale_threshold || "-"}
Min Req{ind.min_requirement || "-"}