From 8ef9bbf119b2c8a0d107deb298bd2d77b592e6ca Mon Sep 17 00:00:00 2001 From: Brian Love Date: Sun, 12 Apr 2026 14:30:05 -0700 Subject: [PATCH] fix(chat): add trailing newline to a2ui JSONL for parser compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The A2UI message parser is line-based — it processes complete lines at \n boundaries. The hardcoded CONTACT_FORM_JSONL ended without a trailing newline, leaving the last line (updateComponents) in the parser buffer unprocessed. The surface was created with no components, causing surfaceToSpec() to return null and nothing to render. Fix: append "\n" after the joined JSONL string. Co-Authored-By: Claude Opus 4.6 (1M context) --- cockpit/chat/a2ui/python/src/graph.py | 2 +- cockpit/langgraph/streaming/python/src/a2ui_graph.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cockpit/chat/a2ui/python/src/graph.py b/cockpit/chat/a2ui/python/src/graph.py index 2d3b0616c..30a571169 100644 --- a/cockpit/chat/a2ui/python/src/graph.py +++ b/cockpit/chat/a2ui/python/src/graph.py @@ -66,7 +66,7 @@ "action": {"event": {"name": "formSubmit", "context": {"formId": "contact"}}}}, ], }}), -]) +]) + "\n" # Trailing newline required — parser processes at \n boundaries def build_a2ui_graph(): diff --git a/cockpit/langgraph/streaming/python/src/a2ui_graph.py b/cockpit/langgraph/streaming/python/src/a2ui_graph.py index 2d3b0616c..30a571169 100644 --- a/cockpit/langgraph/streaming/python/src/a2ui_graph.py +++ b/cockpit/langgraph/streaming/python/src/a2ui_graph.py @@ -66,7 +66,7 @@ "action": {"event": {"name": "formSubmit", "context": {"formId": "contact"}}}}, ], }}), -]) +]) + "\n" # Trailing newline required — parser processes at \n boundaries def build_a2ui_graph():