Skip to content

fix(extension): explain which overlay step blocked a click - #578

Open
columbia11 wants to merge 7 commits into
Tencent:mainfrom
columbia11:fix/click-overlay-diagnostics
Open

columbia11 wants to merge 7 commits into
Tencent:mainfrom
columbia11:fix/click-overlay-diagnostics

Conversation

@columbia11

Copy link
Copy Markdown
Contributor

Refs #556

Problem

When the click overlay guard can't clear the extension overlay, input_not_ready returns only "Could not clear the extension overlay from the click point". There are no coordinates and nothing about which step failed. The dispatcher's bypassOverlay also swallows chrome.tabs.sendMessage failures, so an unreachable content script left no trace. In #556 the page also had its own mask, and the agent couldn't tell which layer was in the way.

Change

  • click-overlay.ts: input_not_ready now includes

    • data.point: the click point in CSS px;
    • data.overlay.hit: the last hit-test result (absent / clear / covered / unknown);
    • data.overlay.bypass: not_needed / enabled / undelivered / failed / unavailable;
    • data.overlay.passthrough: not_needed / sent / failed;
    • data.overlay.deadline_reached.

    The same facts go into the message for text output, e.g. … (10, 20): hit-test covered, bypass undelivered, passthrough failed.

  • dispatcher.ts: bypassOverlay still never throws, but now resolves true or false depending on whether the content script received the request. The five bypassOverlay type declarations widen from Promise<void> to Promise<boolean | void> (type-only).

Not included: the element hit at the point and the overlay part (data-slot). The hit-test runs in the page's main world and sees only the overlay host, not its shadow contents, so that would need a content-script query. I left it out to keep this small.

Tests

  • New click-overlay.test.ts: a covered point with an undelivered bypass and a failed passthrough, and a covered point with no bypass but a delivered passthrough. Both fail without the change.
  • Click, drag, wheel, dispatcher and interaction tests: 279 passed. Full extension vitest run: 3604 passed, 2 failed (the png 120k-scanline test and the human-loop child-process test, which time out under full parallel load and pass alone).
  • tsc --noEmit: exit 0. biome check on the changed files: clean.

I used Claude Code to write the change and tests and run the checks above.

🤖 Generated with Claude Code

columbia11 and others added 6 commits November 4, 2026 11:22
input_not_ready from the click overlay guard returned only "Could not clear
the extension overlay from the click point", and the dispatcher's
bypassOverlay swallowed undelivered requests, so agents could not tell where
the click was aimed or which layer/step failed.

The error message and data now include the click point, the last hit-test
result, and the outcome of the bypass (enabled, undelivered, failed or
unavailable) and passthrough (sent or failed) steps, plus whether the input
deadline was reached. bypassOverlay still never throws but now resolves
whether the content script received the request.

Refs Tencent#556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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