Skip to content

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

fix(debug): wait for composer instead of url to detect sign-in

Steven Enamakel4da6eb66c1d1
diff --git a/scripts/debug/web-scripts/stop-mid-turn.mjs b/scripts/debug/web-scripts/stop-mid-turn.mjs
index e48550fdb4..0cf086434d 100644
--- a/scripts/debug/web-scripts/stop-mid-turn.mjs
+++ b/scripts/debug/web-scripts/stop-mid-turn.mjs
@@ -12,7 +12,6 @@ const SLOW_THINKING = [
export default async function stopMidTurn({ page, mock, screenshot, log }) {
mock.set("llmStreamScript", SLOW_THINKING);
- await page.getByRole("button", { name: "New Conversation" }).click();
const composer = page.getByRole("textbox", { name: "Message input" });
await composer.click();
await composer.pressSequentially("think about this for a long time");
diff --git a/scripts/debug/web-ui.mjs b/scripts/debug/web-ui.mjs
index 66a289287d..60959785a5 100644
--- a/scripts/debug/web-ui.mjs
+++ b/scripts/debug/web-ui.mjs
@@ -120,13 +120,11 @@ async function signIn(page, appOrigin) {
await page.getByText("Welcome to OpenHuman").waitFor({ timeout: 120_000 });
log("signing in through the GitHub provider button (mock backend)…");
await page.getByRole("button", { name: "GitHub" }).click();
- await waitFor(
- async () => {
- const url = new URL(page.url());
- return url.origin === appOrigin && /^#\/(home|chat)/.test(url.hash);
- },
- { timeoutMs: 60_000, what: "the signed-in home page" },
- );
+ // The app bounces through `#/auth`, `#/chat` and `#/home` while boot
+ // settles; ready means the signed-in chat composer is actually on screen.
+ await page
+ .getByRole("textbox", { name: "Message input" })
+ .waitFor({ state: "visible", timeout: 120_000 });
}
async function main() {