Skip to content

rm initialization result from v3 docs - #1299

Merged
seanmcguire12 merged 3 commits into
mainfrom
update-init-result-in-docs
Nov 21, 2025
Merged

seanmcguire12 merged 3 commits into
mainfrom
update-init-result-in-docs

Conversation

@seanmcguire12

Copy link
Copy Markdown
Member

why

  • stagehand.init() used to return the following in stagehand v2:
{
  debugUrl: '',
  sessionUrl: '',
  sessionId: ''
}
  • in v3, the debugUrl, sessionUrl, and sessionId are all accessible via the stagehand object

what changed

  • updated stagehand v3 docs to reflect the changes

test plan

@changeset-bot

changeset-bot Bot commented Nov 21, 2025 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a504551

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

@greptile-apps

greptile-apps Bot commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Updated v3 documentation to reflect that stagehand.init() no longer returns session information. The return values (debugUrl, sessionUrl, sessionId) are now accessed as properties on the stagehand object (browserbaseDebugURL, browserbaseSessionURL, browserbaseSessionID).

Changes:

  • Removed outdated "Initialization Result" section from browser.mdx that documented v2 behavior
  • Added migration guide section in v2.mdx explaining the API change with code examples
  • One spelling error found: 'accessiblie' should be 'accessible' on line 120 of migrations doc

Confidence Score: 4/5

  • Safe to merge after fixing the spelling error
  • Documentation accurately reflects the v3 API changes, verified against source code and tests. One minor spelling error prevents a perfect score but doesn't affect technical correctness
  • packages/docs/v3/migrations/v2.mdx requires fixing the spelling error on line 120

Important Files Changed

File Analysis

Filename Score Overview
packages/docs/v3/configuration/browser.mdx 5/5 Removed outdated "Initialization Result" section documenting v2 return values that no longer exist in v3
packages/docs/v3/migrations/v2.mdx 4/5 Added migration guide for init() return value changes; contains one spelling error ('accessiblie' should be 'accessible')

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant SH as Stagehand v3
    participant BB as Browserbase

    Note over Dev,BB: Stagehand v2 (Old Behavior)
    Dev->>SH: await stagehand.init()
    SH->>BB: Create session
    BB-->>SH: Session created
    SH-->>Dev: {debugUrl, sessionUrl, sessionId}
    Dev->>Dev: Access via result object

    Note over Dev,BB: Stagehand v3 (New Behavior)
    Dev->>SH: await stagehand.init()
    SH->>BB: Create session
    BB-->>SH: Session created
    SH-->>Dev: Promise<void>
    Dev->>SH: stagehand.browserbaseDebugURL
    SH-->>Dev: debugUrl
    Dev->>SH: stagehand.browserbaseSessionURL
    SH-->>Dev: sessionUrl
    Dev->>SH: stagehand.browserbaseSessionID
    SH-->>Dev: sessionId
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread packages/docs/v3/migrations/v2.mdx Resolved
@seanmcguire12
seanmcguire12 merged commit dbcb892 into main Nov 21, 2025
felipeofdev-ai pushed a commit to felipeofdev-ai/stagehand that referenced this pull request Aug 4, 2026
# why
- `stagehand.init()` used to return the following in stagehand v2:
```
{
  debugUrl: '',
  sessionUrl: '',
  sessionId: ''
}
```
- in v3, the debugUrl, sessionUrl, and sessionId are all accessible via
the stagehand object
# what changed
- updated stagehand v3 docs to reflect the changes
# test plan

This branch was successfully deployed

1 active deployment
staging - packages/docs — a5045510 Deployed Nov 21, 2025 by mintlify[bot]
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.

2 participants