feat: contract completeness — key + scroll verbs#10
Conversation
- Add `pressKey(key)` + `scroll(opts)` verbs to the `Adapter` interface, plus `ScrollDirection`/`ScrollOptions` types; documented like neighbors. - Keep implementors compiling: fail-loud stubs in BrowserAdapter (real CDP wiring lands next) + no-op stubs in act/observe/look test fakes. Co-Authored-By: Claude <noreply@anthropic.com>
- pressKey: route to Playwright keyboard.press (CDP Input.dispatchKeyEvent); chords parse from the `+`-joined string, unknown/blank keys fail loud. - scroll: map direction+amount to wheel deltas (scrollDelta helper), dispatch via mouse.wheel; `within` parks the cursor over the region first so the wheel targets that scrollable element, not the viewport. - Tests: unit-cover scrollDelta; integration-cover pressKey/scroll (chord, unknown/blank key, viewport vs region scope) on real Chromium. Co-Authored-By: Claude <noreply@anthropic.com>
- key → adapter.pressKey(key); scroll → adapter.scroll({direction, amount, within})
- map act `target` → scroll `within` scope; derive step labels (key/scroll [Npx])
- make required() generic so direction enum survives the per-action guard
- tests: replace "not supported" stubs with routing + required-guard coverage
Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
pressKey+scrollto adapter contract (src/adapters/contract.ts)BrowserAdaptervia CDP/Playwright (chord parsing, wheel delta, region scroll)actkey/scrollbranches — route to adapter, derive labels, fail-loud guardsAgentError) + real-Chrome integration (plain key, chord, unknown/blank key throws, viewport vs region scroll)Tests
308 pass, 0 fail