Restrict local browser selection by family#487
Open
simi2525 wants to merge 5 commits into
Open
Conversation
✅ Skill review passedReviewed 1 file(s) — no findings. |
Contributor
There was a problem hiding this comment.
2 issues found across 7 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
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
BH_BROWSER_FAMILYfiltering for local profile discovery, inspect-page launching, and dedicated browser executable selectionValidation
uv run --with pytest python -m pytest tests\unituv run browser-harness --doctor.envset toBH_BROWSER_FAMILY=chrome: restarted the daemon, ranbrowser-harness, confirmed the daemon tried the Google Chrome default profile first, then fell back to a dedicated Google Chrome profile when the default-profile websocket handshake was blocked. Process inspection showed the CDP endpoint on port9223belonged toC:\Program Files\Google\Chrome\Application\chrome.exe, not Brave.Browser Evidence
This change affects the local browser-control harness rather than an app UI. The relevant manual evidence is the daemon/process validation above; no reviewer-facing app screenshot or recording applies.
Summary by cubic
Adds browser family filtering and a smarter local startup that reuses your signed‑in Chrome profile when available, then falls back to a dedicated automation browser without getting stuck on permission prompts. Also fixes Windows inspect-page opening and avoids attaching to Brave/Edge in Chrome-only mode.
New Features
BH_BROWSER_FAMILYrestricts discovery, process/binary selection, and inspect-page opening, and validates CDP endpoints by browser product so dedicated/reused endpoints match the selected family.BH_LOCAL_BROWSER_MODE:auto(default) briefly tries the default profile via DevToolsActivePort, then falls back to a dedicated browser if blocked;defaultanddedicatedare also supported. AddedBH_DEDICATED_CHROME_PORTandBH_DEDICATED_CHROME_USER_DATA_DIR.BH_CDP_OPEN_TIMEOUT_SECONDS(longer default for local, shorter for explicit remote) andBH_DEFAULT_PROFILE_PROBE_TIMEOUT_SECONDSfor the quick default-profile WS probe.Bug Fixes
chrome://inspect/#remote-debuggingusing the real browser binary (not the shell handler) and add a per-daemon cooldown to avoid repeated prompts.Written for commit a5fcc01. Summary will update on new commits.