Skip to content

fix(mission-control): find Chrome or Chromium on Linux for the code map - #135

Open
luhpaco wants to merge 2 commits into
hamzafer:mainfrom
luhpaco:fix/mission-control-linux-chrome
Open

luhpaco wants to merge 2 commits into
hamzafer:mainfrom
luhpaco:fix/mission-control-linux-chrome

Conversation

@luhpaco

@luhpaco luhpaco commented Oct 23, 2026 •

Copy link
Copy Markdown

What changed

The code map (/mission code) looked for Chrome only at the macOS app path, so on Linux it always showed "needs Google Chrome". It now uses the first browser that exists in a fixed list.

 renderMap
-  if !exists(CHROME_MACOS) → error
+  chrome = first existing of
+    /Applications/Google Chrome.app/…   (macOS, unchanged first)
+    /usr/bin/google-chrome-stable
+    /usr/bin/google-chrome
+    /usr/bin/chromium-browser
+    /usr/bin/chromium
+  if !chrome → error listing those paths
   sh -c <unchanged headless script> chrome …

If the browser exists but the render fails (for example a Snap launcher), the pane said "Drawing the code map…" forever. It now says which browser failed:

   r = sh -c <headless script> chrome …
-  if r.exitCode == 0 → show frame
+  if r.exitCode == 0 → show frame, return
+  error = "<chrome> could not draw the code map."

docs/mods.md now says the Code view runs on macOS and Linux.

Evidence

  • Before: on Fedora 44 with chromium-browser installed, the pane shows "The code map needs Google Chrome at /Applications/Google Chrome.app/…". The new test fails:
    given only /usr/bin/chromium-browser exists → expect sh run with that path ✗
    given chromium-browser exists but the render exits 1 → expect "could not draw" text ✗
  • After: both new tests pass (claude plugin test mods/mission-control: 10 pass, 0 fail). The mod's own headless script, run by hand with /usr/bin/chromium-browser, wrote a 400×200 PNG and exited 0 with no Chrome left running.

Merge Danger

Door: two-way

Blast Radius: mission-control

macOS keeps the same path, checked first, so nothing changes there. The paths are a hard-coded list passed as an argv element ("$1"), not taken from env or user input. A Flatpak or Snap Chrome isn't picked up: its sandbox can't read the SVG in $TMPDIR.

Checklist

  • claude plugin validate mods/mission-control passes
  • claude plugin test mods/mission-control passes
  • Changed a mod: version bumped in its plugin.json and in .claude-plugin/marketplace.json (0.1.3 → 0.1.4)
  • New mod: entry in .claude-plugin/marketplace.json (n/a)
  • New mod: README table row and docs/mods.md notes (n/a)

The code map only looked for Chrome at the macOS app path, so on Linux
it always showed 'needs Google Chrome'. Probe a fixed list of macOS and
Linux browser paths and use the first that exists.
…code map

A browser path that exists but fails to render (for example a Snap
launcher) left the pane on 'Drawing the code map...' forever. Show which
browser failed instead.

This branch has not been deployed

No deployments
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