fix(flow): flashError was inserting at top of terminal (invisible)
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.
This commit is contained in:
parent
435be4302e
commit
f87a674e14
1 changed files with 8 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue