← Back to PRs

#23363: Browser: fallback to managed profile and improve runtime diagnostics

by isdoho open 2026-02-22 07:46 View on GitHub →
cli size: M
## Summary - Automatically fall back to the self-managed `openclaw` profile when relay mode is selected implicitly but no relay tab is attached. - Add executable-path health checks for browser runtime and return clearer remediation for missing Playwright Chromium. - Expand browser status/CLI diagnostics and error mapping so relay-tab-missing and Chromium-missing failures are clearly distinguished. ## Testing - `corepack pnpm vitest src/browser/routes/agent.shared.test.ts src/browser/chrome.test.ts src/browser/client.test.ts` - `corepack pnpm tsgo` <!-- greptile_comment --> <h3>Greptile Summary</h3> Implemented automatic fallback from relay mode to self-managed `openclaw` profile when no relay tab is attached, along with comprehensive runtime diagnostics for Playwright Chromium and relay tab status. Key changes: - Added `inspectBrowserExecutableConfig()` to detect missing Playwright Chromium and provide remediation command - Implemented `withRouteTabContext()` fallback logic that automatically retries with `openclaw` profile when relay tab is missing (only for implicit profile requests) - Enhanced error messages to clearly distinguish relay-tab-missing (409) vs Chromium-missing (503) scenarios - Expanded browser status endpoint with `activeProfile`, `executablePathExists`, `missingPlaywrightChromium`, `relayAttachedTabCount`, and `fixSteps` fields - Updated CLI diagnostics to display `activeProfile`, executable path health, relay tab count, and actionable fix steps - Added comprehensive test coverage for fallback routing and executable path inspection <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - Well-structured implementation with comprehensive test coverage, clear error handling, and proper fallback logic that respects explicit user choices while providing intelligent defaults - No files require special attention <sub>Last reviewed commit: 42b249f</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs