fix: stabilize browser launcher requests - #2
Conversation
|
Warning Review limit reached
Next review available in: 30 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR adds cross-platform browser launching with typed failure reporting. ChangesBrowser launch outcomes
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Target.open
participant requestBrowser
participant PlatformLauncher
Target.open->>requestBrowser: requestBrowser(url)
requestBrowser->>PlatformLauncher: spawn detached browser command
PlatformLauncher-->>requestBrowser: report handoff or failure
requestBrowser-->>Target.open: resolve or throw BrowserLaunchError
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/quiet-browsers-request.md:
- Around line 2-5: Update the changeset for the package entry “daegari” to use
the applicable breaking version bump instead of “patch,” reflecting the removed
status result contract and newly separated host and browser fields.
In `@packages/daegari/src/core/internal/browser-launcher.ts`:
- Around line 25-28: Update launcher() for win32 to avoid cmd.exe parsing of
URLs by using a shell-free Windows protocol handler or equivalent direct launch
mechanism. Preserve URL query text, including metacharacters such as ? and &, as
browser input, and add Windows coverage for absolute same-origin paths
containing query parameters.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e21bbdd1-c85c-4811-ba55-206cfe8ceb06
📒 Files selected for processing (14)
.changeset/quiet-browsers-request.mdREADME.mdROADMAP.mddocs/v0.2-architecture.mdpackages/daegari/src/app/create.test.tspackages/daegari/src/app/exports.test-d.tspackages/daegari/src/app/target.tspackages/daegari/src/core/internal/browser-launcher.test.tspackages/daegari/src/core/internal/browser-launcher.tspackages/daegari/src/core/internal/runtime.tsplaygrounds/greeting/scripts/lifecycle.mjsplaygrounds/greeting/scripts/smoke.mjsplaygrounds/mdv-poc/scripts/smoke.mjsplaygrounds/molt-poc/scripts/smoke.mjs
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Target open() to return explicit Host and browser-request outcomes and adds a cross-platform browser launcher with typed failures.
Changes:
- Replace
statuswithhostand addbrowseroutcome toApp.Target.open()return type - Add
requestBrowser()implementation + Vitest coverage and wire it into runtimeopen() - Update playground smoke scripts and docs to match the new contract and error behavior
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| playgrounds/molt-poc/scripts/smoke.mjs | Updates assertions to new open() JSON shape (host, browser) |
| playgrounds/mdv-poc/scripts/smoke.mjs | Updates assertions to new open() JSON shape (host, browser) |
| playgrounds/greeting/scripts/smoke.mjs | Updates assertions to new open() JSON shape (host, browser) |
| playgrounds/greeting/scripts/lifecycle.mjs | Updates assertions and concurrency check to use host outcome |
| packages/daegari/src/core/internal/runtime.ts | Uses requestBrowser() and returns { browser, host, url } from open() |
| packages/daegari/src/core/internal/browser-launcher.ts | New cross-platform browser launcher with typed errors and bounded handoff |
| packages/daegari/src/core/internal/browser-launcher.test.ts | Tests launcher command dispatch, failure mapping, and handoff timeout behavior |
| packages/daegari/src/app/target.ts | Documents/introduces BrowserLaunchError and updates open.ReturnType |
| packages/daegari/src/app/exports.test-d.ts | Updates public type contract assertions for open() |
| packages/daegari/src/app/create.test.ts | Adds test coverage for BrowserLaunchError code |
| docs/v0.2-architecture.md | Updates architecture doc to new open() results + error semantics |
| ROADMAP.md | Marks browser-launch stabilization as complete |
| README.md | Updates consumer docs for new open() result fields + error behavior |
| .changeset/quiet-browsers-request.md | Declares release note for the change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
35b4fa6 to
3839ba0
Compare
Summary
Contract
Verification
Summary by CodeRabbit
New Features
BrowserLaunchErrorreporting for launcher or handoff failures.Bug Fixes
Documentation