Skip to content

Feature Request: Microsoft Edge browser support #55

@yaoshengv

Description

@yaoshengv

Summary

AutoCLI's browser-mode commands (bilibili, twitter, zhihu, etc.) refuse to work on Microsoft Edge because the browser detection in crates/autocli-browser/src/bridge.rs only checks for Chrome/Chromium processes. Edge is Chromium-based and supports CDP + Manifest V3 extensions — it should work with a trivial change.

Current behavior

$ autocli doctor
  ✗ Chrome/Chromium       ← fails on Edge
  ✓ Daemon running
  ✓ Chrome extension connected   ← extension loaded in Edge works fine!

$ autocli bilibili hot --limit 5
🌐 [browser] Chrome is not running

The extension loaded in Edge connects to the daemon (verified via autocli doctor), but is_chrome_running() at bridge.rs:182 blocks execution before reaching the daemon handshake.

Root cause

fn is_chrome_running() — three platform branches that only check for Chrome:

Platform Current check Missing
Windows tasklist /FI "IMAGENAME eq chrome.exe" msedge.exe
macOS pgrep -x "Google Chrome" Microsoft Edge
Linux pgrep -x "chrome|chromium" msedge

Proposed fix

Add Edge process name as a fallback in is_chrome_running(), e.g.:

fn is_chrome_running() -> bool {
    if cfg!(target_os = "windows") {
        ["chrome.exe", "msedge.exe"].iter().any(|name| {
            std::process::Command::new("tasklist")
                .args(["/FI", &format!("IMAGENAME eq {name}"), "/NH"])
                .output()
                .map(|o| String::from_utf8_lossy(&o.stdout).contains(name))
                .unwrap_or(false)
        })
    } else if cfg!(target_os = "macos") {
        ["Google Chrome", "Microsoft Edge"].iter().any(|name| { ... })
    } else {
        // Linux: pgrep -x "chrome|chromium|msedge"
    }
}

wake_chrome() would also need the same treatment to open Edge when Chrome isn't the default.

Impact

  • Zero breaking changes — Chrome path unchanged
  • ~10 lines changed
  • Unlocks all 55+ sites for Edge users without requiring Chrome installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions