Commit Graph

7 Commits

Author SHA1 Message Date
9bfd5e8dba feat: Status-Pipeline (reviewed), Audio-Verknüpfung+Coverage, EP-Fortschritt, Wort-Generierung
- reviewed-Status für objects/questions/statements/pairs (Constraints)
- feed: nur fertige Inhalte (published + Bild + Audio-Gate), audio_url
- pairs: Publish-Gating (draft→published = 409)
- audios: source_table/source_id/source_field/language + Unique-Index;
  generate-for, generate-batch, GET /coverage; voices.js (Voice je Sprache)
- auth: POST /auth/progress, /auth/me mit total_ep/streak/level;
  users_public EP-Spalten + user_pair_progress.earned_points
- claude: POST /generate-words; words POST akzeptiert status

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 21:29:48 +02:00
556fdb1d29 feat: new placeholder format {{label.w:id}} / {{label.o:id}}
- Labels are now embedded in sentence text — no DB lookup needed
- Objects fetch selections directly from objects table
- Pictures resolved via object_pairs join instead of sentence UUID scan
- Simpler placeholderMap: only type + selections for objects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 15:11:03 +02:00
b57d69fa8e fix(feed): load pictures via object_pairs instead of sentence UUID heuristic
Pictures are now fetched through the canonical pair→object relationship
(object_pairs table) rather than by guessing objects from sentence
placeholder UUIDs. Removes the word→object indirect lookup hack added
previously. One query covers all pairs in the batch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 22:20:00 +02:00
fa446ab353 fix(feed): resolve word→object links for picture lookup on word-type cards
Word-type placeholders in sentences (type='word') were never matched
against object_pictures, so those cards always had no image.
Now queries object_words by word_id to find associated objects,
adds them to resolvedObjectIds, and pickPicture checks wordObjectMap
as a fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 22:16:40 +02:00
d243e6e286 Use object.selections polygon for chip highlight instead of bbox columns
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 21:38:04 +02:00
9f738312e7 Add bbox coordinates to object_pictures for chip highlight feature
- Add bbox_x/y/w/h FLOAT columns to object_pictures (0–1 percentage range)
- Include type ('word'|'object') and bbox in feed placeholder response
- Fix picture query to use DISTINCT ON instead of LIMIT 1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 21:24:27 +02:00
6d13000248 feat: add /auth/feed endpoint for hydrated learning pairs
- GET /auth/feed?lang=sv&limit=20 (JWT, end-user allowed)
- Resolves {{uuid}} placeholders to word labels in all languages
- Includes picture URLs, pos/neg words per statement
- Fix migration seed: use full unique index (non-partial) for ON CONFLICT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 18:37:06 +02:00