Skip to content

fix(browser): stop shared profiles from mixing session tabs - #158558

Open
roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/scoping-browser-tabs-to-sessions
Open

roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/scoping-browser-tabs-to-sessions

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes browser panels and tab-targeted agent actions mixing tabs from different conversations when they share a browser profile.

User Impact

Each conversation lists, selects, and acts on its associated tabs. Browser profiles, cookies, and logins remain shared; this does not launch a separate browser per chat. Global administrative and CLI browser controls remain global. Tabs without a provable current-session association are not automatically adopted. Update paired browser nodes alongside the Gateway; older nodes reject scoped routes rather than falling back to global tab access.

Why This Change Was Made

The selected tab was session-specific, but the underlying tab list came from the whole profile. This applies the existing tab registry and session lifetime to both UI requests and ordinary browser tools. Ownership follows the exact session revision, native popup provenance, and the captured node route. Failed opens clean up only their own allocation and registration, without closing a replacement or dashboard-owned tab.

Evidence

  • After the test audit, 273 focused tests passed across five files/four shards, including the real Chromium panel and registered managed/existing-session scenarios. The audit removed five redundant cases and a duplicate request: 106 net test/support lines, with production code unchanged.
  • Deferred local/node CDP, MCP-lock, and Playwright-resolution tests verify that a dashboard takeover prevents the native close. Reset, original-invocation, popup, failed-open, successor-registration, and capacity regressions are covered.
  • Core, UI, and extension typechecks; changed-file type-aware lint; formatting, size, and repository invariant guards passed. Public SDK export count is unchanged.
  • Full pnpm build passed for the unchanged production code, including SDK declarations, plugin packaging, and Control UI performance budgets. Original independent-review findings were addressed and regression-tested; a fresh P0–P2 autoreview of the test reduction found no actionable issues.

Browser panel regression

Before

Both conversations show both tabs

After

Each conversation shows only its own tab

Visual evidence uses the real browser panel in Chromium with synthetic test pages. Backend/node scenarios exercise registered handlers and the native command dispatcher with controlled CDP responses, not a live remote host. No authenticated website login flow was exercised.

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: b8859b27-6d84-4355-8d82-aa14238325ef
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime plugin: file-transfer extensions: browser size: XL labels Sep 26, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 26, 2026 01:59
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 0e901f7e-e057-4860-98a9-5ce4f7740fe1
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: browser gateway Gateway runtime plugin: file-transfer size: XL stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants