Skip to content

fix: bound scroll geometry replies by cancellation and deadline - #518

Open
u7-u7 wants to merge 1 commit into
Tencent:mainfrom
u7-u7:fix/scroll-geometry-reply-deadlines-20261029
Open

u7-u7 wants to merge 1 commit into
Tencent:mainfrom
u7-u7:fix/scroll-geometry-reply-deadlines-20261029

Conversation

@u7-u7

@u7-u7 u7-u7 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Problem

scroll-to and targeted wheel check cancellation/deadline before/after target/geometry awaits. If a CDP reply such as DOM.resolveNode never arrives, the second check is unreachable: the tool remains pending after timeout_ms or signal abort. Awaiting object-group cleanup can also hold a completed result.

Change

  • Reuse the existing input-readiness reply race for target lookup, frame graph and geometry commands.
  • Guard queued CDP dispatch against cancellation/deadline where supported.
  • Dispatch object-group cleanup without awaiting acknowledgment; release again if a late node resolution allocates a handle after cleanup. Consume late replies without continuing the operation.
  • Handler-level regressions for timeout, abort, late replies, unresponsive cleanup and queued dispatch in both tools.

Scope: target/geometry and object cleanup only. Does not cancel commands already delivered to Chrome, change wheel input-ack/overlay lifecycle, or claim every external phase is bounded. Cleanup remains best-effort if transport never responds.

Validation

Base6c9d523755b5607b4038b619e35b4e1f814d7838 with new tests:8 failed/88 passed. Fixed:

  • Focused scroll/wheel vitest:96 passed.
  • Complete extension vitest:3318 passed/278 skipped (190 files passed/37 skipped).
  • Extension tsc --noEmit:passed.
  • Biome on all5 changed files and git diff --check:passed.

Real handlers with controlled CDP promises in repository happy-dom tests. Not run:live Chrome/browser evaluation,Rust workspace tests,full monorepo lint. Skipped tests are not counted as passes. Dependency install populated tools but wrapper reported unapproved @parcel/watcher build script; script not approved, installed test/typecheck binaries invoked directly.

All-state PR dedupe checked:input-readiness/wheel-burst changes #261/#480 do not cover pending geometry replies; process-group #511 unrelated.

AI-assisted implementation and automated tests/review. Draft for maintainers; no human-review claim.

@u7-u7
u7-u7 marked this pull request as ready for review November 3, 2026 13:37

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