Skip to content

Open one list item during deep research to find controls inside it - #296

Closed
DavertMik wants to merge 1 commit into
mainfrom
research-data-item
Closed

DavertMik wants to merge 1 commit into
mainfrom
research-data-item

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Problem

A plan for a pet store had 25 tests and none touched the cart. "Add to cart" only exists in the product dialog, which opens when a card is clicked, and deep research never clicked a card:

  • Lists are written as Data: sections with no UI map table.
  • parseResearchSections drops Data: sections, so _discoverExpandables never sees them as candidates.

The Planner's grounding rules then correctly refused to plan what research had not seen.

Change

  • performDeepAnalysis now also clicks the first suitable item control in each Data: section (_findDataItems). This adds at most one click per list, on top of maxExpandableClicks.
  • A control qualifies only if it is a real link or has aria-haspopup, aria-expanded or aria-controls. Deep research must not press an unlabelled row button such as Delete on existing data, so this rule is deterministic, using ARIA attributes.
  • WebElement.revealsContent holds that ARIA check, replacing the copy in driller.ts.
  • No prompt text changed.

Testing

  • New real-browser tests in tests/integration/deep-analysis-data-items-browser.test.ts: opens only the first item, follows links, never presses an undeclared button, skips past an unsafe control, tolerates a missing container.
  • bun test tests/unit tests/integration: 1924 pass, 8 fail. The same 8 fail on a clean main locally (7 Provider, 1 ApibotConfigParser).
  • One real run against the store before merging latest main: research found the product dialog and Add to cart, and 4 of 7 planned tests add to the cart. The tests were generated, not executed.

Known limits

  • Checkout is still not planned as a flow. It only works with an item in the cart, and research does not add items.
  • Plain clickable items with no link or ARIA attributes are still not opened.

The regression workflow needs a human approval because this touches src/ai/.

🤖 Generated with Claude Code

Deep analysis never considered Data sections: they have no UI map table
and parseResearchSections filters them out. Anything reachable only from
a list item stayed invisible, so the Planner could not ground it. On a
store with Add to cart in the product dialog, no cart tests were planned.

Deep analysis now clicks the first item control of each Data section. It
takes only real links and controls with aria-haspopup, aria-expanded or
aria-controls, so an unlabelled row button such as Delete is never pressed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch is waiting to be deployed

1 waiting deployment
regression — b078a39e Waiting Nov 7, 2026 by DavertMik via regression #208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant