Skip to content

v1.13.2

Choose a tag to compare

@TomSchmidtDev TomSchmidtDev released this 05 Jun 00:40
· 46 commits to main since this release

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):

  1. 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."
  2. 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.
  3. AnalysisPanel renders defensively as a last-resort fallback.