mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
Comic-Modul nutzte bisher rohe meImages direkt als Story-Refs: gpt-image-2 / Nano Banana variieren zwischen Calls, Panel 1 sah anders aus als Panel 4, User hatte keine Iteration vor der Story. Lösung: Comic-Character als eigene Entität, einmal aufgebaut + iteriert + gepinnt, danach Story-Anchor. Datenschicht: - Dexie v49 `comicCharacters` (space-scoped, indices createdAt / style / isFavorite / isArchived). - types.ts: LocalComicCharacter mit name + style + addPrompt + sourceFaceMediaId + sourceBodyMediaId? + variantMediaIds[] + pinnedVariantId?, plus toCharacter + characterCoverVariantId helper (pinned > erste Variant > null). - crypto/registry.ts: comicCharacters entry — name + description + addPrompt + tags encrypted; style + IDs + Variant-Liste + Booleans plaintext. - collections.ts: comicCharactersTable. - queries.ts: useAllCharacters, useCharactersByStyle, useCharacter via scopedForModule (alle space-scoped). - stores/characters.svelte.ts: createCharacter (auto-pin first variant fallback), appendVariant (auto-pin if none yet), pinVariant, removeVariant (mit pin-fallback auf erste remaining), updateCharacter, toggleFavorite, archiveCharacter, deleteCharacter. Arrays werden via [...arr] entproxiet (Svelte 5 $state defense). - module.config.ts: comicCharacters in tables-Liste. - picture/types.ts + queries.ts: comicCharacterId Back-Ref auf LocalImage + Image, mutually exclusive mit comicStoryId. - 3 neue Encryption-Roundtrip-Tests (insgesamt 8 grün) für charakter-Row, Build-in-progress (no variants), Roundtrip. Architektur-Entscheidungen (Plan-Doc §11 dokumentiert): - **space-scoped**, nicht user-global: Source-meImages sind ja selbst space-scoped post-v40, sonst orphan-Refs nach Space-Wechsel. - **Snapshot at story-create**, kein Live-Lookup: Stories speichern die mediaId der gepinnten Variant zum Erstellungs- zeitpunkt → re-pinning eines Characters lässt bestehende Stories unverändert. - **n=4 fixes Variant-Count**: in einem gpt-image-2-Call parallel; sweet-spot für Auswahl ohne Decision-Fatigue. - **Mutually-exclusive Back-Refs** auf picture.images: comicStoryId XOR comicCharacterId — Image ist Panel ODER Variant, nie beides. Mc2 (UI: Builder + Variant-Grid + Routes), Mc3 (Story-Create- Update + Soft-Migration), Mc4 (MCP/Catalog), Mc5 (Wardrobe-Hook) folgen separat. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||