Skip to content

Your team of AI agents, on your Mac, Windows or Linux. Agents that talk in channels, write code, review each other and use your tools, on the Claude Code, Codex, OpenCode or Pi you already have. Anything that touches the real world waits for your yes.

Fix the stale selectors in screens.mjs (#154)

João Vitor Carvalho91e143d1d1e3
diff --git a/docs/windows.md b/docs/windows.md
index 20cb972..fcc9d69 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -157,7 +157,7 @@ Shortcuts (Ctrl off a Mac), their labels (`shortcut(platform, key)`), the menu a
- `npm run typecheck`: clean.
- `npm test`: every test passes, including the 17 Docker tests with Docker Desktop 29.6 running. Without Docker running, those are skipped, as on the Mac.
-- `npm run build`, then `scripts/screens.mjs` with the fake engines, through screen 24 of 27: channels, router, handoffs, `ask_user`, connectors with the demo MCP server, grants, approvals, memory, summaries, and the Linux computer in Docker with a lent command, a service on port 8000, a screenshot and the side panel. The last steps (routines) fail on every system: their selectors (`.routine-example`, `.routine-form`) predate the calendar redesign of the Routines page. The routine engine is covered by `test/routines.test.ts`.
+- `npm run build`, then `scripts/screens.mjs` with the fake engines, through all 27 screens (with `TUCANO_LOCALE=pt-BR`, which the selectors need): channels, router, handoffs, `ask_user`, connectors with the demo MCP server, grants, approvals, memory, summaries, and the Linux computer in Docker with a lent command, a service on port 8000, a screenshot and the side panel.
- One real turn with Claude Code 2.x (`claude.exe`): detected and signed in, the agent replied through the per-turn MCP gateway, receipt included.
- The packaged app (`electron-builder --win --dir`): starts, finds its bundled sounds, has the Windows menu, and Ctrl+K opens *Go to*.
diff --git a/scripts/screens.mjs b/scripts/screens.mjs
index bd19aef..2f8d2a0 100644
--- a/scripts/screens.mjs
+++ b/scripts/screens.mjs
@@ -70,13 +70,12 @@ await shot('07-uso')
// ---------- M3: connector, grant, tools, approval ----------
await win.click('.nav-item:has-text("Conectores")')
-await win.click('text=Adicionar conector')
+await win.click('button:has-text("Adicionar personalizado")')
await win.click('button[role=radio]:has-text("Local")')
await win.click('text=Preencher com o servidor de demonstração')
await shot('08-novo-conector')
-await win.click('button:has-text("Conectar")')
-await win.waitForSelector('.connector .tag:has-text("conectado")', { timeout: 20_000 })
-await win.click('.connector__head')
+await win.click('.connector__actions button.btn--primary')
+await win.waitForSelector('.connector-modal .tag:text-is("conectado")', { timeout: 20_000 }) // the new connector opens in a window
await shot('09-conector-ferramentas')
// Give Lia read and write on it.
@@ -105,7 +104,7 @@ await win.click('.nav-item:has-text("Aprovações")')
await shot('14-aprovacoes')
await win.click('.nav-item:has-text("Conectores")')
-await win.click('.connector__head')
+await win.click('.catalog__card.is-mine')
await shot('15-ferramenta-nova')
// Theo (Codex) reads the same connector.
@@ -169,6 +168,7 @@ await shot('21-computador-chat')
await win.click('.artifact-image')
await win.waitForTimeout(500)
await shot('22-painel-print')
+await win.keyboard.press('Escape') // close the screenshot lightbox
const open = win.locator('.artifact-card--service button:has-text("Abrir")')
if (await open.count()) {
await open.first().click()
@@ -180,14 +180,25 @@ if (await open.count()) {
await win.click('.nav-item:has-text("Rotinas")')
await shot('24-rotinas-vazio')
-await win.click('.routine-example:has-text("Fechamento da semana")')
+await win.click('.cal__empty button:has-text("Fechamento da semana")')
await win.locator('.routine-form select').nth(1).selectOption({ label: '#engenharia' })
await shot('25-rotina-nova')
await win.click('button:has-text("Criar rotina")')
-await win.click('.routine button:has-text("Rodar agora")')
-await win.waitForSelector('.routine .tag:text-is("respondeu")', { timeout: 120_000 })
+await win.locator('.routine-form').waitFor({ state: 'detached' })
+// The routine is a block on the calendar. The calendar shows only what's still to come, so past
+// Friday 17:00 this week's block is gone: find it next week, and come back to this one for the run.
+const routine = win.locator('.cal__ev:has-text("Fechamento da semana")')
+const later = (await routine.count()) === 0
+if (later) await win.keyboard.press('ArrowRight')
+await routine.first().click()
+await win.click('.cal-pop button:has-text("Rodar agora")')
+if (later) await win.keyboard.press('t')
+const ran = win.locator('.cal__ev:has-text("Fechamento da semana"):has(.cal__ev-ok)')
+await ran.waitFor({ timeout: 120_000 })
+await win.keyboard.press('Escape') // the popover can cover the run's block
+await ran.first().click()
await shot('26-rotinas')
-await win.click('.routine button.link:text-is("ver")')
+await win.click('.cal-pop button:has-text("Ver a")')
await settle()
await shot('27-rotina-na-conversa')