fix(core): pass local profile dir as Chrome flag - #2237
Conversation
🦋 Changeset detectedLatest commit: 289eeca The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Test as Regression Test
participant Launch as launchLocalChrome()
participant Flags as ChromeFlags Builder
participant Launcher as chrome-launcher
Note over Test,Launcher: Launch flow
Test->>Launch: call with userDataDir option
Launch->>Flags: build chromeFlags array
Flags->>Flags: append "--user-data-dir=<path>"
Flags-->>Launch: chromeFlags list
Launch->>Launcher: launch({ chromeFlags, ignoreDefaultFlags })
Note over Launch,Launcher: userDataDir NOT passed to launcher
Launcher->>Launcher: start Chrome with flags
Launcher-->>Launch: browser instance
Note over Test,Launcher: Assertion path
Test->>Launch: getLaunchArgs() captures launcher options
alt userDataDir option absent from launcher
Test-->>Test: expect args.userDataDir to be undefined
end
alt chromeFlags contains user-data-dir
Test-->>Test: expect "--user-data-dir=<path>" in flags
end
|
Retargeted this PR to |
|
Follow-up after inspecting the v4 replacement: |
Summary
userDataDiras a Chrome flag instead of a chrome-launcher optionFixes #1503
Tests
pnpm --filter @browserbasehq/stagehand-extension buildpnpm --filter @browserbasehq/stagehand buildoxfmt --checkandoxlinton changed TypeScript filesgit diff --check