feat(install): run on Linux, and pick the platform at install time - #234
Open
NagyVikt wants to merge 2 commits into
Open
feat(install): run on Linux, and pick the platform at install time#234NagyVikt wants to merge 2 commits into
NagyVikt wants to merge 2 commits into
Conversation
`install.sh` refused everything that was not Darwin, so the only way to use the harness on Linux was to fork it. This adds the missing half rather than replacing the existing one: the macOS DMG flow is untouched, and `main()` now dispatches on `uname -s` instead of dying on it. The Linux side is `package/ego-linux`, a CDP shim that supplies the `globalThis.ego` object the macOS app injects natively, backed by a stock Chrome/Chromium. `package/ego-browser` is unchanged — every helper, locator, driver and format runs as-is on both platforms. That is the point of the design, and it is what the test run below actually verifies. Install on Linux is a build plus a symlink, not a download: the script checks Node >= 22 and a browser on PATH up front and stops with a clear error rather than half-installing. `EGO_LINUX_CHROME` and `EGO_LINUX_BIN_DIR` override the two things worth overriding. Verified on Linux against an unmodified `package/ego-browser`: - `package/ego-linux` suite: 54/54 pass - `sh skills/ego-browser/scripts/install.sh` end to end — build, link, PATH warning, and the post-install smoke check - dispatcher, with `uname` stubbed: Darwin enters the DMG flow (reaches `require_command hdiutil`), FreeBSD exits with `unsupported platform` Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two places described `finishDragProbe` by its current constant — a 50 ms window — and one of them prescribed the fix. Both go stale the moment that window changes, and neither belongs in install/porting docs: the race is in the shared harness, not in anything Linux-specific. The install troubleshooting bullet is dropped outright; it was filed under "Linux" for a symptom that has nothing to do with the platform. The README's section keeps the measurement — what was observed, how it reproduces, and why the shim cannot suppress it — and drops the constant and the remedy, so it stays true whatever the harness does about it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
can we get this moving ? we really need it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
skills/ego-browser/scripts/install.shcurrently opens withso the only way to run the harness on Linux has been to fork the repo. This PR adds the missing half instead of replacing the existing one.
main()was renamed tomain_macos()and lost exactly one line — the guard above. Every DMG function (install_ego_lite,find_ego_lite_app,strip_quarantine_attributes,cleanup, thetrap) is byte-identical. The diff on that file is +81/−3.main()dispatches onuname -s:Darwin→ the existing flow,Linux→ the new one, anything else →unsupported platform: <name>rather than a macOS-specific message.package/ego-linux(new, 39 files) supplies theglobalThis.egoobject the macOS app injects natively, backed by a stock Chrome/Chromium over CDP.Why it does not touch
package/ego-browserpackage/ego-browseris unchanged in this PR — 0 files. Every helper, locator, driver and format runs as-is on both platforms; the port is a backing implementation, not a second harness. That is the design claim, and the test run below is what checks it rather than asserting it.Install on Linux
A build plus a symlink — there is nothing to download:
It verifies Node >= 22 and a browser on PATH before touching anything, so it fails clearly instead of half-installing.
EGO_LINUX_CHROMEpoints it at a browser that is not on PATH;EGO_LINUX_BIN_DIRlinks somewhere other than~/.local/bin. There is no GUI onboarding step on Linux: when the script returns, the command is ready.Verification
Run on Linux against an unmodified
package/ego-browserfrom this branch:package/ego-linuxsuitesh skills/ego-browser/scripts/install.shend to endnpm ci, build, symlink, PATH warning, post-install smoke checkunamestubbed toDarwinrequire_command hdiutilunamestubbed toFreeBSDerror: unsupported platform: FreeBSD (supported: macOS, Linux)sh -non the installerThe install was run with
EGO_LINUX_BIN_DIRpointed at a scratch directory, so it proves the flow without depending on a pre-existing install.What Linux cannot do that the macOS app can
Documented in
references/install.mdandpackage/ego-linux/README.mdrather than left to be discovered:listTabsis browser-wide, not per task space. Task spaces work (own tabs, ownership,switch/claim/handOff/complete), but CDP cannot place a tab in a chosen window, so per-space tab lists are not reproducible.localStorage/ IndexedDB / service workers are not carried.DOMSnapshot.captureSnapshot. Refs (@N) are exact CDPbackendNodeIds, but the tree's wording differs from the native snapshot.Scope
This is carved down from a working Linux fork to the platform-support core. Deliberately not included, to keep the diff reviewable:
README.md), fork-specific docs and experimentsdriver/pointer.tsdrag-timing fix that is platform-agnostic and belongs in its own PR — opened separately as fix(pointer): peek for drag evidence before re-synthesising the drag #235The two are independent: they touch different files, and this branch documents the drag race only in terms of what was observed, never by the constant #235 changes. Either order merges cleanly.
Notes for review
package/ego-linux/README.mdstill says "upstream" in a few places where it means "the macOS app" (e.g. "Upstream draws this inside the browser's own chrome"). Readable, but happy to reword to whatever wording you prefer..gitignoregains two un-ignore lines sopackage/ego-linux/test/is tracked, matching the existingpackage/ego-browser/test/exception.ego-lite-linuxidentifier (ego-lite-linux.desktop, the profile dir). Renaming them is a breaking change for anyone already running the port, so I left it as a call for you to make.