From bcc3835fba0f279e52309713a4e8145f09702234 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Mon, 19 Oct 2026 11:35:41 +0100 Subject: [PATCH] web: open a different chat row before the L1 chat_shells assertion The discovery loop already opened the session it found, and openChatSession keeps a loaded thread, so the assertion's second click early-returned and sent nothing once the live server listed an empty session first. --- web/test/ui-smoke.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/test/ui-smoke.mjs b/web/test/ui-smoke.mjs index fbf4ca72..f63d79c8 100644 --- a/web/test/ui-smoke.mjs +++ b/web/test/ui-smoke.mjs @@ -2448,6 +2448,14 @@ try { if (openedId !== expectedSession) { console.log(` -- the live server's first session with history is ${openedId}, not ${expectedSession}`); } + // Leave the discovered session first: the loop above already opened it, and + // openChatSession keeps a loaded thread, so clicking it again would early-return + // and send nothing. Opening a different row restores a genuine fresh open. + const otherRow = candidates.find((id) => id !== openedId); + if (otherRow) { + await page.click(`#chatRows .chat-row[data-session="${otherRow}"]`); + await new Promise((resolve) => setTimeout(resolve, 600)); + } // Record the frames the page sends, so the C11 chat_shells fetch on open is // asserted rather than assumed. await page.evaluate(`(() => { window.__pipelinesSentTypes = []; return true; })()`);