diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 279ef6ed8..c8d2dd380 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,19 @@ jobs: - name: go vet run: go vet ./... + # Per-PR CI runs on Linux only; the Windows and macOS suites run at release + # time. Compile every OS's build here so a broken build tag — a _test.go + # that falls into the wrong OS's build, an OS-only file that stops + # compiling — fails the PR instead of a release tag. vet builds the + # _test.go files too, so it catches test-only tag mistakes `go build` misses. + - name: Cross-compile all targets + run: | + for os in linux darwin windows; do + echo "== $os ==" + CGO_ENABLED=0 GOOS=$os go build ./... + CGO_ENABLED=0 GOOS=$os go vet ./... + done + - name: Frontend tests run: bash .github/scripts/web-test-summary.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index b271362a4..cd7249994 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 (`LICH_PORT`/`LICH_TOKEN`) when run inside a lich terminal, or a `runtime.json` (pid/port/token) lich writes to its config dir when run from any other terminal while lich is open. +- Helium Browser is now accepted as a Linux Chromium-family shell. The launcher + probes `helium-browser` alongside Chromium, Google Chrome and Brave, and the + install/runtime dependency checks document it as a supported browser. ## [0.7.0] - 2026-07-16 diff --git a/INSTALL.md b/INSTALL.md index 6c4d872fb..39203b2cd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -14,7 +14,7 @@ Pick your system: - [Verifying checksums](#verifying-checksums) **Runtime dependencies** — lich opens its window in a Chromium-family browser; -none is bundled. On Linux any of `chromium`, `google-chrome` or `brave` +none is bundled. On Linux any of `chromium`, `google-chrome`, `helium-browser` or `brave` satisfies it, and `zenity` provides the folder picker. On Windows, Chrome, Edge or Brave are found via their conventional install paths (Edge ships with Windows) and the folder picker is native. diff --git a/docs/chromium-shell.md b/docs/chromium-shell.md index 5e65bc8db..aa0a35792 100644 --- a/docs/chromium-shell.md +++ b/docs/chromium-shell.md @@ -37,9 +37,10 @@ its CDP surface): `chromium --app=http://127.0.0.1: --user-data-dir= --class=lich`. - Window closed → WebSocket drops → Go shuts down. No CDP needed for v1. - Still a single Go binary. **Zero Node, zero Electron, no new bundle weight.** - New runtime requirement: chromium/chrome installed (fine for a personal - harness on Arch; the launcher should probe `chromium`, `google-chrome`, - `chromium-browser` and fail with a clear message). + New runtime requirement: a Chromium-family browser installed (fine for a + personal harness on Arch; the launcher should probe `chromium`, + `google-chrome`, `helium-browser`, `chromium-browser` and fail with a clear + message). Why lich is ~80% there already: diff --git a/install.sh b/install.sh index 0a09c29d0..0f3cf8a20 100755 --- a/install.sh +++ b/install.sh @@ -49,11 +49,11 @@ as_root() { check_runtime_deps() { browser="" - for candidate in chromium chromium-browser google-chrome-stable google-chrome brave; do + for candidate in chromium chromium-browser google-chrome-stable google-chrome helium-browser brave; do if have "$candidate"; then browser="$candidate"; break; fi done missing="" - [ -n "$browser" ] || missing="a Chromium-family browser (chromium, google-chrome, brave, ...)" + [ -n "$browser" ] || missing="a Chromium-family browser (chromium, google-chrome, helium-browser, brave, ...)" if ! have zenity; then [ -z "$missing" ] || missing="${missing} and " missing="${missing}zenity" diff --git a/internal/chromium/candidates_unix.go b/internal/chromium/candidates_unix.go index f9eaa7496..9aaed03fd 100644 --- a/internal/chromium/candidates_unix.go +++ b/internal/chromium/candidates_unix.go @@ -13,6 +13,7 @@ func browserCandidates() []string { "chromium-browser", "google-chrome-stable", "google-chrome", + "helium-browser", "brave", } } diff --git a/internal/chromium/candidates_unix_test.go b/internal/chromium/candidates_unix_test.go new file mode 100644 index 000000000..d233179e9 --- /dev/null +++ b/internal/chromium/candidates_unix_test.go @@ -0,0 +1,32 @@ +//go:build !windows && !darwin + +package chromium + +import ( + "slices" + "testing" +) + +// TestUnixBrowserCandidates pins the exact Linux/BSD candidate list in +// preference order: bare PATH names (Linux/BSD installs live on PATH), Chromium +// first, Helium probed before Brave. It mirrors the exact-list style of +// TestWindowsBrowserCandidates / TestDarwinBrowserCandidates — a membership +// check would miss an order regression or a stray entry. +// +// The build tag matches candidates_unix.go (`!windows && !darwin`) on purpose: +// under a bare `!windows` this test also compiles into the darwin build, where +// browserCandidates() returns the .app list and none of these bare names, so +// the assertion would fail the macOS release suite. +func TestUnixBrowserCandidates(t *testing.T) { + want := []string{ + "chromium", + "chromium-browser", + "google-chrome-stable", + "google-chrome", + "helium-browser", + "brave", + } + if got := browserCandidates(); !slices.Equal(got, want) { + t.Fatalf("browserCandidates() = %v, want %v", got, want) + } +} diff --git a/internal/chromium/chromium.go b/internal/chromium/chromium.go index 03af37eba..f794197ae 100644 --- a/internal/chromium/chromium.go +++ b/internal/chromium/chromium.go @@ -23,7 +23,7 @@ func FindBrowser(lookPath func(name string) (string, error)) (string, error) { } } return "", errors.New("no chromium-family browser found (tried " + - fmt.Sprint(candidates) + "); install chromium, chrome or edge") + fmt.Sprint(candidates) + "); install chromium, chrome, edge, brave, or helium") } // windowsBrowserCandidates builds the Windows candidate list: chrome, then