Commit Graph

17 Commits

Author SHA1 Message Date
05c62ac414 feat: Bild in Annotieren-View löschen (Eintrag + Datei aus Directus)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 21:19:51 +02:00
22e6b0a5a5 fix: Design-PATCH fehlte Bearer-Token + Race Condition bei Fertigstellen
- Neues updateDbPicture() in api.ts mit korrektem Bearer-Header
- Design-onChange nutzt updateDbPicture statt rohem fetch (kein Bearer-Bug mehr)
- finishPicture sendet status + design in einem PATCH (kein Race Condition)
- app.py: get_json(force=True, silent=True) für db-pictures PATCH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 20:32:55 +02:00
5424fea8e1 fix: blurhash cache miss, design dropdown visibility + add Hauptwörter panel
- DrawCanvas: call onImageLoad for cached images (fixes permanent blur)
- DrawIt: reset imageLoaded immediately on navigation (shows blur right away)
- Design dropdown: always visible when picture loaded, no longer gated on designOptions or objects count
- Fertigstellen: always visible when picture loaded, disabled when no objects
- Hauptwörter: new panel above object list for picture-level words (db_words_db_pictures)
- Backend: DELETE /api/directus/db-pictures/<id>/words/<junction_id>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:47:14 +02:00
17918a414b feat: object words in right sidebar + design dropdown
- Words panel moved to right sidebar: shows selected object's words or pending words for new object
- Pending words auto-saved to object after creation
- Remove word chips from left sidebar object cards
- Design dropdown in left sidebar (above Fertigstellen), loads choices dynamically from Directus field metadata
- Include design field in db_pictures GET response

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 18:26:38 +02:00
40c36182f1 feat: multi-word per object + {objectID.wordID} placeholders
- Annotate: multiple words per object via db_objects_db_words M2M, word chips with add/remove per object card
- Generate sidebar: objects shown with comma-separated word list as display name
- Generate pair form: all object words as suggestion chips, click inserts {objectId.wordId} at cursor
- Preview resolves {objectId.wordId} → actual word text
- Backend: POST adds single word (no replace), new DELETE /db-objects/<id>/words/<junctionId>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 16:49:24 +02:00
214f8a2019 feat: object label per object + {obj:UUID} sentence placeholders
- Annotate: per-object single label input (M2M via db_objects_db_words), auto-save on blur, remove picture-level word section
- Generate: object chips insert {obj:UUID} at cursor position in question/statement textarea
- Live preview resolves {obj:UUID} → actual object label
- PairsList display also resolves placeholders
- Remove F/A/B word chip system from pair form (replaced by object placeholders)
- Backend: POST /api/directus/db-objects/<id>/words replaces existing word with single label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 13:04:37 +02:00
f4b082329e feat: blurhash placeholder while image loads
- Add BlurhashCanvas component (decodes hash → canvas pixel data)
- DrawCanvas: expose onImageLoad callback prop
- DrawIt + GenerateIt: show blurhash layer until real image is ready,
  reset imageLoaded state on picture navigation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 08:09:09 +02:00
7c983a7460 refactor: migrate to new db_* Directus collections
- DrawIt: load db_pictures (status=draft), create db_objects/db_words
  with blurhash placeholder, finish sets status=objects_created
- GenerateIt: load db_pictures (status=objects_created), right panel
  replaced with manual QA pairs (db_pairs + db_question + db_statement)
- Backend: new routes for db_pictures, db_objects, db_words, db_pairs
- Types/API: full db_* type definitions and API helpers
- Directus: user_notes field in db_objects, M2M db_words<->db_pictures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 08:03:23 +02:00
Tim Leikauf
08cce17976 fix(draw): Bildnavigation debounce – nur letztes Bild laden bei schnellem Weiterklicken
currentPicture folgt debouncedIndex (350ms), currentIndex reagiert sofort
für Counter und Button-Disabled-State.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:28:11 +02:00
Tim Leikauf
84186110e7 feat(annotate): Words-Frame – Safe Words mit Level per Bild speichern
- Rechte Sidebar in zwei Frames aufgeteilt: Objects (bisherig) + Words (neu)
- Words-Frame: Wörter + Level (1–100) per Bild anlegen, dedupliziert via words_pictures Junction
- Pending-Words in Primary-Farbe mit inline Level-Edit, gespeicherte Words in neutralem Grau
- Save-Button speichert alle pending Words nach Directus (status=draft, title_de, level, picture-Link)
- Automatisches Laden der Bild-Words bei Bildwechsel
- Backend: GET/POST /api/directus/pictures/<pic_id>/words (words_pictures Junction, _find_or_create_word)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:05:19 +02:00
a42fadef09 Fertigstellen-Button + drawing_created Status-Flow
- DrawIt: Button "Fertigstellen" unter Objektliste setzt Picture-Status auf drawing_created
- Bild verschwindet danach aus der Annotieren-Ansicht
- GenerateIt: lädt jetzt Directus-Bilder mit status=drawing_created
- GenerateIt: zeigt Bild-Vorschau + Directus-Objekte
- app.py: PATCH-Endpunkt für Pictures + Status-Parameter im GET

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:49:13 +02:00
e18d9a5796 bbox/polygon durch selections ersetzen
- bbox und polygon Felder in Directus versteckt (Daten bleiben)
- Alle Auswahlen laufen nur noch über das selections-Feld
- CanvasObject, DirectusObject, API und Zeichenlogik umgestellt
- Objekte mit mehreren Auswahlen werden korrekt auf Canvas gezeichnet

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:36:22 +02:00
807c733770 Mehrere Auswahlen in einem Objekt speichern
- Neues JSON-Feld 'selections' in Directus objects-Collection
- Alle Auswahlen (bbox/polygon) landen in einem einzigen Objekt
- Erste Auswahl bleibt weiterhin in bbox/polygon für Kompatibilität
- GET-Proxy liefert selections-Feld mit aus

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:23:22 +02:00
8219a5445c Polygon: Standard-Modus + Schließen-Button
- Polygon ist jetzt der Standard-Modus beim Öffnen
- Neuer Button "Polygon schließen" erscheint im Polygon-Modus
- Button aktiviert sich nach dem 2. gesetzten Punkt
- Klick schließt das Polygon automatisch (kein Doppelklick mehr nötig)
- Auswahl hinzufügen schließt offenes Polygon ebenfalls automatisch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:07:51 +02:00
343d6a2389 Objekte direkt in Directus speichern + neuer Annotationsworkflow
- DirectusObject Typ + CanvasObject Interface in types.ts
- DrawCanvas nutzt CanvasObject (generisch, nicht mehr ObjectMeta-gebunden)
- Flask: /api/directus/objects (GET/POST), /api/directus/objects/<id> (PATCH/DELETE)
- Flask: /api/directus/setup-m2m (einmalig: m2m für categories/questions)
- api.ts: getDirectusObjects, createDirectusObject, updateDirectusObject, deleteDirectusObject
- DrawIt: Objekte werden in Directus gespeichert (mit picture, bbox/polygon, user_notes, parent)
- DrawIt: Linke Sidebar zeigt Objektliste mit Notizen-Editor und Löschen-Button
- DrawIt: Rechte Sidebar: Modus, user_notes Textarea, Parent-Dropdown, Auswahlen
- Directus: user_notes Feld (textarea), action/resolution/confidence/media versteckt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 20:26:46 +02:00
a392b680d2 Professionelles Redesign + Directus-Auth + Tag/Nacht-Modus
- Vollbild App-Shell mit Topbar, drei-Spalten-Workspace
- Login-Seite mit Directus JWT-Authentifizierung (in-memory Token)
- Tag/Nacht-Modus mit CSS Custom Properties (Systemfarbe als Default)
- Directus 'pictures' Collection (status=new) als Bildquelle in DrawIt
- Pfeil-Navigation durch Bilder mit Bildnummer-Anzeige
- Neues Design-System: Indigo-Akzent, SVG-Icons, professionelle Typografie
- ThemeProvider, AuthProvider, PrivateRoute, Topbar-Komponente

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:20:45 +02:00
5d47482d2a Erster Commit 2026-04-23 22:10:45 +02:00