From f87a674e14b4af807d3e14680cddd1a1f6d53d30 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 11:06:03 +0200 Subject: [PATCH] fix(flow): flashError was inserting at top of terminal (invisible) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compose box's send-error path used: flow.insertBefore(row, flow.firstChild) This inserts the error before the first (oldest) child — at the top of the terminal's scroll area — which is completely out of view since the operator is at the bottom watching new messages. Changed to flow.append(row) + scroll the wrap element to the bottom so the error appears where the operator is looking. Also prefixed the message with '✗ ' so it's visually distinct from regular flow rows. --- frontend/packages/dashboard/src/flow.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/packages/dashboard/src/flow.js b/frontend/packages/dashboard/src/flow.js index 1d8a23f1..5c5cfdf9 100644 --- a/frontend/packages/dashboard/src/flow.js +++ b/frontend/packages/dashboard/src/flow.js @@ -380,8 +380,14 @@ import { if (!flow) return; const row = document.createElement('div'); row.className = 'msgrow meta'; - row.textContent = msg; - flow.insertBefore(row, flow.firstChild); + row.textContent = '✗ ' + msg; + // Append at the bottom so the error is visible — the terminal + // renders newest-last, so inserting before firstChild would place + // the error at the top (oldest end) and hide it from view. + flow.append(row); + // Scroll the terminal wrap so the error is in view. + const wrap = flow.parentElement; + if (wrap) wrap.scrollTop = wrap.scrollHeight; } input.addEventListener('input', () => { autosize(); updateSuggest(); }); input.addEventListener('keydown', (e) => {