4 Commits
Author SHA1 Message Date
Pierre Tachoire bb905ad978 test(browser): convert Lightpanda gap test to positive Snapshot+Eval coverage
Lightpanda upstream merged the AX-tree nodeId fix in
lightpanda-io/browser#2232. The TestLightpanda_KnownUpstreamGaps canary
fired on the latest image, so:

- Rename to TestLightpanda_Snapshot_AndEval and assert the snapshot
  returns refs + non-empty text (instead of asserting it fails).
- Flip AX-snapshot in the compatibility matrix from gap to fully
  supported. Replace the "Known upstream gap" section with a
  "Minimum Lightpanda version" note pointing at the upstream PR.
2026-07-01 10:23:27 +02:00
Pierre Tachoire 62e8359a21 fix(browser): correct Lightpanda Eval claims + add missing compose command
- Eval works on Lightpanda when called with go-rod's expected function
  form (e.g. "() => document.title"); only bare expressions fail, and
  they fail on Chrome too. Fix the integration gap test and docs that
  incorrectly attributed this to a Lightpanda bug.
- docker-compose.lightpanda.yml: add the missing
  command: lightpanda serve ... — the image's entrypoint isn't
  lightpanda, so without an explicit command the sidecar wouldn't
  start.
2026-07-01 10:23:24 +02:00
Pierre Tachoire 4147fee4e5 fix(browser): make Lightpanda backend usable end-to-end
Live testing surfaced three issues:

- Lightpanda numbers targets per-browser, and each conn is its own
  browser, so every tab gets the same upstream targetID
  ("FID-0000000001"). Synthesize globally-unique "lp-N" keys for our
  internal map so multi-tenant tab tracking works.
- page.Info() returns valid data once post-open then errors on
  subsequent calls, which made ListTabs silently drop tabs. Cache URL
  and Title at OpenTab time and read from the cache in ListTabs.
- rod.Browser.Close() calls Browser.close which Lightpanda doesn't
  implement; the WS drops cleanly anyway. Swallow the error to quiet
  the noisy log line.

Two Lightpanda upstream bugs are documented in docs/browser-backends.md
and exercised by TestLightpanda_KnownUpstreamGaps:
  1. Accessibility.getFullAXTree returns nodeId as a JSON number
     (CDP spec: string)
  2. Runtime.evaluate rejects go-rod's function-apply wrapper
2026-07-01 10:23:20 +02:00
Pierre Tachoire 890ced810d docs(browser): add Lightpanda sidecar overlay + backends doc
- docker-compose.lightpanda.yml: opt-in overlay running
  lightpanda/browser:latest, wires GOCLAW_BROWSER_REMOTE_URL and
  GOCLAW_BROWSER_BACKEND so the manager picks the right code path.
- docs/browser-backends.md: compatibility matrix vs Chrome (screenshot,
  multi-tab, cookie sharing, etc.) and guidance on when to pick which.
2026-07-01 10:23:17 +02:00