feat: duplicate product detection — STEP conflict warnings on Excel import and CAD upload

- Excel preview detects when a product already has a different STEP file linked
- Excel preview detects intra-Excel conflicts (same product, different CAD model names)
- Product STEP upload warns when replacing an existing file and shows render count
- All warnings are non-blocking (amber badges, toast warnings)
- LEARNINGS.md: all open items resolved

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 13:05:40 +01:00
parent f0dd952f63
commit b6bac080bb
10 changed files with 207 additions and 173 deletions
+2
View File
@@ -126,6 +126,8 @@ export interface ProductCadUploadResponse {
file_hash: string
status: string
product_id: string
warnings?: string[]
existing_render_count?: number
}
export async function uploadProductCad(id: string, file: File): Promise<ProductCadUploadResponse> {
+8
View File
@@ -13,6 +13,12 @@ export interface ExcelPreviewRow {
has_step: boolean
is_duplicate: boolean
duplicate_of_row: number | null
step_conflict: boolean
step_conflict_existing_name: string | null
step_conflict_excel_name: string | null
cad_name_conflict: boolean
cad_name_conflict_other_name: string | null
cad_name_conflict_row: number | null
}
export interface ExcelPreviewResult {
@@ -26,6 +32,8 @@ export interface ExcelPreviewResult {
has_step_count: number
no_step_count: number
duplicate_count: number
step_conflict_count: number
cad_name_conflict_count: number
warnings: string[]
rows: ExcelPreviewRow[]
column_headers: string[]