From ff5d7b78415f8987f13d345403efb49eb8e5923c Mon Sep 17 00:00:00 2001 From: jeremy Date: Sun, 8 Mar 2026 20:19:42 -0500 Subject: [PATCH] fix: correct JavaScript field names to match API response schema The web UI was referencing stale field names that didn't match the actual API response fields returned by the backend: event.status -> event.match_status event.identified_as -> event.matched_object_name event.description -> event.ai_description event.timestamp -> event.created_at stats.known -> stats.known_matches stats.unknown -> stats.unknown_events stats.known_objects -> stats.known_objects_count This caused the review queue to display blank badges, timestamps, descriptions, and identifications, and the dashboard stats to show all zeros. Co-Authored-By: Claude Sonnet 4.6 --- app/static/app.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/static/app.js b/app/static/app.js index a744b98..5805e79 100644 --- a/app/static/app.js +++ b/app/static/app.js @@ -190,11 +190,11 @@ — ${escapeHtml(event.label || 'unknown')} (${(event.score * 100).toFixed(0)}%) - ${event.status || 'unreviewed'} + ${event.match_status || 'unreviewed'} -
${formatTime(event.timestamp)}
- ${event.description ? `
${escapeHtml(event.description)}
` : ''} - ${event.identified_as ? `
Identified as: ${escapeHtml(event.identified_as)}
` : ''} +
${formatTime(event.created_at)}
+ ${event.ai_description ? `
${escapeHtml(event.ai_description)}
` : ''} + ${event.matched_object_name ? `
Identified as: ${escapeHtml(event.matched_object_name)}
` : ''}
@@ -379,15 +379,15 @@
Known - ${stats.known || 0} + ${stats.known_matches || 0}
Unknown - ${stats.unknown || 0} + ${stats.unknown_events || 0}
Known Objects - ${stats.known_objects || 0} + ${stats.known_objects_count || 0}
`; }) .catch(() => {