diff --git a/web/run-detail.css b/web/run-detail.css index 9a6fa939..7dd373bc 100644 --- a/web/run-detail.css +++ b/web/run-detail.css @@ -281,5 +281,6 @@ /* A markdown stage body (the turn protocol) is prose, not a code block: keep the app's reading measure and its natural spacing. */ .field-markdown { max-width: var(--layout-measure); padding: 2px 0; } +.run-markdown-body { max-width: var(--layout-measure); padding: 4px 0; } .field-markdown > :first-child { margin-top: 0; } .field-markdown > :last-child { margin-bottom: 0; } diff --git a/web/src/views/runDetail.js b/web/src/views/runDetail.js index 03ade594..7f4b3f89 100644 --- a/web/src/views/runDetail.js +++ b/web/src/views/runDetail.js @@ -331,6 +331,13 @@ function renderRunFieldTab(map, keyPrefix, emptyMessage) { wrap.append(h("div", { class: "run-empty muted", text: emptyMessage })); return wrap; } + // A turn's output is one markdown body: render it as the result, not as a + // collapsed field named "markdown". Legacy field maps keep their sections. + const single = sections.length === 1 ? sections[0] : null; + if (single && single.key.toLowerCase() === "markdown") { + wrap.append(h("div", { class: "run-markdown-body" }, renderFieldValue(single.value))); + return wrap; + } for (const section of sections) { const key = `${keyPrefix}-${section.key}`; wrap.append(