Skip to content

feat(browser): add support for authenticated remote browser profiles#895

Merged
steipete merged 4 commits intoopenclaw:mainfrom
mukhtharcm:feat/chrome-browser-improvements
Jan 16, 2026
Merged

feat(browser): add support for authenticated remote browser profiles#895
steipete merged 4 commits intoopenclaw:mainfrom
mukhtharcm:feat/chrome-browser-improvements

Conversation

@mukhtharcm
Copy link
Copy Markdown
Member

Summary

This PR adds support for authenticated remote browser profiles (e.g., Browserless) using HTTP Basic Auth and Playwright WebSocket connections.

Changes

  • cdp.ts / chrome.ts / server-context.ts: Added logic to extract credentials from the CDP URL and inject them into Authorization headers for HTTP CDP requests.
  • server-context.ts: Updated to switch between "Local" (CDP) and "Remote" (Playwright) logic for listing, opening, and closing tabs. Remote profiles now use persistent Playwright connections instead of stateless HTTP requests.
  • pw-session.ts: Updated connection logic to support authenticated WebSocket endpoints by converting the HTTP CDP URL to a WebSocket URL with credentials and using chromium.connect for remote sessions.

Commits

  1. feat(browser): add support for authenticated remote CDP profiles
  2. feat(browser): add support for remote playwright websocket auth

@steipete steipete force-pushed the feat/chrome-browser-improvements branch from 1907847 to bf15c87 Compare January 16, 2026 08:31
@steipete steipete merged commit 3b1b14b into openclaw:main Jan 16, 2026
20 of 22 checks passed
@steipete
Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: bf15c87\n- Merge commit: 3b1b14b\n\nThanks @mukhtharcm!

steipete pushed a commit to mukhtharcm/clawdbot that referenced this pull request Jan 17, 2026
…le tab operations

For remote CDP profiles (e.g., Browserless), tab operations now use Playwright's
persistent connection instead of stateless HTTP requests. This ensures tabs
persist across operations rather than being terminated after each request.

Changes:
- pw-session.ts: Add listPagesViaPlaywright, createPageViaPlaywright, and
  closePageByTargetIdViaPlaywright functions using the cached Playwright connection
- pw-ai.ts: Export new functions for dynamic import
- server-context.ts: For remote profiles (!cdpIsLoopback), use Playwright-based
  tab operations; local profiles continue using HTTP endpoints
- server-context.ts: Fix ensureTabAvailable to not require wsUrl for remote
  profiles since Playwright accesses pages directly

This is a follow-up to openclaw#895 which added authentication support for remote CDP
profiles. The original PR description mentioned switching to persistent Playwright
connections for tab operations, but only the auth changes were merged.
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…mprovements

feat(browser): add support for authenticated remote browser profiles
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…le tab operations

For remote CDP profiles (e.g., Browserless), tab operations now use Playwright's
persistent connection instead of stateless HTTP requests. This ensures tabs
persist across operations rather than being terminated after each request.

Changes:
- pw-session.ts: Add listPagesViaPlaywright, createPageViaPlaywright, and
  closePageByTargetIdViaPlaywright functions using the cached Playwright connection
- pw-ai.ts: Export new functions for dynamic import
- server-context.ts: For remote profiles (!cdpIsLoopback), use Playwright-based
  tab operations; local profiles continue using HTTP endpoints
- server-context.ts: Fix ensureTabAvailable to not require wsUrl for remote
  profiles since Playwright accesses pages directly

This is a follow-up to openclaw#895 which added authentication support for remote CDP
profiles. The original PR description mentioned switching to persistent Playwright
connections for tab operations, but only the auth changes were merged.
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…mprovements

feat(browser): add support for authenticated remote browser profiles
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…le tab operations

For remote CDP profiles (e.g., Browserless), tab operations now use Playwright's
persistent connection instead of stateless HTTP requests. This ensures tabs
persist across operations rather than being terminated after each request.

Changes:
- pw-session.ts: Add listPagesViaPlaywright, createPageViaPlaywright, and
  closePageByTargetIdViaPlaywright functions using the cached Playwright connection
- pw-ai.ts: Export new functions for dynamic import
- server-context.ts: For remote profiles (!cdpIsLoopback), use Playwright-based
  tab operations; local profiles continue using HTTP endpoints
- server-context.ts: Fix ensureTabAvailable to not require wsUrl for remote
  profiles since Playwright accesses pages directly

This is a follow-up to openclaw#895 which added authentication support for remote CDP
profiles. The original PR description mentioned switching to persistent Playwright
connections for tab operations, but only the auth changes were merged.
ronan-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request May 3, 2026
…ard-looking

Per figs's directive (msg 1500347103...): 'per your usual, we trim old elements,
and would discuss swim 41 in that appendix section.'

Two changes:

1. D.2 evidence-locations table: consolidate Swim 7 + Swim 8 references into
   a single 'Earlier integration sessions (Swim 7 + Swim 8)' row with the
   3 archived branches preserved as historical-reference. The §D.3 prose
   already explains why these are superseded; the table consolidation
   reduces verbosity without losing discoverability.

2. D.4 In-flight: Swim 41 v5.2-substrate-verification (NEW SECTION).
   Forward-looking placeholder per figs's directive. Includes:
   - Status: prep complete, driver wake-stamp pending
   - Tracker: openclaw-bootstrap#892 (swim-41-v5.2-substrate-verification)
   - Initial OV coverage table:
     * OV-1: failover-policy openclaw#52147 gate works on v5.2 (openclaw#893)
     * OV-2: incrementCompactionCount canonical primitives on v5.2 (openclaw#894)
     * OV-3: silas-saturation diagnostic instrumentation on v5.2 (openclaw#895)
     * OV-4: earlyWarningBand context-pressure post-compact (figs's
       intentional-pin) (openclaw#896)
   - Driver wake-stamp opens execution (TBD: cohort volunteer or figs
     assignment)
   - Expected evidence corpus shape matches Swim 9 + Swim 10 precedent
   - Why Swim 41 matters: first integration validation against v2026.5.2
     base where substrate sits alongside upstream changes from 1543-commit
     window between v29 and v5.2 (notably: failover-policy openclaw#52147 gate
     change). Clean Swim 41 result establishes substrate behavior is stable
     across base rotation, not just historically validated against prior
     base.

TOC updated to reference §D.4.

Princes-canon honored: acted on own authority per figs's 'you don't wait
for figs' (msg 1500347103...) + Gwydion Nanashi Ferrinas Solidor surname-
naming. Cohort surface at msg 1500350048... and msg 1500350312... preceded
push; no objections surfaced in the wait-window.

Push order: dd97767 (frond-scribe bug-fix surface) -> ca72ebb
(my totalTokensFresh precision-pin) -> THIS COMMIT (D.2 trim + D.4 swim-41).
Non-conflicting with seam-fix lane in flight (lane touches code; this
touches docs).

Refs: PR #549 + figs's swim-41 / dev-detritus canon directives
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…mprovements

feat(browser): add support for authenticated remote browser profiles
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…le tab operations

For remote CDP profiles (e.g., Browserless), tab operations now use Playwright's
persistent connection instead of stateless HTTP requests. This ensures tabs
persist across operations rather than being terminated after each request.

Changes:
- pw-session.ts: Add listPagesViaPlaywright, createPageViaPlaywright, and
  closePageByTargetIdViaPlaywright functions using the cached Playwright connection
- pw-ai.ts: Export new functions for dynamic import
- server-context.ts: For remote profiles (!cdpIsLoopback), use Playwright-based
  tab operations; local profiles continue using HTTP endpoints
- server-context.ts: Fix ensureTabAvailable to not require wsUrl for remote
  profiles since Playwright accesses pages directly

This is a follow-up to openclaw#895 which added authentication support for remote CDP
profiles. The original PR description mentioned switching to persistent Playwright
connections for tab operations, but only the auth changes were merged.
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.

2 participants