Fix shared browser session resets and add readiness checks - #8
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (11)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesThe PR adds live-stream frame recovery and five-second polling fallback. It preserves caller-configured agent-browser daemon timeouts. It adds browser diagnostics, syntax and repository validation, explicit test commands, integration-test enforcement, and readiness documentation. Browser readiness
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Renderer
participant ChromeWebSocket
participant ScreenshotPolling
Renderer->>ChromeWebSocket: install frame handler and open stream
ChromeWebSocket-->>Renderer: deliver image frame or remain quiet
Renderer->>ScreenshotPolling: fall back after five seconds without an image
Merge Risk: ⚪ Minimal · up to Validation intentionally permits unavailable optional browser prerequisites, while the separate integration command enforces them. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 8 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Opening the viewer against an existing agent-browser 0.33.2 session could restart its daemon and discard the browser: renderer reads and launcher navigation injected a different idle timeout. Commands now inherit the caller's configuration unchanged. Streams also register their frame handler before the handshake completes and fall back to screenshots if no image arrives within five seconds.
Adds
npm run build,npm run validate,npm run doctor, and mandatorynpm run test:integration. Test discovery stays within this checkout rather than traversing nested worktrees on Node 20. Real-browser tests use a local HTTP fixture and cover Chromium launch/cleanup, shared-session streaming, navigation, console delivery, and reconnect. The readiness assessment explains the existing Chromium options and prioritizes follow-up work.Validation:
npm run validate: build, ShellCheck, manifest checks, and 306 passing tests on Node 24; one intentionally skipped Node-without-WebSocket case.npm run doctorandgit diff --checkpass.Daemon idle timeouts now follow engine/caller defaults instead of an implicit 30-minute override. Doctor checks prerequisites, not endpoint reachability or installed engine health. Remaining limitations, including HTTPS discovery and later stream stalls, are documented in
docs/readiness.md.Summary by CodeRabbit
New Features
Bug Fixes
Documentation