Fix Environment Browser Google sign-in and overlay blanking - #249
Conversation
Rebuild guest Chromium user-agent and Client Hints so Google no longer rejects Aiden Agent/Electron as an insecure browser. Hide the native page view only when floating chrome actually covers its slot, so agent steps and other chat popovers no longer blank the open site. Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Quote sec-ch-ua-full-version, keep GREASE versions consistent, and ignore closed, aria-hidden, or inert ancestor chrome when deciding whether the native Environment Browser view must hide. Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Hermes Review BotConfidence: 5 Engine: SummaryThis change resolves two Environment Browser issues: Google account sign-in failures caused by Electron/app branding tokens in the guest identity, and unwanted native view blanking caused by window-wide overlay checks. Guest requests now use a reconstructed Chromium user agent alongside synchronized Client Hints ( Confidence Score: 5/5End-to-end tracing verified guest user agent extraction, Client Hint formatting, preview authorization preservation, and DOM occlusion intersection across both docked and floating frames. 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
actor User
participant DOM as Renderer DOM
participant Panel as BrowserPanel (renderer/components/browser-panel.tsx)
participant State as browser-ui-state (renderer/lib/browser-ui-state.ts)
participant Main as BrowserService (main/services/browser/service.ts)
participant View as WebContentsView
Note over Panel,State: 1. Overlay Occlusion Flow
User->>DOM: Opens step details / hover card in chat
DOM-->>Panel: MutationObserver / ResizeObserver callback
Panel->>State: visibleBrowserNativeOccluders(document)
State-->>Panel: Active occluder bounding rects
Panel->>State: browserNativeViewObstructed(hostBounds, occluderBounds)
State-->>Panel: false (disjoint bounds)
Note over Panel: Slot unobstructed; presentation state unchanged (no blanking)
Note over Main,View: 2. Guest Identity & Sign-In Flow
View->>Main: Outgoing request (e.g. accounts.google.com)
Main->>Main: applyBrowserGuestIdentityHeaders(headers, guestUserAgent)
Note over Main: Electron/Aiden tokens replaced; Client Hints synchronized
Main-->>View: Dispatch request with Chromium identity
[]
|
There was a problem hiding this comment.
Important
This PR still has two must-address issues: the guest identity remains inconsistent between renderer metadata and rewritten request headers, and the full-screen Radix dialog overlay can be ignored, leaving the native page above a modal.
Reviewed changes: I reviewed the two commits covering guest UA and Client Hint handling and native browser occluder presentation.
- Guest browser identity Rebuilds a Chromium-looking UA, applies it to profile sessions and views, and rewrites request Client Hints while retaining preview authorization.
- Occlusion-aware presentation Computes rectangle intersection for dialogs, menus, listboxes, popovers, CSS popovers, and explicitly marked slash-palette surfaces, with filters for closed, hidden, and inert nodes.
- Contracts and docs Updates the Environment Browser documentation and adds UA/header, overlay geometry, service wiring, and slash-palette contract coverage.
GPT Luna | 𝕏
…p modal overlays occluding - Stop forging a "Google Chrome" brand, a hand-picked GREASE brand, and high-entropy hints. Electron sends no UA-CH headers for guests, while the renderer's navigator.userAgentData reports Chromium + GREASE only. Emit the default low-entropy trio derived from Chromium's own brand algorithm, only to potentially trustworthy URLs, and strip any other sec-ch-ua* headers. - Add an Electron E2E check that compares navigator.userAgentData with the headers a guest document and subresource actually send. - Radix hideOthers marks the modal overlay's portal aria-hidden with a data-aria-hidden marker; do not treat that isolation as visual hiding, so an open full-window dialog overlay still hides the native browser view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAkZRgQzUoKWGpgupF3a4D
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: I re-reviewed the incremental changes since the prior Pullfrog review, focusing on guest identity consistency and native browser occlusion by modal overlays.
- Aligned guest identity Rebuilt the low-entropy Client Hint brand list from Chromium's GREASE sequence and added an Electron E2E comparison between renderer metadata and document/subresource headers, with hints limited to potentially trustworthy origins.
- Preserved modal occlusion Kept Radix-isolated dialog overlays in occluder discovery and added coverage for a full-window overlay covering a right-docked browser.
GPT Luna | 𝕏

Problem
Environment Browser rejected Google sign-in with This browser or app may not be secure. The guest user-agent still included
Aiden Agent/<version>because the product name contains a space, so the old Electron/aiden strip left a token Google treats as an embedded app.Opening agent-step details (and other chat popovers) also blanked the live page. The native
WebContentsViewhid whenever any dialog/popover existed anywhere in the window, including hover cards that only cover the chat column.Fix
WebContentsView.data-browser-occludersurfaces such as the slash palette). Closed,aria-hidden, andinertancestors are ignored.Full-window dialog overlays still hide the guest so it cannot steal clicks from a modal.
Review
Grok 4.6 medium adversarial/blast-radius review approved. Residuals: Google can still reject tabs where CDP is attached; JS
userAgentDatamay still mention Electron; 1px overlap blanks the whole slot. No mobile/settings/onboarding contract change.Tests
npm run test:browseris the CI gate. Localnpm cihit registryECONNRESETin this environment; focused UA/overlay contracts were executed against the reconstructed helpers.