mirror of
https://github.com/bitbaum/openclaw.git
synced 2026-12-04 15:09:20 +01:00
* feat(browser): agent requests, text, and emulate actions plus snapshot query filter
The browser control service already collected network requests and served
device/media/timezone/locale emulation, and Playwright could read page text,
but none of it was exposed to the model. The agent tool now maps them:
- action=requests: bounded network log (filter substring, limit, clear)
- action=text: article/main/body innerText via a new guarded GET /text route;
hard-capped, no model-provided JS, wrapped as untrusted external content
- action=emulate: device/colorScheme/timezoneId/locale via the existing
/set/* routes, ordered, with an applied list
- snapshot query=...: token AND-match filter over the formatted snapshot so
ref discovery no longer needs full-tree reads
Successful tab-scoped results also attach a bounded details.browserTab
{targetId, url, title} descriptor consumed by the Control UI browser-tab
preview card (UI metadata only; replay strips details). Capability gating
drops the Playwright-only actions on Chrome DevTools MCP profiles, and the
tab-bound action list includes the new actions.
* feat(ui): inline browser-tab thumbnail cards in the chat transcript
Browser runs used to render as a text-only 'Used Browser xN' row whose
expanded rows showed raw CDP target ids. The transcript now renders a
browser-tab card - favicon-style globe, page title, URL, and a live
thumbnail of the tab - for each tab an agent touches, live during the run
and in history.
The thumbnail never rides the tool result or the WebSocket: the client
captures it itself over the existing browser.request path (same mechanism
as the browser panel), single-flight per tab with a bounded image cache,
refreshed only when a newer completed result for that tab lands. Cards
collapse to one per tab per turn (latest wins). Clicking a card opens the
browser panel. Without browser.request or after tab close, the card
degrades to a static title/URL chip.
The history projection allowlists the bounded details.browserTab descriptor
(targetId/url/title) that the browser tool now emits; live tool-stream
details already flowed. No new gateway events, no config, no protocol
changes.
* test: register the browser innerText suppression in the lint allowlist
The new browser text action reads rendered visible text via locator
innerText(), which is the semantic point of the action; register the
intentional unicorn/prefer-dom-node-text-content suppression so the
production-suppression allowlist gate stays exact.
* feat(ui): browser card miniature scaling, bottom bar, and tab menu
Review feedback on the browser-tab card: the thumbnail now shows the whole
viewport scaled down (tiny-but-at-scale) instead of a cropped top band, and
the identity moved to a bottom bar - globe, title, URL - with hover-revealed
actions: an Open button into the browser panel and an overflow menu with
Copy URL and Open in new tab. Without a capturable tab the card is the bar
alone.
* fix(ui): route the browser card's external open through openExternalUrlSafe
The boundary guard requires the canonical safe-external-open helper instead
of raw window.open.
* fix(ui): move the browser card menu onto the shared wa-dropdown primitive
The web-awesome ownership guard forbids hand-rolled role=menu popovers and
the cursor policy owns pointer rules; the overflow menu now uses the shared
dropdown (roles, dismissal, and cursor handled by the primitive) with the
new-tab item marked data-new-tab-action.
* style(ui): text-only browser card menu items
* fix(browser/ui): descriptor on emulate/console results; card click selects its tab
ClawSweeper review findings: emulate and tab-scoped console results carry a
targetId but were excluded from the browserTab descriptor wrapper, so their
successful results could not render the browser-tab card; and the card's
panel-toggle event carried only open:true, leaving a different active tab in
place. The wrapper now covers both actions, the toggle contract gains an
optional targetId, and the panel selects that tab on targeted open requests
(embedded and docked paths).