fix(runtime): stabilize finder waits and untargeted scrolling#119
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
tap,type, targetedscroll, andwaitForto handle asynchronous UI updates.Risk Assessment
✅ Low: The Finder polling and primary-scrollable changes are internally consistent, covered across protocol, adapter, runner, and runtime tests, and the previously identified cross-axis nested-scroll issue is resolved without introducing another substantiated defect.
Testing
Focused runtime and runner suites passed, including transient Finder polling, frame-budget handling, and nested/cross-axis scrolling; a real macOS CLI Scenario successfully scrolled to and found an off-screen row, produced report/timeline/log evidence, then failed only at the final environment-dependent Flutter screenshot capture.
Evidence: Live macOS CLI transcript
Scenario: pilot_runtime_scroll (4 steps) 2/4 scroll scroll_target_list ok 124ms 3/4 waitFor wait_for_late_row ok 62ms 4/4 capture capture_logs failed: Flutter screenshot failed for Target Device "macos" with exit code 1.Evidence: Generated HTML timeline
Evidence: Structured live run report
Evidence: Captured runtime log
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
packages/pilot_runtime/lib/src/scroll_performer.dart:193- Drag-start selection excludes points covered by every nested Scrollable, regardless of axis. A vertical outer scrollable covered by a horizontal PageView (or similar nested scrollable) can therefore reject a valid vertical scroll asprimaryScrollableUnavailable/notScrollable, even though Flutter's gesture arena would route the vertical drag to the outer widget. Consider excluding only nested scrollables matching the drag's dominant axis, and add a cross-axis nested-scroll test.🔧 Fix: Allow cross-axis nested scroll drag starts
✅ Re-checked - no issues remain.
⏭️ **Test** - skipped
flutter devicescd packages/pilot_runtime && flutter test test/pilot_runtime_finder_test.dart --plain-name 'untargeted scroll allows a cross-axis nested scrollable'cd packages/pilot_runtime && flutter test test/pilot_runtime_finder_test.dart --plain-name 'untargeted scroll chooses an outer scrollable over a nested one'dart test test/execution/scenario_runner_test.dart --name 'waits for a unique Finder Match before tapping'dart test test/execution/scenario_runner_test.dart --name 'endOfFrame consumes the waitFor timeout budget'cd packages/pilot_runtime && flutter test test/pilot_runtime_finder_test.dart test/pilot_runtime_binding_test.dart test/pilot_runtime_client_test.dartdart test test/execution/scenario_runner_test.dart test/runtime/pilot_runtime_adapter_test.dartcd examples/smoke_app && /Users/drown/development/flutter/bin/dart run ../../bin/flutter_pilot.dart test pilot/pilot_runtime_scroll.yaml --target lib/pilot_runtime_scroll_demo.dart --device macosInspected the generatedrun_report.json, HTML timeline, and runtime log; removed generated.runsand nestedpubspec.lockartifacts from the worktree✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.