Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

test(control-pane): pin which load decides a failed refresh

L4XB029f850bd0fe
diff --git a/tests/lib/control-pane-ui.test.js b/tests/lib/control-pane-ui.test.js
index fd6766562..d7f8a50b3 100644
--- a/tests/lib/control-pane-ui.test.js
+++ b/tests/lib/control-pane-ui.test.js
@@ -141,6 +141,25 @@ async function runTests() {
passed++;
else failed++;
+ if (
+ await test('a failed refresh stays off the board while newer data is shown and another refresh runs', async () => {
+ const page = openPage(snapshot);
+ await settle();
+
+ page.hold = true;
+ page.refresh();
+ page.refresh();
+ page.refresh();
+ page.pending[1].succeed();
+ await settle();
+ page.pending[0].fail();
+ await settle();
+ assert.strictEqual(page.element('#app').hidden, true, 'the board shows data from a load that started after the failed one');
+ })
+ )
+ passed++;
+ else failed++;
+
if (
await test('a refresh that fails after an older one succeeded is reported', async () => {
const page = openPage(snapshot);