Repository navigation
fix(extension): explain which overlay step blocked a click - #578
Open
columbia11 wants to merge 7 commits into
Open
columbia11 wants to merge 7 commits into
columbia11 wants to merge 7 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #556
Problem
When the click overlay guard can't clear the extension overlay,
input_not_readyreturns only "Could not clear the extension overlay from the click point". There are no coordinates and nothing about which step failed. The dispatcher'sbypassOverlayalso swallowschrome.tabs.sendMessagefailures, 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_readynow includesdata.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:bypassOverlaystill never throws, but now resolvestrueorfalsedepending on whether the content script received the request. The fivebypassOverlaytype declarations widen fromPromise<void>toPromise<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
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.vitest run: 3604 passed, 2 failed (thepng120k-scanline test and thehuman-loopchild-process test, which time out under full parallel load and pass alone).tsc --noEmit: exit 0.biome checkon the changed files: clean.I used Claude Code to write the change and tests and run the checks above.
🤖 Generated with Claude Code