Skip to content

darwin: replace Chromium with Helium for Chrome-only tooling - #33

Merged
kriswill merged 2 commits into
mainfrom
helium-chrome-shim
Jul 10, 2026
Merged

darwin: replace Chromium with Helium for Chrome-only tooling#33
kriswill merged 2 commits into
mainfrom
helium-chrome-shim

Conversation

@kriswill

Copy link
Copy Markdown
Owner

Summary

Chromium is out; Helium is the browser. Two commits:

  1. Drop the chromium Homebrew caskonActivation.cleanup = "zap" uninstalls Chromium (app + data) on the next rebuild.
  2. modules/darwin/helium-chrome-shim.nix — new universal darwin module that keeps Chrome-only tooling working: Puppeteer (chrome-devtools-mcp, Playwright channel: "chrome") resolves channel stable on macOS by probing the literal /Applications/Google Chrome.app/Contents/MacOS/Google Chrome path with an existence-only accessSync, honors no env var, and the Claude Code plugin's MCP args aren't user-overridable. The module plants a 2-line exec wrapper at that exact path each rebuild (postActivation, order 1700), forwarding to Helium's real binary.

exec preserves the PID, so Puppeteer's launch and close semantics are unchanged.

Guards

  • No-op (and self-cleaning) when Helium.app is absent
  • Refuses to touch a real Google Chrome (Mach-O magic vs #! script check)
  • MCP-launched sessions use their own profile (~/.cache/chrome-devtools-mcp/), never the user's

Verification

Empirically tested through the real MCP server (stdio handshake + tool calls), all via the default Chrome-discovery path the unmodified plugin uses:

Case Result
headful + persistent profile, SIGTERM ✅ Helium exits, no orphans
headful + isolated, stdin EOF ✅ spawned PID reaped
headless + isolated HeadlessChrome/150 UA
--browserUrl attach, server stop ✅ disconnects, browser survives

Live plugin tools drove Helium without a session restart. Host k system builds; statix/deadnix clean; okf validate exits 0.

Docs

  • docs/helium.md: dated learned-behaviour entry with the full matrix
  • knowledge/: module doc, decision record (why a filesystem shim beats patching the plugin's plugin.json or replacing the MCP server), upgraded homebrew.md stub, log entry

kriswill added 2 commits July 10, 2026 09:48
zap cleanup uninstalls Chromium (app + data) on the next rebuild. Chrome-only
tooling that probed for a Chromium/Chrome binary is re-pointed at Helium by
the helium-chrome-shim module (next commit).
…ling launches Helium

Puppeteer (chrome-devtools-mcp, Playwright channel:"chrome") resolves
channel 'stable' on macOS by probing the literal path
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome with an
existence-only accessSync — no env override, and the Claude Code plugin's
MCP args aren't user-overridable. With the chromium cask gone that broke
chrome-devtools-mcp on the Macs.

Plant a 2-line exec wrapper at the probed path on every rebuild
(postActivation, order 1700). exec keeps the PID, so puppeteer's
launch/close semantics are unchanged — verified headful/headless ×
isolated/persistent-profile × SIGTERM/stdin-EOF close (no orphans) ×
--browserUrl attach (disconnects, browser survives). Guards: no-op and
self-cleaning when Helium.app is absent; refuses to touch a real Google
Chrome (Mach-O magic, not '#!').

Docs: dated learned-behaviour entry in docs/helium.md; knowledge bundle
gains the module doc, a decision record (shim vs MCP-config rewiring),
and an upgraded homebrew.md (zap-cleanup gotcha).
@kriswill
kriswill merged commit 486a530 into main Jul 10, 2026
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