Commit graph

3 commits

Author SHA1 Message Date
Pieter
834a333de2 Fix analysis data loading and template compatibility
- Add template compatibility fields to flagged items (item_id, item_type, source_type, text)
- Fix trend data field names (flagged_posts, flagged_mentions instead of flagged_statuses)
- Change trend sort order to ASC for chronological display
- Ensure API endpoint field mapping matches template expectations

Fixes:
- Internal server error on /analysis/flagged
- Empty trend graph (data now loads correctly)
- Hover tooltips now show correct flagged counts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-31 09:02:43 +02:00
Pieter
7f892456ae Fix toxicity analysis web interface
- Fix analysis_helpers stats to match template expectations (posts/replies/mentions breakdown)
- Fix SQL interval syntax in trend query
- Fix URL routing in templates (analysis_flagged, accounts_list)
- Add .claude/ to .gitignore

Analysis dashboard now accessible at http://localhost:8585/analysis

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-30 17:07:12 +02:00
Pieter
27582c7b77 Add toxicity analysis system for Mastodon statuses
Implements comprehensive toxicity analysis following the Bluesky collector architecture:

- Analyzer module with async batch processing using GPT-4o-mini
- Database schema for toxicity scores and analysis run tracking
- 12 toxicity categories (toxic, threat, hate_speech, racism, antisemitism, islamophobia, sexism, homophobia, insult, dehumanization, extremism, ableism)
- Web interface routes for analysis dashboard and flagged content review
- Manual review API endpoint for human validation
- Analysis helper functions for database queries
- Dutch language support with coded political term recognition

Usage:
  docker exec mastodon-collector-collector-1 python -m app.analyzer

See TOXICITY_ANALYSIS.md for full documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-30 14:43:35 +02:00