v1.13.2
Bug Fix
AI analysis crash: React Error #31 when model returns objects instead of strings
The optimised analysis mode occasionally made the model return structured objects like {"phase": "Extraction", "finding": "...", "action": "..."} instead of plain strings in the barista/roaster arrays. React then crashed with Error #31 ("Objects are not valid as a React child").
Root cause: The optimised system prompt showed {"barista":[...],...} without an explicit string example — the model interpreted the instruction to "reference phase names" as a reason to build structured objects.
Fix (three layers):
- All four system prompts (standard/optimised × DE/EN) now show string examples and explicitly state: "Each entry must be a plain text string — NOT an object, NOT nested JSON."
- New
normalizeAnalysisArray()function converts any object entries to readable strings (phase — finding — action) at the API boundary — runs on both fresh responses and cached results, so already-stored bad analyses are fixed on next view without regenerating. AnalysisPanelrenders defensively as a last-resort fallback.