Skip to content

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

feat(debug): add helper to reach chat in signed-in sessions

Steven Enamakelde9bfe66acea
diff --git a/scripts/debug/web-ui-lib.mjs b/scripts/debug/web-ui-lib.mjs
index e8d42af38a..ebfae4209c 100644
--- a/scripts/debug/web-ui-lib.mjs
+++ b/scripts/debug/web-ui-lib.mjs
@@ -48,6 +48,15 @@ export function startCoreChild(startChild, core, corePort, launchSpec) {
);
}
+/** Navigate an authenticated scripted session to chat when Home has no composer. */
+export async function ensureSignedInChat(page, appOrigin) {
+ const composer = page.getByRole("textbox", { name: "Message input" });
+ if (!(await composer.isVisible().catch(() => false))) {
+ await page.goto(`${appOrigin}/#/chat`);
+ }
+ await composer.waitFor({ state: "visible", timeout: 120_000 });
+}
+
export const USAGE = `Usage: pnpm debug web [options]
Boots a throwaway stack — mock backend, a fresh \`openhuman-core serve\` on a