Enhanced the web interface with comprehensive human review capabilities for validating AI-flagged toxicity classifications. Added date filtering and improved data collection to include engagement metrics for mentions. Features added: - Human review system with ✓/✗/? status buttons and filtering - Date range filtering (from/to) for flagged content - Review status tracking with database migrations - Engagement metrics collection for mentions (likes, replies, reposts, quotes) - Interactive review buttons that allow changing classifications - Review filter to show unreviewed, correct, incorrect, or unsure items UI improvements: - Fixed Chart.js CDN URLs (switched to jsdelivr) - Smart axis scaling for toxicity category charts with dynamic decimal places - Clickable max toxicity badges linking to filtered content - Improved mention author display using raw_json fallback - Sortable table columns with visual indicators - Review status preserved across pagination and filtering Bug fixes: - Commented out problematic account (stephanvanbaarle.bsky.social) - Fixed filter parameter names (content_type, account_did) - Fixed threshold boundary issues with 0.001 offset - Added extra_js block to base template for JavaScript functionality Database changes: - Migration 03: Added engagement columns to mentions table - Migration 04: Added human_reviewed, review_status, reviewed_at columns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
444 B
SQL
10 lines
444 B
SQL
-- Add engagement metrics to mentions table
|
|
-- Migration to add like_count, reply_count, repost_count, quote_count
|
|
|
|
ALTER TABLE mentions
|
|
ADD COLUMN IF NOT EXISTS like_count INTEGER DEFAULT 0,
|
|
ADD COLUMN IF NOT EXISTS reply_count INTEGER DEFAULT 0,
|
|
ADD COLUMN IF NOT EXISTS repost_count INTEGER DEFAULT 0,
|
|
ADD COLUMN IF NOT EXISTS quote_count INTEGER DEFAULT 0;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_mentions_like_count ON mentions (like_count DESC);
|