Skip to content

Restore Chromium profile detection paths in daemon#160

Open
VF-AdminOver wants to merge 2 commits intobrowser-use:mainfrom
VF-AdminOver:fix/restore-chromium-brave-detection
Open

Restore Chromium profile detection paths in daemon#160
VF-AdminOver wants to merge 2 commits intobrowser-use:mainfrom
VF-AdminOver:fix/restore-chromium-brave-detection

Conversation

@VF-AdminOver
Copy link
Copy Markdown

@VF-AdminOver VF-AdminOver commented Apr 22, 2026

Summary

  • Restore Chromium autodiscovery paths in daemon.py after regression in profile path list handling.
  • Keep Brave and Edge support unchanged.

Details

  • Added missing Chromium paths back to PROFILES:
    • ~/.config/chromium
    • ~/.config/chromium-browser
    • ~/AppData/Local/Chromium/User Data
  • Kept existing Brave and Edge profile paths.
  • Added defensive hardening in daemon lifecycle and request handling.

Validation

  • python3 -m py_compile daemon.py
  • Static checks confirm Chromium + Brave path strings are present.
  • Live browser attach test was attempted but this host has no active DevTools session to attach to.

This addresses the automation review regression where Chromium browser autodiscovery could fail while docs still claim Chromium support.


Summary by cubic

Restored and expanded profile autodiscovery for Chromium-based browsers to fix local attach across Chrome, Chromium, Brave, and Edge. Also improved CDP attach robustness, event handling, shutdown, and error messages.

  • Bug Fixes

    • Restored Chromium paths and added Brave + Flatpak directories on macOS/Linux; added Windows Chromium path.
    • More resilient DevToolsActivePort polling and errors; handle malformed files; clearer cross‑browser prompts.
    • Correct Target.* behavior (no session) and auto‑reattach on stale sessions.
    • Clean shutdown of sockets/files (await wait_closed; remove PID and SOCK).
  • Refactors

    • Hardened lifecycle: stop_event, explicit CDP stop, and restore original event handler.
    • Safer request/session validation and type checks; improved remote stop error handling.

Written for commit 8e98c02. Summary will update on new commits.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32b9b4cb96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread daemon.py

original_handler = self.cdp._event_registry.handle_event
self._original_handler = original_handler
mark_js = "if(!document.title.startsWith('\\U0001F7E2'))document.title='\\U0001F7E2 '+document.title"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use real 🟢 marker in injected title script

This string now double-escapes the Unicode codepoint, so the browser receives \U0001F7E2 literally and prefixes U0001F7E2 instead of the intended 🟢 indicator. In practice this regresses tab-marking behavior: helpers.py still marks/unmarks using the real emoji, so after navigations or session changes the daemon’s prefix and helper cleanup no longer match, leaving stale/incorrect tab titles.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="daemon.py">

<violation number="1" location="daemon.py:192">
P2: Double-escaped Unicode marker breaks title emoji tagging logic; JS receives literal `\U0001F7E2` text instead of 🟢.</violation>

<violation number="2" location="daemon.py:256">
P2: Same double-escaped Unicode issue here: `'\\U0001F7E2'` sends the literal text `\U0001F7E2` to the browser instead of the 🟢 emoji. Use the single-backslash form so Python resolves it to the real character.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread daemon.py
Comment thread daemon.py
@VF-AdminOver VF-AdminOver force-pushed the fix/restore-chromium-brave-detection branch from 32b9b4c to 8e98c02 Compare April 22, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant