Add AI status badges to show verification status on prices

- Add ai_status column to price_history table (verified/corrected/null)
- Track AI verification status through scraper and scheduler
- Display badges next to prices:
  - ✓ AI (green): AI verified the price is correct
  -  AI (orange): AI corrected an incorrect price
- Show badges on Dashboard product cards and ProductDetail page
- Add legend explaining badges in Settings when AI Verification is enabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-23 09:45:45 -05:00
parent 3d91489f12
commit ccbc188487
11 changed files with 173 additions and 23 deletions

View file

@ -126,10 +126,11 @@ async function checkPrices(): Promise<void> {
await priceHistoryQueries.create(
product.id,
scrapedData.price.price,
scrapedData.price.currency
scrapedData.price.currency,
scrapedData.aiStatus
);
console.log(
`Recorded new price for product ${product.id}: ${scrapedData.price.currency} ${scrapedData.price.price}`
`Recorded new price for product ${product.id}: ${scrapedData.price.currency} ${scrapedData.price.price}${scrapedData.aiStatus ? ` (AI: ${scrapedData.aiStatus})` : ''}`
);
} else {
console.log(`Price unchanged for product ${product.id}`);