-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Evals] Disable screenshot collector interval by default #1421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Evals] Disable screenshot collector interval by default #1421
Conversation
|
bb1abb7 to
bc70a36
Compare
Greptile SummaryRefactored
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant EvalTask as Eval Task
participant SC as ScreenshotCollector
participant V3 as V3 Instance
participant Bus as V3 Event Bus
participant Page as Active Page
Note over EvalTask,Page: Event-Driven Mode (onlineMind2Web, webvoyager)
EvalTask->>SC: new ScreenshotCollector(v3, {maxScreenshots})
EvalTask->>Bus: bus.on("agent_screensot_taken_event", handler)
EvalTask->>V3: agent.execute()
V3->>Page: screenshot()
V3->>Bus: emit("agent_screensot_taken_event", buffer)
Bus->>SC: addScreenshot(buffer)
SC->>SC: MSE/SSIM comparison
SC->>SC: Store if different enough
EvalTask->>Bus: bus.off("agent_screensot_taken_event", handler)
EvalTask->>SC: stop()
SC-->>EvalTask: Buffer[] (clears internal state)
Note over EvalTask,Page: Interval Mode (other eval tasks)
EvalTask->>SC: new ScreenshotCollector(v3, {interval, maxScreenshots})
EvalTask->>SC: start()
loop Every interval ms
SC->>V3: context.awaitActivePage()
V3-->>SC: page
SC->>Page: screenshot()
Page-->>SC: buffer
SC->>SC: MSE/SSIM comparison
SC->>SC: Store if different enough
end
EvalTask->>SC: stop()
SC->>SC: Capture final screenshot
SC-->>EvalTask: Buffer[] (clears internal state)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
packages/evals/types/screenshotCollector.ts, line 12-16 (link)style:
ScreenshotCapablePagetype is now unused since the refactor to useV3directly. Consider removing this dead code.
22 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 22 files
why
Screenshot collector via interval was deprecated and replaced with improved agent loop event subscriptions.
what changed
Refactored ScreenshotCollector to use V3 instance instead of Page, enabling event-driven screenshot collection and improving memory management.
Key changes:
test plan
Summary by cubic
Switches screenshot capture to event-driven mode via the V3 event bus and disables interval polling by default. Reduces overhead and aligns with Linear STG-1072; interval capture is now opt-in via options.interval.
Refactors
Migration
Written for commit bc70a36. Summary will update automatically on new commits.