Skip to content

capture.mjs targets the untitled-thread row, not the rail's create button #775

Open

Description

@blove

docs/brand/demo/capture.mjs's fillActiveWorkbenchComposer (~line 760) waits on:

page.getByRole("button", { name: "New conversation", exact: true })

intending the thread rail's create button. That is not what it matches.

The distinction

In packages/devkit/templates/app-research/web/app/components/ThreadRail.tsx:

  • the create button renders the literal text + New conversation (~line 42; a unit test asserts toContain("+ New conversation"))
  • an untitled thread row renders exactly New conversation (UNTITLED_THREAD_LABEL, ~lines 24 and 53)

Measured in real Chromium: the bare-string locator resolves to 1 element on a fresh page load — the untitled row — and to 0 once that thread has been titled.

Why it matters

It is harmless in capture.mjs today, because the helper only waits for visibility on a freshly loaded page where an untitled row always exists. But the same string was copied into the Workbench browser gate (test/harness/workbench-suggestions.ts) and was a real blocker there: the first journey passed by accident (clicking the already-active untitled row is a no-op) and the second and third timed out once the first journey titled the thread. Fixed in #765 by targeting + New conversation.

Fix

Either target the create button explicitly (name: "+ New conversation"), or — if the helper really wants "the page is ready and a thread exists" rather than the create button — retarget it at something that says so. Either way leave a comment recording the + distinction so it is not reintroduced.

capture.mjs is shared by the README recording (pnpm media:readme:capture) and by the W7 browser gate, so verify with:

pnpm exec vitest --run --config test/generated/vitest.config.ts test/harness/workbench-browser.test.ts
pnpm test:brand-demo
pnpm verify:harness:framework

Node 24.

Activity

  1. added
    bug
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions