Fix scroll viewport and reload --wait-idle in daemon mode#51
Merged
Conversation
scroll: Remove Promise+requestAnimationFrame wrappers that caused evaluateJSAsync to return the Promise grip instead of resolved viewport data. Read viewport position synchronously after scroll calls. reload: Add daemon-aware branching using start_daemon_stream / stop_daemon_stream_draining (same pattern as navigate --with-network). The daemon intercepts watcher events, so the direct watch_resources approach never delivered events to the reload client. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📝 Walkthrough🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- launch.rs: Result::map().unwrap_or() → map_or() - server.rs: Duration::from_millis(30_000) → Duration::from_secs(30) - e2e/network.rs: Result::map_or(false, ...) → is_ok_and() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
top,bottom,by,to,container). Firefox'sevaluateJSAsyncreturns immediately without waiting for Promise resolution, so the commands returned a Promise actor grip ({"class": "Promise"}) instead of actual viewport position data. Now reads viewport position synchronously after scroll calls.recv()loop. Now usesstart_daemon_stream/stop_daemon_stream_draining(same pattern asnavigate --with-network) so events are forwarded directly.Test plan
cargo fmt— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace -q— 710 tests passscroll bottom→viewport.y: 2940(was Promise grip)scroll top→viewport.y: 0(correct)scroll by --dy 500→viewport.y: 500(correct)reload --wait-idle→requests_observed: 538, idle_at_ms: 1129(was 0 requests / 10s timeout)🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation
Tests
Chores