-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[v2]: deprecate drawOverlay param
#1396
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
Conversation
🦋 Changeset detectedLatest commit: c324836 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile OverviewGreptile SummaryDeprecated the
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant StagehandPage
participant ObserveHandler
participant Utils
Note over User,Utils: Before (with drawOverlay)
User->>StagehandPage: observe({ drawOverlay: true })
StagehandPage->>Utils: clearOverlays()
Utils->>Utils: Remove existing overlays from DOM
StagehandPage->>ObserveHandler: observe({ drawOverlay: true })
ObserveHandler->>ObserveHandler: Process elements
ObserveHandler->>Utils: drawObserveOverlay()
Utils->>Utils: Draw yellow overlays on elements
ObserveHandler-->>User: Return ObserveResult[]
Note over User,Utils: After (deprecated)
User->>StagehandPage: observe({ drawOverlay: true })
StagehandPage->>ObserveHandler: observe({ drawOverlay: true })
ObserveHandler->>ObserveHandler: Log deprecation warning
ObserveHandler->>ObserveHandler: Process elements (no overlay)
ObserveHandler-->>User: Return ObserveResult[]
|
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 (3)
-
docs/references/observe.mdx, line 75-79 (link)style: documentation should be updated to mark
drawOverlayas deprecated -
docs/references/observe.mdx, line 33 (link)style: remove
drawOverlayfrom the interface definition or mark it as deprecated -
docs/references/observe.mdx, line 133 (link)style: remove usage of deprecated
drawOverlayparameter from example code
4 files reviewed, 3 comments
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 5 files
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v2, this PR will be updated. # Releases ## @browserbasehq/[email protected] ### Patch Changes - [#1396](#1396) [`b7bc0b6`](b7bc0b6) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - deprecate drawOverlay parameter in observe ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`b7bc0b6`](b7bc0b6)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`b7bc0b6`](b7bc0b6)]: - @browserbasehq/[email protected] <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Publishes a patch release across the Stagehand packages. The main change deprecates the drawOverlay parameter in observe in @browserbasehq/stagehand v2.5.6. - **Dependencies** - @browserbasehq/stagehand → 2.5.6 (deprecates observe drawOverlay) - @browserbasehq/stagehand-evals → 1.1.6 (deps update) - @browserbasehq/stagehand-examples → 1.0.15 (deps update) - **Migration** - Stop passing drawOverlay to observe. No behavior change now; removal planned in a future release. <sup>Written for commit 00540fd. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
why
page.evaluate()errorswhat changed
drawOverlayparam from observeclearOverlay()anddrawObserveOverlay()functionsSummary by cubic
Deprecated the observe drawOverlay option and removed overlay rendering to prevent frequent page.evaluate errors. The option is now a no-op and logs a warning when used.
Written for commit c324836. Summary will update automatically on new commits.