feat(ph-ai): browser use mode
Problem
Adding browser automation capabilities to the AI assistant, allowing it to interact with websites through a headless browser to help users test user flows, reproduce bugs, and provide UX feedback.
Changes
- Added a new
browser_useagent mode that enables browser automation capabilities - Implemented
BrowserNavigateToolfor navigating to websites - Added support for Anthropic's native
computertool for browser interactions (clicking, typing, scrolling, etc.) - Created
BrowserSessionManagerto manage browser sessions using Hyperbrowser - Added automatic cleanup of browser sessions when conversations end
- Added feature flag
phai-browser-useto control access to the new functionality - Updated UI to support displaying screenshots and browser interactions
How did you test this code?
Local + tests TBD
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
- #43070
👈 (View in Graphite) - #42909
: 1 other dependent PR (#43062
) - #42697

- #42696

- #42060

- #42052
: 1 other dependent PR (#42704
) - #42888

master
This stack of pull requests is managed by Graphite. Learn more about stacking.
Wiz Scan Summary
⚠️ Many findings detected
Many findings were detected, but only a subset of the findings are displayed inline due to API constraints. To view all findings inline, please click here.
| Scanner | Findings |
|---|---|
| 22 |
|
| 1 |
|
| - | |
| - | |
| - | |
| Total | 22 |
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.
Visual regression: Storybook UI snapshots updated
Changes: 2 snapshots (2 modified, 0 added, 0 deleted)
What this means:
- Snapshots have been automatically updated to match current rendering
- Next CI run will switch to CHECK mode to verify stability
- If snapshots change again, CHECK mode will fail (indicates flapping)
Next steps:
- Review the changes to ensure they're intentional
- Approve if changes match your expectations
- If unexpected, investigate component rendering