search for standard sites pub-search.waow.tech
search zig blog atproto

fix: dashboard timeline uses indexed_at instead of created_at

created_at is the document's publication date (set by the author),
which can be in the future. indexed_at is when we actually indexed
it, which is what the timeline should show. also caps at today.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+4 -3
+4 -3
backend/src/dashboard.zig
··· 52 52 ; 53 53 54 54 const TIMELINE_SQL = 55 - \\SELECT DATE(created_at) as date, COUNT(*) as count 55 + \\SELECT DATE(indexed_at) as date, COUNT(*) as count 56 56 \\FROM documents 57 - \\WHERE created_at IS NOT NULL AND created_at != '' 58 - \\GROUP BY DATE(created_at) 57 + \\WHERE indexed_at IS NOT NULL AND indexed_at != '' 58 + \\AND DATE(indexed_at) <= DATE('now') 59 + \\GROUP BY DATE(indexed_at) 59 60 \\ORDER BY date DESC 60 61 \\LIMIT 30 61 62 ;