Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(scripts): extract signed-in chat navigation into helper

Steven Enamakel7ee0d1fb4de4
diff --git a/scripts/debug/web-ui.mjs b/scripts/debug/web-ui.mjs
index e6a9e47558..74f1dbdd9c 100644
--- a/scripts/debug/web-ui.mjs
+++ b/scripts/debug/web-ui.mjs
@@ -22,6 +22,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
import {
devConnectUrl,
+ ensureSignedInChat,
coreLaunchSpec,
freePort,
isLoopback,
@@ -159,13 +160,7 @@ async function signIn(page, rpc, appOrigin) {
timeoutMs: 120_000,
what: "the core's authenticated state after mock sign-in",
});
- const composer = page.getByRole("textbox", { name: "Message input" });
- if (!(await composer.isVisible().catch(() => false))) {
- // Authenticated users now land on Home by default; scripted browser flows
- // need the chat route to exercise the same signed-in shell consistently.
- await page.goto(`${appOrigin}/#/chat`);
- }
- await composer.waitFor({ state: "visible", timeout: 120_000 });
+ await ensureSignedInChat(page, appOrigin);
}
async function main() {