feat: Registry-verified badge + registryData data flow + V3 error recording

- ClinicSnapshot.tsx: 'Registry 검증' badge (ShieldCheck icon), district/branches/brandGroup pills, external links (강남언니/네이버플레이스/구글맵) when source=registry
- report.ts: add source and registryData fields to ClinicSnapshot type
- transformReport.ts: ApiMetadata now accepts source/registryData; passes to clinicSnapshot
- useReport.ts: DB load path extracts scrape_data.source + scrape_data.registryData → transformApiReport
- V3 dual-write error recording: discover-channels, collect-channel-data, generate-report now write error_message + error status to analysis_runs on catch instead of silently swallowing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Sonnet 4.6 committed 2026-04-07 10:01:19 +09:00
1 parent 36d2f1cf49
commit ae87953fa0
7 files changed
+143 -4

No files matched your search

+13 -1
View File
@@ -337,7 +337,16 @@ ${JSON.stringify(scrapeData.branding || {}, null, 2).slice(0, 1000)}
status: "complete",
pipeline_completed_at: new Date().toISOString(),
}).eq("id", v3RunId);
} catch (e) { console.error("V3 run update error:", e); }
} catch (e) {
const errMsg = e instanceof Error ? e.message : String(e);
console.error("V3 run update error:", errMsg);
try {
await supabase.from("analysis_runs").update({
error_message: `V3 report update failed: ${errMsg}`,
status: "report_error",
}).eq("id", v3RunId);
} catch { /* ignore secondary failure */ }
}
}
if (v3ClinicId) {
try {
@@ -362,6 +371,9 @@ ${JSON.stringify(scrapeData.branding || {}, null, 2).slice(0, 1000)}
socialHandles: report.socialHandles,
address: clinic.address || "",
services: clinic.services || [],
// Registry metadata — available when discovered via clinic_registry DB
source: scrapeData.source || "scrape",
registryData: scrapeData.registryData || null,
},
}),
{ headers: { ...corsHeaders, "Content-Type": "application/json" } },