Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(view): keep action results in view [H5,N26]

Corey Olsoncde6cecb0064
diff --git a/src/cockpit.js b/src/cockpit.js
index 4aedcea5..002ed6cc 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -1008,18 +1008,18 @@ async function act(command, args, anchor) {
if (latest()) {
out.className = 'console ok';
out.textContent = '$ pullboard ' + move.label + '\\n' + moveMessage(move.body, result.result);
- out.scrollIntoView({ block: 'nearest' });
+ out.scrollIntoView({ block: 'center' });
// What went through says so and then steps aside; a refusal stays until the person closes it.
view.closing = setTimeout(() => { if (latest()) out.hidden = true; }, 6000);
}
await refresh();
- if (latest()) out.scrollIntoView({ block: 'nearest' });
+ if (latest()) out.scrollIntoView({ block: 'center' });
return true;
} catch (error) {
if (latest()) {
out.className = 'console no';
out.textContent = String(error.message || error);
- out.scrollIntoView({ block: 'nearest' });
+ out.scrollIntoView({ block: 'center' });
}
return false;
}
diff --git a/test/cockpit.test.js b/test/cockpit.test.js
index 09994501..7fb72600 100644
--- a/test/cockpit.test.js
+++ b/test/cockpit.test.js
@@ -2670,6 +2670,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [H5,N2
await fill('#add-specs', 'G1');
await click('#add-form button[type="submit"]');
await chrome.waitFor(`document.querySelector('#chain').innerText.includes('Phone item ${width}')`);
+ await chrome.waitFor("document.querySelector('#console.ok') && document.querySelector('#console').textContent.includes('added #')");
await checkLayout(width, 'successful add toast');
await click('[data-tab="shouts"]');