Commit graph

177 Commits

Autor SHA1 Nachricht Datum
claude-dev
b604a80842 i18n: Fix gray map tiles, translate A11y/Notification panels, remaining strings
- Fix gray map on EN: always use tile.openstreetmap.de (org has rate limits)
- Add A11yManager._updateLabels() for live language switch of accessibility panel
- Add NotificationCenter._updateLabels() for notification panel translation
- Replace all remaining hardcoded de-DE locales with dynamic locale switch
- Translate sidebar stats, source discovery toasts, session expiry warning
- Translate source form hints, type labels, article progress counter
- Add 15+ new translation keys for missing strings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:36:28 +01:00
claude-dev
28458118d4 i18n: Fix last hardcoded German error string in export function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:13:54 +01:00
claude-dev
44997d511b i18n: Complete DE/EN language switcher integration
- Add LangManager with 270+ translation keys, anti-flicker lang detection
- Replace all hardcoded German strings in app.js, components.js, dashboard.html, index.html
- Dynamic getter properties for fact-check labels, category badges
- Language-aware map tiles (DE/EN OSM servers), CSP updated for tile.openstreetmap.org
- Lang switcher in header bar and login page
- Locale-aware date formatting, translateApiError for backend messages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:13:11 +01:00
claude-dev
1644f8786c Add i18n translation dictionary and LangManager singleton (DE/EN)
Provides full German/English translation support for the OSINT dashboard
with anti-flicker init, DOM hydration via data-i18n attributes, placeholder
replacement, API error translation, and locale-aware map tile URLs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:45:59 +01:00
claude-dev
e91829d215 Karte: Deutsche OSM-Kacheln, einheitlich fuer beide Themes
- tile.openstreetmap.de statt OSM/CartoDB: deutsche Ortsnamen
- Graue Vierecke behoben (Subdomain 'd' existierte nicht bei OSM)
- Gleiche helle Karte in Dark und Light Mode
- CSP img-src auf neuen Tile-Server aktualisiert

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:08:45 +01:00
claude-dev
559ace2f02 WCAG 2.1 AA: Focus-Styles, ARIA-Attribute, Tastatur-Navigation, Formvalidierung
- Default :focus-visible auf allen interaktiven Elementen (WCAG 2.4.7)
- A11y-Panel: role=group, Esc/Pfeiltasten, Fokus-Management
- Checkbox sr-only statt display:none (Screenreader-zugaenglich)
- Toggle-Switch Focus-Indikator
- aria-required, aria-expanded, aria-haspopup auf Formularen/Dropdowns
- Export-Dropdown: role=menu/menuitem/separator
- Sidebar: aria-expanded auf Sektionen, aria-hidden auf Chevrons
- Globaler Esc-Handler mit korrekter Schliess-Reihenfolge
- Formvalidierung: aria-invalid, aria-describedby, Fokus auf Fehler
- Notification-Items: role=button, tabindex=0
- Badges: aria-label/aria-hidden fuer Screenreader
- SR-Announcement bei Sidebar-Lage-Auswahl

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:53:13 +01:00
claude-dev
a6c24366a0 Quellenverwaltung: Boulevard-Kategorie, Duplikat-Prüfung, Domain-Normalisierung
- Boulevard als Kategorie in HTML-Dropdowns, JS-Labels und Pydantic-Validierung
- create_source: URL-Duplikat-Prüfung (409 Conflict bei existierender URL)
- create_source + update_source: Domain via _DOMAIN_ALIASES normalisieren
- System-Quellen (auto-entdeckt) sind jetzt von allen Nutzern editierbar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:45:01 +01:00
claude-dev
731a66ac80 Quellen-Bereinigung: Duplikate, Kategorien, Domains, URLs
DB:
- 7 Duplikate deaktiviert (tagesschau Atom, Spiegel, Zeit HTTP,
  BBC/ORF/CNN Subdomain-Duplikate)
- tomshardware + medium deaktiviert (kaum OSINT-relevant)
- Kategorien korrigiert: ft.com/bloomberg→international,
  n-tv→qualitaetszeitung, diverse Tech→fachmedien
- Domain-Spalte normalisiert: feeds.bbci.co.uk→bbc.com,
  rss.sueddeutsche.de→sueddeutsche.de, on.orf.at→orf.at etc.
- Leere URLs bei web_sources gefüllt, Anzeigenamen korrigiert

Code (source_rules.py):
- _DOMAIN_ALIASES Map für Subdomain→kanonische Domain Zuordnung
- _extract_domain() nutzt Alias-Map für konsistente Gruppierung

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:35:33 +01:00
claude-dev
7672bbcad6 Domain-Balance vor Haiku entfernt — Feeds sollen alle verfügbar bleiben
Die Feed-Vorfilterung (max 3 pro Domain) vor der Haiku-Selektion war
falsch: Alle thematischen Feeds (z.B. Guardian World, Politics, Middle East)
sollen Haiku zur Auswahl stehen. Die Quellenvielfalt wird stattdessen
durch den Prompt (QUELLENVIELFALT-Regel) und den Artikel-Cap nach
dem RSS-Fetch (max 10 Artikel/Domain) sichergestellt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:28:37 +01:00
claude-dev
ff4c54d9a8 Quellenvielfalt sicherstellen: Domain-Cap + Balance + Discovery-Verbesserungen
- config.py: MAX_FEEDS_PER_DOMAIN=3, MAX_ARTICLES_PER_DOMAIN_RSS=10
- rss_parser.py: _apply_domain_cap() begrenzt Artikel pro Domain nach RSS-Fetch
- orchestrator.py: Domain-Balance vor Feed-Selektion (max 3 Feeds/Domain),
  Domain-Cap in Background-Discovery
- source_rules.py: article_count in get_feeds_with_metadata(), Content-Hash
  in _validate_feed() für Duplikat-Erkennung bei Discovery
- researcher.py: QUELLENVIELFALT-Regel im Haiku Feed-Selektions-Prompt
- DB: 52 WordPress-Redirect-Duplikate deaktiviert (netzpolitik.org, bashinho.de)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:25:04 +01:00
claude-dev
0920d218f5 Fix: CSP blockierte Kartenkacheln - img-src um Tile-Server erweitert
- img-src erlaubt jetzt *.basemaps.cartocdn.com (Dark-Theme)
  und *.tile.openstreetmap.org (Light-Theme)
- Das war die Ursache fuer die graue Karte ohne Hintergrund

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:54:54 +01:00
claude-dev
17d2e097a6 Fix: Graue Karte - {r} aus Tile-URL entfernt
- {r} (Retina-Platzhalter) wurde nicht ersetzt und blieb literal in URL
- subdomains: 'abcd' explizit fuer CartoDB gesetzt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:53:03 +01:00
claude-dev
248536f1d5 Fix: Leaflet lokal hosten + Container-Hoehe explizit setzen
- Leaflet JS/CSS + MarkerCluster lokal in /static/vendor/ (kein CDN)
- Marker-Images lokal gehostet
- Container-Hoehe wird per JS berechnet falls gridstack 0px liefert
- gridstack karte-Item: display flex auf item-content
- Kein CDN-Abhaengigkeit mehr fuer Kartenfeature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:51:15 +01:00
claude-dev
8ff4f5618f Fix: Karte nicht sichtbar - Container-Hoehe in gridstack korrigiert
- map-card: position absolute + inset 0 (zuverlaessig in gridstack)
- map-container: min-height 0 statt 200px (flex-Item braucht das)
- map-empty: position absolute statt flex-basiert
- invalidateSize mit mehreren Retries (100/300/800ms)
- Bounds werden nach invalidateSize erneut gesetzt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:48:43 +01:00
claude-dev
75df9fc66d Fix: Leaflet 'L is not defined' - Integrity-Hashes entfernt + Guard
- SRI integrity-Hashes von Leaflet CDN-Links entfernt (verursachen
  stille Blockierung wenn Hash nicht passt)
- renderMap() prueft ob L verfuegbar ist und merkt sich Locations
- retryPendingMap() rendert nachtraeglich wenn Leaflet spaeter bereit ist
- 2s Retry-Timer nach init() als Fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:46:58 +01:00
claude-dev
2f6dd97100 Geoparsing als Hintergrund-Task mit Fortschrittsanzeige
- Endpunkt startet async Background-Task statt synchron zu warten
- Batch-Verarbeitung (50 Artikel pro Batch)
- Neuer Status-Endpunkt GET /incidents/{id}/geoparse-status
- Frontend pollt alle 3s und zeigt Fortschritt im Button (z.B. "150/427 Artikel...")
- Kein Timeout-Problem mehr bei grossen Lagen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:39:53 +01:00
claude-dev
6112cd5882 Fix: geonamescache alternatenames kann Liste statt String sein
- alternatenames-Feld wird jetzt sowohl als list als auch als str behandelt
- Behebt 'list' object has no attribute 'split' Fehler beim Geoparsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:36:28 +01:00
claude-dev
f7b5703db3 Fix: Magic-Link URL, Sidebar-Ladereihenfolge, Archiv-Standard + Geoparse-Button
- Magic-Link URL korrigiert: /auth/verify -> / (Login-Seite mit Token-Param)
- Sidebar: loadIncidents() vor NotificationCenter.init() verschoben
- NotificationCenter.init() in try/catch gewrappt
- Archiv-Sektion default geschlossen (display:none im HTML)
- Neuer Endpunkt POST /incidents/{id}/geoparse fuer bestehende Artikel
- "Orte erkennen"-Button in Karten-Kachel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:34:06 +01:00
claude-dev
4bfc626067 Kartenfeature: Geoparsing + Leaflet-Karte im Dashboard
- Neues Geoparsing-Modul (spaCy NER + geonamescache/Nominatim)
- article_locations-Tabelle mit Migration
- Pipeline-Integration nach Artikel-Speicherung
- API-Endpunkt GET /incidents/{id}/locations
- Leaflet.js + MarkerCluster im Dashboard-Grid
- Theme-aware Kartenkacheln (CartoDB dark / OSM light)
- Gold-Akzent MarkerCluster, Popup mit Artikelliste

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:04:07 +01:00
claude-dev
23ac6d6fd7 Fix: researcher.py korrupte Datei repariert (base64-Transfer) 2026-03-04 20:32:31 +01:00
claude-dev
3d9a827bc8 Inkrementelle Analyse + Token-Optimierung + Relevanz-Scoring
TOKEN-OPTIMIERUNG:
- Inkrementelle Analyse: Folge-Refreshes senden nur noch das bisherige
  Lagebild + neue Artikel an Claude (statt alle Artikel erneut).
  Spart ~60-70% Tokens bei Lagen mit vielen Artikeln.
- Inkrementeller Faktencheck: Bestehende Fakten als Zusammenfassung,
  nur neue Artikel werden vollstaendig geprueft.
- Modell-Steuerung: Feed-Selektion nutzt jetzt Haiku (CLAUDE_MODEL_FAST)
  statt Opus. Spart ~50-70% bei Feed-Auswahl.
- Set-basierte DB-Deduplizierung: Bestehende URLs/Headlines einmal
  in Sets geladen statt N*M einzelne DB-Queries pro Artikel.

INHALTLICHE VERBESSERUNGEN:
- Relevanz-Scoring: Artikel nach Keyword-Dichte (40%),
  Quellen-Reputation (30%), Inhaltstiefe (20%), RSS-Score (10%).
- Flexibles RSS-Matching: min. Haelfte der Keywords statt alle.
  RSS-Artikel bekommen einen relevance_score.
- Fuzzy Claim-Matching: SequenceMatcher (0.7) statt exakter
  String-Vergleich. Verhindert Duplikat-Akkumulation.
- Translation-Fix: Nur gueltige DB-IDs (isinstance int).
- Researcher: WebFetch fuer Top-Artikel, erweiterte Zusammenfassungen.

DATEIEN:
- config.py: CLAUDE_MODEL_FAST
- claude_client.py: model-Parameter
- researcher.py: Haiku Feed-Selektion, erweiterte Prompts
- analyzer.py: Inkrementelle Analyse + analyze_incremental()
- factchecker.py: Inkrementeller Check + Fuzzy-Matching
- orchestrator.py: Set-Dedup, Relevanz-Scoring, inkrementeller Flow
- rss_parser.py: Flexibles Keyword-Matching + relevance_score
2026-03-04 20:22:47 +01:00
claude-dev
54d02d2c5b Dünne Trennlinie zwischen Sidebar-Sektionen 2026-03-04 19:03:36 +01:00
claude-dev
247b72133e CLAUDE.md aktualisiert + broadcast_for_incident tenant_id Fix
- CLAUDE.md komplett neu geschrieben mit aktueller Projektstruktur
- broadcast_for_incident: tenant_id Parameter hinzugefuegt (TypeError Fix)
2026-03-04 18:55:17 +01:00
claude-dev
d9e0bab907 Fix: broadcast_for_incident Signatur um tenant_id erweitern
Die Methode wurde mit 4 Argumenten aufgerufen (message, visibility,
created_by, tenant_id), akzeptierte aber nur 3. Das führte zu einem
TypeError bei jedem Auto-Refresh und WebSocket-Broadcast.
2026-03-04 18:49:21 +01:00
claude-dev
71296edb97 Großes Cleanup: Bugs fixen, Features fertigstellen, toten Code entfernen
Bugs behoben:
- handleEdit() async keyword hinzugefügt (E-Mail-Checkboxen funktionieren jetzt)
- parseUTC() Funktion definiert (Fortschritts-Timer nutzt Server-Startzeit)
- Status cancelling wird im Frontend korrekt angezeigt

Features fertiggestellt:
- Sidebar: Lagen nach Typ getrennt (adhoc/research) mit Zählern
- Quellen-Bearbeiten: Edit-Button pro Quelle, Formular vorausfüllen
- Lizenz-Info: Org-Name und Lizenzstatus im Header angezeigt

Toter Code entfernt:
- 5 verwaiste Dateien gelöscht (alte rss_parser, style.css, components.js, layout.js, setup_users)
- 6 ungenutzte Pydantic Models entfernt
- Ungenutzte Funktionen/Imports in auth.py, routers, agents, config
- Tote API-Methoden, Legacy-UI-Methoden, verwaiste WS-Handler
- Abgeschlossene DB-Migrationen aufgeräumt

Sonstiges:
- requirements.txt: passlib[bcrypt] durch bcrypt ersetzt
- Umlaute korrigiert (index.html)
- CSS: incident-type-label → incident-type-badge, .login-success hinzugefügt
- Schließen statt Schliessen im Feedback-Modal
2026-03-04 18:45:38 +01:00
claude-dev
2a155c084d E-Mail-Benachrichtigungs-Toggles mit Backend verbinden
Die Toggle-Switches im Lage-Modal (Anlegen/Bearbeiten) waren nicht
mit den API-Endpunkten verbunden. Jetzt werden die Subscription-
Einstellungen korrekt geladen, gespeichert und zurueckgesetzt.

- api.js: getSubscription() und updateSubscription() hinzugefuegt
- app.js: handleFormSubmit() speichert Subscription nach Create/Edit
- app.js: handleEdit() laedt bestehende Subscription beim Oeffnen
- app.js: openModal() setzt Checkboxen im Create-Modus zurueck
2026-03-04 18:19:01 +01:00
claude-dev
8312d24912 Initial commit: AegisSight-Monitor (OSINT-Monitoringsystem) 2026-03-04 17:53:18 +01:00