Skip to content

fix(scroll): add amount param (small/medium/large → 150/400/800px) - #672

Merged
sonichi merged 1 commit into
mainfrom
fix/scroll-amount-param
May 14, 2026
Merged

sonichi merged 1 commit into
mainfrom
fix/scroll-amount-param

Conversation

@sonichi

@sonichi sonichi commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

Why

600px has been hardcoded since PR #88, when scroll was a phone-demo nudge. Today's owner call exposed the gap — caller asked to "scroll a little" past a window occluding the draft area, default 600 overshot in both directions across ~6 round-trips.

Scope

Only the Chrome JS-scroll branches (lines 64 + 77) consume the new px. The AppleScript keyboard fallback at line ~85 still uses Page Down — that's viewport-page, a separate axis of imprecision; left for follow-up if needed.

The task-expand all-or-nothing half of #671 is NOT in this PR — it needs a web-client change (per-task expand handler) too.

Test plan

  • npx tsc --noEmit clean
  • manual: voice "scroll down a little" → ~150px; "scroll down" → ~400px; "scroll down a lot" → ~800px
  • manual: existing "scroll to top/bottom" still works

🤖 Generated with Claude Code

Closes part of #671. The 600px step has been hardcoded since PR #88 when
scroll was a phone-demo nudge. Today's call exposed the gap when caller
asked to "scroll a little" past a window occluding the draft area —
default 600 overshot in both directions.

amount='small' (150px), 'medium' (400px, default), 'large' (800px).
Tool description teaches the agent to pick small for "a little" / "a
bit" phrasings.

Task-expand all-or-nothing (the other half of #671) is left for a
separate PR — needs a web-client change too.
@sonichi
sonichi merged commit 549a16f into main May 14, 2026
1 check passed
@sonichi
sonichi deleted the fix/scroll-amount-param branch May 14, 2026 00:05
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…onichi#672)

Closes part of sonichi#671. The 600px step has been hardcoded since PR sonichi#88 when
scroll was a phone-demo nudge. Today's call exposed the gap when caller
asked to "scroll a little" past a window occluding the draft area —
default 600 overshot in both directions.

amount='small' (150px), 'medium' (400px, default), 'large' (800px).
Tool description teaches the agent to pick small for "a little" / "a
bit" phrasings.

Task-expand all-or-nothing (the other half of sonichi#671) is left for a
separate PR — needs a web-client change too.
sonichi added a commit that referenced this pull request Jun 2, 2026
…1396)

The slide_control description claimed it "sends arrow keys to the frontmost
browser window" — but the implementation has been DOM manipulation via Chrome
execute javascript since #672's check-in (mutates `.slide.active` directly).

The misleading description steered Sutando AWAY from slide_control when the
deck's textarea was focused (live-edit demo on s5): assuming the keystroke
trap would catch arrow keys here too, the agent fell back to
press_key('leftarrow') — which IS arrow-key-based and got captured by the
focused textarea (cursor moves left within the field, deck doesn't move).
Hit during Observe-talk rehearsal 2026-06-01 23:32Z; transcript shows three
failed press_key attempts to navigate back to s5 before user gave up.

Update the description to:
- Accurately describe the DOM-manipulation backend
- Highlight focus-independence (works regardless of which element is focused)
- Explicitly recommend over press_key('leftarrow'/'rightarrow'/'space') for
  slide nav, with the failure mode named

Implementation unchanged. Description-only fix.
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