Repository navigation
Conversation
…k point withClickOverlay collapsed three unrelated causes into one message with no coordinates and no state, so a reported failure could not be diagnosed from the receipt (Tencent#556). The report shows how expensive that is: the investigator could not tell the extension overlay apart from the site's own mask and had to reason about it from a screenshot. Keep reason "input_not_ready" and the existing gates, but attribute the failure and attach the evidence: click_point, overlay_probe, overlay_bypass, overlay_passthrough, and a recovery hint per cause.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e192691391
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pointer_moved: false, | ||
| click_point: { x: point.x, y: point.y }, | ||
| overlay_probe: observed, | ||
| overlay_bypass: bypass ? "enabled" : deps.bypassOverlay ? "unavailable" : "unsupported", |
There was a problem hiding this comment.
Report bypass enablement only after confirmed delivery
When the content script is unavailable or overlay messaging times out, the production click/drag callback in dispatcher.ts:1520-1528 catches the sendTabMessageBounded failure and resolves normally. Consequently, withClickOverlay sets bypass = true, and this new field reports enabled even though the enable message failed. The unavailable value therefore cannot identify actual production transport failures, undermining the new diagnostic evidence. Propagate a delivery result from the callback, or report the bypass as attempted rather than confirmed enabled.
Useful? React with 👍 / 👎.
| if (retired || deps.signal?.aborted) return cancelled(); | ||
| if (pressDeadlineReached() || hit === "covered" || (covered && hit === "unknown")) | ||
| return notReady(); | ||
| if (pressDeadlineReached()) return notReady("passthrough_deadline", hit); |
There was a problem hiding this comment.
Distinguish insufficient lease headroom from lease expiry
For a drag that needs input passthrough with duration_ms: 5000 and no hold, drag.ts:431-432 supplies a 6000 ms input budget against the fixed 5000 ms lease. This gate therefore rejects immediately on a fresh lease, but the newly selected diagnostic says passthrough expired and recommends waiting or reducing the action deadline. The budget depends on hold_ms and duration_ms, not timeout_ms, so waiting or lowering the timeout cannot resolve this case. Report insufficient remaining lease and recommend shortening the gesture instead of attributing every reserve-budget rejection to an expired lease.
Useful? React with 👍 / 👎.
Address review findings on the diagnostic fields: - Resolving `bypassOverlay` does not prove delivery: the production callback swallows a failed or timed-out send. Report the request state (`requested` / `failed` / `not_requested` / `unsupported`) instead of claiming `enabled`. - `pressDeadlineReached()` also rejects a fresh lease when the gesture's budget exceeds the lease (drag with a hold), so "expired" was wrong and its recovery could not help. Split `passthrough_headroom` from `passthrough_expired` and recommend shortening the gesture.
|
Both findings were right — addressed in e02a620. Bypass is now a request, not a claim. Resolving Headroom is no longer reported as expiry. You are right that Tests: 5 in the new |
|
Thanks for picking up #556 and iterating on the earlier review feedback! Returning structured diagnostic evidence instead of one opaque message is definitely the right direction, though there are a few issues we should address before merging and closing #556:
|
Summary
Fixes #556.
withClickOverlayreported every overlay-clear failure as one message with no evidence attached:{"code":"cdp_failed","data":{"effect_state":"none","pointer_moved":false,"reason":"input_not_ready"}, "message":"Could not clear the extension overlay from the click point"}Several unrelated causes produce that error, and none of them need the same follow-up. As the report shows, the cost is real: with no coordinates, no probe result and no bypass state, the investigator could not tell the extension overlay apart from the site's own mask ("网络较慢,请耐心等待…") and had to reason about it from a screenshot.
Change
Keep
reason: "input_not_ready"and every existing gate exactly as they are — only attribute the failure and carry the evidence:click_point{ x, y }the hit test usedoverlay_probeabsent/clear/covered/unknownoverlay_bypassrequested/failed/not_requested/unsupportedoverlay_passthroughattempted/not_startedrecoveryoverlay_bypassreports the request, not a confirmed state: the production callback swallows a failed or timed-out send, soenabledwould have claimed more than the code can know.Causes and messages:
overlay_still_coveredThe BrowserSkill overlay still covers the click point (40, 60) after bypass and input passthroughoverlay_state_unknownCould not confirm the click point (40, 60) is clear: the overlay hit test did not answer after bypasspassthrough_headroomInput passthrough has too little lease left for this gesture at the click point (40, 60)passthrough_expiredInput passthrough expired before the click point (40, 60) could be verifiedpassthrough_headroomandpassthrough_expiredare split becausepressDeadlineReached()also rejects a fresh lease when the gesture's input budget exceeds the lease itself (drag with a hold). Waiting and lowering the action timeout cannot fix that, so it recommends shortening the gesture instead.The gate order (
pressDeadlineReached()→covered→covered && unknown) is unchanged; only the attribution is split, so dispatch behaviour is identical.Tests
apps/extension/src/tools/__tests__/click-overlay.test.tsis new — this module had no test coverage, which is why the collapsed attribution survived:overlay_probe: "covered", bypass requested, passthrough attempted, click never dispatchedoverlay_probe: "unknown", distinct messageoverlay_bypass: "failed", notrequestedbeforePressreturnsnullLocal verification: 5/5 new tests pass, full extension unit suite 4107 passed / 8 skipped (pre-existing),
tsc --noEmitclean,biome checkclean, bilingual changelog sync passes.Notes
No protocol change: the reason stays
input_not_ready, andRpcErrorDataalready allows extra keys. If you would rather model these as distinctRpcErrorReasonvariants so the CLI can render its own copy per cause, that needs absk-protocolchange — say the word and I will follow up with the schema regeneration.