Skip to content

update google sdk for gemini. Better frame context cleanup - #68

Merged
Dingway98 merged 2 commits into
mainfrom
update-gemini-sdk
Dec 3, 2025
Merged

update google sdk for gemini. Better frame context cleanup#68
Dingway98 merged 2 commits into
mainfrom
update-gemini-sdk

Conversation

@Dingway98

@Dingway98 Dingway98 commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Note

Parallelizes OOPIF processing via FrameContextManager, adds thorough frame cleanup on detach, and updates @google/genai to 1.30.0.

  • CDP / Frame management:
    • Add robust removeFrame cleanup: clears execution contexts, waiters, OOPIF session listeners, and OOPIF tracking before removing from graph/sessions.
    • Ensure cleanup on OOPIF detach and when cached Playwright frames are detached (calls removeFrame).
    • Skip ad/tracking frames during OOPIF discovery; maintain deterministic frame indices.
  • A11y DOM provider:
    • Refactor cross-origin handling: process OOPIF frames in parallel via FrameContextManager.getOOPIFs() and collectCrossOriginFrameData, merging results into shared maps.
    • Keep same-origin iframe processing parallel; improve execution context resolution via waitForExecutionContext and session annotation.
    • Build frame paths and sync frame context after discovery for consistent hierarchy.
  • Dependencies:
    • Update @google/genai to ^1.30.0 and bump package version to 1.0.6.

Written by Cursor Bugbot for commit cef2693. This will update automatically on new commits. Configure here.

Comment thread src/cdp/frame-context-manager.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Cross-origin frame processing accidentally removed from loop

The collectCrossOriginFrameData call and processedCrossOriginFrames.add(frameId) were removed from the cross-origin frame branch, but the conditional structure was left intact. Now when isCrossOrigin && frameId && session is true and the frame hasn't been processed, the code falls through without doing anything. The processedCrossOriginFrames.has(frameId) check at line 474 will always be false since nothing populates the set in this loop anymore. While OOPIF processing later handles frames from frameContextManager.getOOPIFs(), any cross-origin frames discovered in maps.frameMap that aren't tracked as OOPIFs will be silently skipped.

src/context-providers/a11y-dom/index.ts#L472-L479

if (isCrossOrigin && frameId && session) {
if (processedCrossOriginFrames.has(frameId)) {
continue;
}
} else {
sameOriginFrames.push([frameIndex, frameInfo]);
}

Fix in Cursor Fix in Web


@Dingway98
Dingway98 merged commit 9e94185 into main Dec 3, 2025
2 checks passed
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.

1 participant