Skip to content

feat(interaction): add scroll-to-element primitive - #127

Merged
iuyo5678 merged 5 commits into
Tencent:mainfrom
NianJiuZst:codex/scroll-to-element-primitive
Sep 10, 2026
Merged

feat(interaction): add scroll-to-element primitive#127
iuyo5678 merged 5 commits into
Tencent:mainfrom
NianJiuZst:codex/scroll-to-element-primitive

Conversation

@NianJiuZst

Copy link
Copy Markdown
Contributor

Summary

  • add bsk scroll-to <ref-or-selector> backed by the new tool.scroll_to RPC
  • resolve snapshot refs and selectors inside the Agent Window, including OOPIF targets, and scroll both frame owners and the target with Chromium CDP
  • return the target's visible top-level viewport bounds and integrate dialogs, cancellation, hover release, and the interrupt gate

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --locked
  • pnpm lint
  • extension TypeScript compile, 58 test files / 688 tests, and production build
  • node --test scripts/*.test.mjs
  • real Chromium probe with the branch-built CLI and unpacked extension in an isolated daemon/profile:
    • before: scrollY=0, target top=2508, viewport 720
    • after bsk scroll-to '#target': scrollY=2178, target top=330, bottom=390, independently verified visible=true

@NianJiuZst
NianJiuZst marked this pull request as ready for review August 21, 2026 14:47
@iuyo5678

iuyo5678 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

To advance the merge, I will add the fixes from the review in this branch and resolve conflicts with the main branch. After verification, I will proceed with the merge. Thanks to the original implementation.

@iuyo5678
iuyo5678 merged commit ba6a14d into Tencent:main Sep 10, 2026
5 checks passed
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.

3 participants