From 5caa192cfc0700b70c1cb3537f603a8ba04b732a Mon Sep 17 00:00:00 2001 From: Aditya Bijalwan Date: Wed, 11 Mar 2026 01:45:03 +0530 Subject: [PATCH] feat: add pulsating blue border automation overlay to browser agent (#21173) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com> --- .../src/agents/browser/automationOverlay.ts | 133 ++++++++++++++++++ .../browser/browserAgentFactory.test.ts | 29 ++++ .../src/agents/browser/browserAgentFactory.ts | 10 ++ .../src/agents/browser/browserManager.test.ts | 83 +++++++++++ .../core/src/agents/browser/browserManager.ts | 90 +++++++++--- .../core/src/agents/browser/mcpToolWrapper.ts | 6 +- .../mcpToolWrapperConfirmation.test.ts | 2 + 7 files changed, 331 insertions(+), 22 deletions(-) create mode 100644 packages/core/src/agents/browser/automationOverlay.ts diff --git a/packages/core/src/agents/browser/automationOverlay.ts b/packages/core/src/agents/browser/automationOverlay.ts new file mode 100644 index 0000000000..a1aa40d58b --- /dev/null +++ b/packages/core/src/agents/browser/automationOverlay.ts @@ -0,0 +1,133 @@ +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @fileoverview Automation overlay utilities for visual indication during browser automation. + * + * Provides functions to inject and remove a pulsating blue border overlay + * that indicates when the browser is under AI agent control. + * + * Uses the Web Animations API instead of injected