Skip to content

Conversation

@seanmcguire12
Copy link
Member

why

  • migration guide docs for v3 still included references to stagehand.page which is not supported in v3

what changed

  • replaced with stagehand.context.pages()[0] and await stagehand.context.awaitActivePage()

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2025

⚠️ No Changeset found

Latest commit: 7754b8c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@seanmcguire12 seanmcguire12 changed the title rm stagehand.page from v3 snippets [docs] rm stagehand.page from v3 snippets Nov 15, 2025
@seanmcguire12 seanmcguire12 merged commit a9b58f1 into main Nov 15, 2025
1 check passed
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 15, 2025

Greptile Overview

Greptile Summary

Updated v3 migration documentation to remove deprecated stagehand.page references, replacing them with the correct v3 Context API methods.

  • Replaced stagehand.page with stagehand.context.pages()[0] for accessing the first page
  • Replaced stagehand.page with await stagehand.context.awaitActivePage() for getting the active page
  • Updated error troubleshooting section to reflect that stagehand.page is not supported in v3
  • All replacements are syntactically correct and match the v3 API implementation

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are straightforward documentation updates that correctly replace deprecated API references with the proper v3 Context API methods. The replacements match the actual implementation found in the codebase (context.ts:682), and all changes are confined to documentation with no code modifications
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/docs/v3/migrations/v2.mdx 5/5 Correctly replaced deprecated stagehand.page with v3 API methods stagehand.context.pages()[0] and await stagehand.context.awaitActivePage()

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Doc as Migration Docs
    participant V3 as Stagehand V3 API
    
    Dev->>Doc: Read v2 to v3 migration guide
    Note over Doc: Old: stagehand.page
    Doc-->>Dev: See deprecated API usage
    
    Dev->>Doc: Check updated examples
    Note over Doc: New: stagehand.context.pages()[0]
    Note over Doc: New: await stagehand.context.awaitActivePage()
    
    Dev->>V3: stagehand.context.pages()[0]
    V3-->>Dev: Returns first page object
    
    Dev->>V3: await stagehand.context.awaitActivePage()
    V3-->>Dev: Returns current active page
    
    Note over Dev,V3: Successfully migrated to V3 API
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

3 participants