Repository navigation
Report browser placement support from the installed provider - #26559
Conversation
3ee02fb to
83c1334
Compare
📝 WalkthroughWalkthroughThe runtime now reports browser client hosting when its browser-command factory supports it. The Electron startup path registers a factory with client hosting enabled. Runtime tests cover capability reporting for supported, server-only, unhealthy, and unavailable providers. A gated SSH/Orcad E2E test checks browser capability and command responses, including after reconnect. CI routes relevant source changes to the dedicated test and runs it in the Docker Orcad lane. Priority: ➖ Normal Merge Risk: 🔵 Low · up to The change is mergeable with a bounded test-routing gap: future preflight-only changes will not automatically run the dedicated browser-capabilities test. Add preflight to that route. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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.
🧹 Nitpick comments (1)
config/scripts/pr-e2e-source-routing.mjs (1)
49-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRoute preflight registration changes to the browser-capabilities E2E spec.
When a PR changes only
src/main/startup/main-process-preflight.ts, the current routing selects the Windows AppData spec but notssh-orcad-browser-capabilities.spec.ts. The Windows spec checks startup paths and CLI readiness. It does not assert browser capabilities. Add the preflight file to the browser-capabilities route.Suggested fix
- /^src\/main\/(?:runtime\/(?:runtime-browser-commands-factory|orca-runtime-get-status)|host\/electron-browser-commands|orcad\/orcad-browser-)/.test( + /^src\/main\/(?:startup\/main-process-preflight|runtime\/(?:runtime-browser-commands-factory|orca-runtime-get-status)|host\/electron-browser-commands|orcad\/orcad-browser-)/.test(
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
002bd012-e5c7-4999-b472-1a86448f219b
📒 Files selected for processing (13)
.github/workflows/e2e.ymlconfig/scripts/ci-e2e-job-selection.mjsconfig/scripts/ci-e2e-job-selection.test.mjsconfig/scripts/pr-e2e-docker-lane-contract.test.mjsconfig/scripts/pr-e2e-gate-contract.test.mjsconfig/scripts/pr-e2e-source-routing.mjssrc/main/host/electron-browser-commands.tssrc/main/runtime/orca-runtime-get-status.tssrc/main/runtime/orca-runtime-test-lifecycle.spec.tssrc/main/runtime/orca-runtime-tests/browser-capabilities.spec.tssrc/main/runtime/runtime-browser-commands-factory.tssrc/main/startup/main-process-preflight.tstests/e2e/ssh-orcad-browser-capabilities.spec.ts
💤 Files with no reviewable changes (1)
- config/scripts/pr-e2e-gate-contract.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
ELI5
A managed SSH host says it can put a browser page on your desktop, then refuses the request. It now advertises that feature only when its browser provider implements it.
What Changed
Browser factories explicitly opt into client page creation. The desktop provider opts in; managed external Chromium and Electron-sidecar providers do not. Runtime status uses that declaration and its live health check instead of publishing client hosting unconditionally. Hosts without any page-creation backend also stop advertising support for caller-supplied page IDs. Network tunneling and the existing refusal responses remain available.
Why
Clients use these capabilities together to choose and stage a client-hosted page. A frontend-only change reproduced
browser_unavailableon the real host, so changing tab selection would still fail. Reporting the installed provider’s abilities fixes the false promise without introducing another browser lifecycle. This does not restore a relay browser tab or its login across conversion; that failure remains under investigation.Linked Issue
Found while validating the SSH consolidation in #26483. Independent fix against
OrcaWin/phase35.Visual Proof
N/A — this changes the runtime capability response, with no layout or styling change. Real before/after SSH responses and test logs:
browser-capability-evidence.log
browser-capability-real-red.log
browser-capability-real-green.log
Testing
The real SSH capability test is registered in the managed-server CI lane that builds its template, excluded from general sharding, and selected by browser-provider/status source changes. 53 job-selection and lane-contract checks pass.
pnpm tc, affected-file oxlint, changed-code quality, Node server build and fresh Electron E2E build pass. The fixture uses rebuilt common artifacts with unchanged installed native binaries; all nine template targets verify. Two corrected real SSH runs pass, including the added desktop assertion. Linux/macOS exercised; Windows covered by CI.Review
Capability strings, RPC methods, and message shapes are unchanged. Older clients already require the complete existing capability set before selecting client hosting. No execution-host, workspace ownership, or terminal lifecycle changes.
Agent skill upstream boundary
Notes
Browser restoration/login across relay conversion remains unresolved. This PR corrects feature discovery and preserves explicit backend-unavailable responses.
Checklist