Skip to content

feat: contract completeness — key + scroll verbs#10

Merged
sebyx07 merged 3 commits into
mainfrom
feat/contract-key-scroll
Jun 29, 2026
Merged

feat: contract completeness — key + scroll verbs#10
sebyx07 merged 3 commits into
mainfrom
feat/contract-key-scroll

Conversation

@sebyx07

@sebyx07 sebyx07 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add pressKey + scroll to adapter contract (src/adapters/contract.ts)
  • Implement both in BrowserAdapter via CDP/Playwright (chord parsing, wheel delta, region scroll)
  • Unstub act key/scroll branches — route to adapter, derive labels, fail-loud guards
  • Tests: fake-adapter unit cases (label, missing-operand AgentError) + real-Chrome integration (plain key, chord, unknown/blank key throws, viewport vs region scroll)

Tests

308 pass, 0 fail

sebyx07 and others added 3 commits June 29, 2026 16:26
- 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>
@sebyx07 sebyx07 added the claudetm Claude Task Master label Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30033f1c-58e1-48fb-816c-0a9b874bc698

📥 Commits

Reviewing files that changed from the base of the PR and between 09ddbc5 and 26d8481.

📒 Files selected for processing (8)
  • src/adapters/browser/browser-adapter.integration.test.ts
  • src/adapters/browser/browser-adapter.test.ts
  • src/adapters/browser/browser-adapter.ts
  • src/adapters/contract.ts
  • src/agent/belt/act.test.ts
  • src/agent/belt/act.ts
  • src/agent/belt/look.test.ts
  • src/agent/belt/observe.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/contract-key-scroll

Comment @coderabbitai help to get the list of available commands.

@sebyx07 sebyx07 merged commit f4dd660 into main Jun 29, 2026
2 checks passed
@sebyx07 sebyx07 deleted the feat/contract-key-scroll branch June 29, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudetm Claude Task Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant