Skip to content

Report why a clicked control is disabled; hide screencast captions from AI screenshots - #252

Open
DavertMik wants to merge 2 commits into
mainfrom
disabled-control-reason
Open

DavertMik wants to merge 2 commits into
mainfrom
disabled-control-reason

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Problem

In session AssociatedWillowyChocolate907 the tester found that the plan's Launch button was disabled, but blamed the wrong cause. The click-failure hint listed guessed preconditions ("a required field is empty, nothing is selected…"). The model picked the nearby "Set milestone" control, spent about 90s on it, and stopped with a wrong diagnosis. The real reason ("Continuous Integration is required…") appears only as a tooltip on hover, and the tester never hovered.

In the same session, see() reported "a dark instructional overlay reading 'Open first milestone combobox'". That was Explorbot's own screencast chapter caption, and the tester then tried to click it.

Changes

  • Click tool: when every click attempt fails with element is not enabled, the tool hovers that same element once (I.moveCursorTo with the same locator and container). Text that appears as a result is returned as disabledReason. It tries each disabled locator in turn and stops at the first hover that works.
  • Disabled hint (clickFailureSuggestion) and rules.ts: point the model to disabledReason instead of a list of guessed causes. The model looks for an unmet precondition only when disabledReason is empty.
  • Pilot: its tool summary includes shown on hover of disabled target: ….
  • Action: screenshots taken for AI use call page.screencast.hideOverlays() / showOverlays() around page.screenshot().

Limits

  • A native title tooltip is drawn by the browser, not added to the page, so hovering can't capture it.
  • A tooltip that shows after a delay can still be missed.

Testing

  • New tests/unit/click-disabled.test.ts: a tooltip that appears on hover is reported, and an empty result is returned when nothing appears.
  • bun test tests/unit (1626 pass) and bun test tests/integration pass. Format and lint are clean.
  • Not yet tried against a live app. Rerunning the launch-from-overlay scenario would confirm the fix.

🤖 Generated with Claude Code

DavertMik and others added 2 commits September 26, 2026 00:26
…om AI screenshots

When a click fails because the element is disabled, the click tool hovers
it once and returns the text the app showed as disabledReason. Pilot's
tool summary includes it, and the disabled-click hint no longer lists
guessed preconditions that sent the tester after the wrong cause.

Screenshots taken for see()/visualClick hide Playwright screencast
overlays, so the vision model no longer reads Explorbot's own chapter
captions as page content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the click-tool conflict with main's judge change (failedToolResult
no longer takes judge/intent). disabledReason and its suggestion are now
set only when hovering showed text; otherwise the plain disabled hint
applies. The rule no longer names a field that may be absent.

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

This branch has not been deployed

No deployments
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