From f23ed40f0e53d749fe27a45ba7883938082dbabb Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 23 Nov 2026 14:07:11 +0000 Subject: [PATCH] fix(hub): focus the agent order title once it draws, not after 50 ms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openAgentOrder focused the Agent priority title on a 50 ms timer after setting the hash; when the hierarchy rendered later, as under memory pressure, the title never got focus. It now hands order:title to the order panel's next draw. The w6 probe waits for the speaking bubble instead of reading it the moment the first one has faded. 🎯 Fix: 85 % 💥 Break: 3 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 82 🚦 Gate: ⛔ fix 85 % < 90 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- orchestrator/templates/page-agent-order.js | 9 ++------- tests/e2e/test_workbench_w6_e2e.py | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/orchestrator/templates/page-agent-order.js b/orchestrator/templates/page-agent-order.js index 2cc9f8d..d05d19c 100644 --- a/orchestrator/templates/page-agent-order.js +++ b/orchestrator/templates/page-agent-order.js @@ -1,14 +1,9 @@ const orderDom = {box: null, slot: null, dragged: null, focus: null}; function openAgentOrder() { + orderDom.focus = "order:title"; go("agents", "hierarchy"); - window.setTimeout(() => { - const title = document.getElementById("agent-order-title"); - if (title) { - title.scrollIntoView({block: "nearest"}); - title.focus(); - } - }, 50); + drawAgentOrder(); } function syncOrder() { diff --git a/tests/e2e/test_workbench_w6_e2e.py b/tests/e2e/test_workbench_w6_e2e.py index dcd145e..595e1ee 100644 --- a/tests/e2e/test_workbench_w6_e2e.py +++ b/tests/e2e/test_workbench_w6_e2e.py @@ -129,7 +129,7 @@ BUBBLES_GROW = """(async () => {@HELPERS@@READ@ let grown = null; if (left) { await Promise.all((speaking() ? speaking().getAnimations() : []).map((animation) => animation.finished.catch(() => null))); - grown = read(speaking()); + grown = read(await until(speaking, 4000)); await until(() => mine().some((entry) => entry.removed), 4000); await until(() => (window.e2eFades || []).some((entry) => entry.who === who && entry.removed !== null && entry.reference !== null), 2000); }