Skip to content

docs(browser): add custom browser engine and extension support#240

Merged
marcusquinn merged 4 commits intomainfrom
feature/browser-custom-engine-extension-support
Jan 27, 2026
Merged

docs(browser): add custom browser engine and extension support#240
marcusquinn merged 4 commits intomainfrom
feature/browser-custom-engine-extension-support

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 27, 2026

Summary

  • Add custom browser engine support (Brave, Edge, Chrome) documentation across 6 browser automation tool docs
  • Add uBlock Origin extension loading guidance with Brave Shields as a zero-config alternative
  • Update feature matrix with new "Custom browser engine" row

Changes

browser-automation.md (central guide)

  • New "Custom Browser Engine Support" section with per-tool compatibility matrix
  • New "Ad Blocker / Extension Loading" section with uBlock Origin guidance
  • Browser executable paths for macOS, Linux, and Windows
  • First-run preference config (browser-prefs.json) for AI agents to ask users
  • Added "Custom browser engine" row to feature matrix

playwright.md

  • New "Custom Browser Engine" section with launch examples for Brave/Edge/Chrome
  • Persistent context + extension examples (custom browser + uBlock Origin)
  • Browser executable paths table
  • Parallel instances with custom browser example

dev-browser.md

  • New "Custom Browser Engine" section with BROWSER_EXECUTABLE env var
  • Extension installation instructions (uBlock Origin in profile)

stagehand.md

  • New "Custom Browser Engine" section with browserOptions.executablePath
  • uBlock Origin via --load-extension in browserOptions.args

playwriter.md

  • Updated to note Brave/Edge/Chrome compatibility (any Chromium-based browser)
  • Browser-specific installation table with ad blocking notes
  • uBlock Origin mentioned as automatically available if installed

crawl4ai.md

  • New "Custom Browser Engine" section with BrowserConfig examples
  • chrome_channel values: chrome, msedge, brave, chromium
  • browser_path for explicit executable path

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guidance for using custom Chromium-based browsers (Brave, Edge, Chrome) across browser automation tools, including per-tool configuration and persistent-context examples.
    • Provided platform-specific browser executable paths and a first-run preference option to persist browser choices.
    • Expanded extension and ad-blocker guidance (uBlock Origin, Brave Shields), setup workflows, and notes on integration and devtools behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

…nsion (uBlock Origin) support

Document how to use Brave, Edge, and Chrome as custom browser engines
across Playwright, Stagehand, Crawl4AI, dev-browser, and Playwriter.
Add uBlock Origin extension loading guidance and Brave Shields as an
alternative. Include executable paths for macOS, Linux, and Windows.
Update feature matrix with custom browser engine row and add new
comparison tables for browser engine and extension support per tool.
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the documentation for browser automation tools by providing comprehensive guides on integrating custom Chromium-based browsers like Brave, Edge, and Chrome. It also details how to effectively load and manage browser extensions, particularly uBlock Origin, and offers Brave Shields as a built-in ad-blocking alternative. These additions aim to give users greater flexibility and control over their automation environments, improving efficiency and the quality of web interactions by reducing unwanted content.

Highlights

  • Custom Browser Engine Support: Documentation has been added across six browser automation tools to support custom Chromium-based browsers such as Brave, Edge, and Chrome. This includes guidance on configuring executablePath or chrome_channel for various tools.
  • Extension Loading Guidance: Detailed instructions and examples are now available for loading extensions, specifically uBlock Origin, across different tools. Brave Shields is highlighted as a zero-configuration alternative for ad and tracker blocking.
  • Feature Matrix Update: The central browser-automation.md file now includes an updated feature matrix with a new row dedicated to 'Custom browser engine' compatibility for all listed tools.
  • Browser Executable Paths: Comprehensive lists of executable paths for Brave, Edge, and Chrome on macOS, Linux, and Windows have been added to facilitate custom browser configuration.
  • First-Run Preference Configuration: Guidance for AI agents to prompt users for their preferred browser on first use and store this preference in a browser-prefs.json file has been introduced.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

Adds Custom Browser Engine support (Brave, Edge, Chrome) across six browser tool docs, adding executablePath/browser_channel options, platform-specific executable paths, extension and ad‑block guidance (uBlock/Brave Shields), examples for persistent contexts, and a first‑run preference example file.

Changes

Cohort / File(s) Summary
Primary Browser Automation Guide
​.agent/tools/browser/browser-automation.md
New "Custom Browser Engine Support" section: capability matrix, platform-specific executable path table, rationale and trade-offs, first-run preference schema (~/.config/aidevops/browser-prefs.json), uBlock/extension guidance, and per-tool quick reference.
Playwright docs
​.agent/tools/browser/playwright.md
Added Custom Browser Engine coverage: executablePath examples (Brave/Edge/Chrome), persistent-context + extension loading samples, browser executable paths table, Brave Shields notes, and parallel instances example.
Crawl4AI docs
​.agent/tools/browser/crawl4ai.md
Documented BrowserConfig support for Chromium-based browsers, browser_channel values (chrome, msedge, brave, chromium), Brave Shields behavior, sample instantiation snippets, and note that extensions are unsupported.
Dev-browser docs
​.agent/tools/browser/dev-browser.md
Added BROWSER_EXECUTABLE / executablePath guidance, examples for Brave/Edge/Chrome, server vs. launchPersistentContext considerations, and uBlock Origin install‑in‑profile guidance (duplicated section present).
Stagehand docs
​.agent/tools/browser/stagehand.md
Replaced Extensions note with Custom Browser Engine subsection, executablePath examples, --load-extension uBlock Origin usage, and pointer to browser-automation.md for path references.
Playwriter docs
​.agent/tools/browser/playwriter.md
Quick Reference updated to list Chrome/Brave/Edge; extensions/install guidance reworked into a cross‑browser install table and Edge-specific installation footnote.

Sequence Diagram(s)

(omitted — changes are documentation additions and examples, no new multi-component runtime control flow introduced)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🧭 Brave, Edge, Chrome in documented light,
Paths and prefs laid out just right,
Shields and uBlock in a handy frame,
Persistent contexts call each name,
Docs deploy clarity into the night ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(browser): add custom browser engine and extension support' accurately and concisely summarizes the primary changes across all modified documentation files—adding custom browser engine configuration and extension loading guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 02:55:06 UTC 2026: Code review monitoring started
Tue Jan 27 02:55:06 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 02:55:07 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 02:55:09 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 02:56:23 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the documentation by adding comprehensive guides on using custom browser engines and extensions with various automation tools. The new sections are well-structured, detailed, and provide valuable examples. I've identified a few areas for improvement to enhance accuracy and consistency, including correcting a command, clarifying a comment about headless mode, and ensuring code examples are valid standalone snippets. Overall, this is a great addition to the documentation.


```bash
# Clone the uBlock Origin repo
git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin

Choose a reason for hiding this comment

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

high

The git clone command for uBlock Origin points to an incorrect repository. nicedoc/nicedoc.io is a documentation generator, not uBlock Origin. This command will download the wrong source code. The correct repository is https://github.com/gorhill/uBlock. Additionally, cloning the repository requires a build step, which might be complex for users. Consider pointing to the releases page where users can download a pre-built, unpacked version.

Suggested change
git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin
git clone https://github.com/gorhill/uBlock.git ~/.aidevops/extensions/ublock-origin

const context = await chromium.launchPersistentContext(
'/tmp/browser-profile',
{
headless: false, // Extensions require headed mode in Chromium

Choose a reason for hiding this comment

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

medium

The comment // Extensions require headed mode in Chromium is not entirely accurate. Modern versions of Chromium support extensions in the new headless mode (--headless=new), which is the default for Playwright. This comment might mislead users into thinking headed mode is always necessary, which can be less convenient for server-side automation.

Suggested change
headless: false, // Extensions require headed mode in Chromium
headless: false, // Extensions are supported in both headed and headless mode.

Comment on lines 99 to 153
```javascript
import { chromium } from 'playwright';

// Brave - built-in ad/tracker blocking via Shields
const browser = await chromium.launch({
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
headless: true,
});

// Microsoft Edge - enterprise SSO, Azure AD
const browser = await chromium.launch({
executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
headless: true,
});

// Google Chrome - widest extension compatibility
const browser = await chromium.launch({
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
headless: true,
});
```

### Custom Browser with Persistent Context + Extensions

Combine a custom browser engine with extensions (e.g., uBlock Origin):

```javascript
import { chromium } from 'playwright';

// Brave + uBlock Origin (Brave Shields may make uBlock redundant)
const context = await chromium.launchPersistentContext(
'/tmp/brave-profile',
{
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
headless: false, // Extensions require headed mode in Chromium
args: [
'--load-extension=/path/to/ublock-origin-unpacked',
'--disable-extensions-except=/path/to/ublock-origin-unpacked',
],
}
);

// Edge + uBlock Origin
const context = await chromium.launchPersistentContext(
'/tmp/edge-profile',
{
executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
headless: false,
args: [
'--load-extension=/path/to/ublock-origin-unpacked',
'--disable-extensions-except=/path/to/ublock-origin-unpacked',
],
}
);
```

Choose a reason for hiding this comment

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

medium

The code examples in this section redeclare const variables (browser on lines 103, 109, 115, and context on lines 129, 142). This makes the code blocks invalid if copied and pasted directly, as it would cause a SyntaxError. To improve the user experience, please ensure each example is a valid, standalone snippet. You could achieve this by using different variable names for each example or by separating them into distinct code blocks.

'/tmp/brave-profile',
{
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
headless: false, // Extensions require headed mode in Chromium

Choose a reason for hiding this comment

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

medium

The comment // Extensions require headed mode in Chromium is not always true. Modern versions of Chromium support extensions in the new headless mode (--headless=new), which Playwright uses by default. This could cause users to avoid headless mode when it would actually work fine for their use case.

Suggested change
headless: false, // Extensions require headed mode in Chromium
headless: false, // Extensions are supported in both headed and headless mode.

});
```

### **Custom Browser Engine (Brave, Edge, Chrome)**

Choose a reason for hiding this comment

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

medium

The heading ### **Custom Browser Engine (Brave, Edge, Chrome)** uses extra bolding (**...**) which is inconsistent with the other documentation files in this PR (e.g., playwright.md, dev-browser.md). For consistency across the documentation, it's best to remove the bold markdown.

Suggested change
### **Custom Browser Engine (Brave, Edge, Chrome)**
### Custom Browser Engine (Brave, Edge, Chrome)

Comment on lines 264 to 304
```javascript
// Brave - built-in ad/tracker blocking via Shields
const stagehand = new Stagehand({
env: "LOCAL",
headless: false,
browserOptions: {
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});

// Edge - enterprise SSO, Azure AD integration
const stagehand = new Stagehand({
env: "LOCAL",
headless: false,
browserOptions: {
executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});
```

**With uBlock Origin extension**:

```javascript
const stagehand = new Stagehand({
env: "LOCAL",
headless: false,
browserOptions: {
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
args: [
'--load-extension=/path/to/ublock-origin-unpacked',
'--disable-extensions-except=/path/to/ublock-origin-unpacked',
],
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});
```

Choose a reason for hiding this comment

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

medium

The code examples in this section redeclare the const stagehand variable multiple times (lines 266, 277, 291). This would cause a SyntaxError if the entire code block is copied and run. To make the documentation more robust and user-friendly, please structure these so that each example is a valid, standalone snippet, for example by using unique variable names or separating them into different code blocks.

@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: Expands browser automation docs to cover using non-bundled Chromium browsers and optional ad-blocking setups.
Changes:

  • Added a “Custom browser engine” capability row to the browser tool feature matrix.
  • Documented Playwright/Stagehand/Playwriter/Crawl4AI/dev-browser options for pointing to Brave/Edge/Chrome.
  • Added OS-specific executable path references for common browsers.
  • Added guidance for extension-based ad blocking (uBlock Origin) vs Brave Shields as a no-config alternative.
  • Provided Playwright and Stagehand example snippets for persistent contexts + extension loading.
  • Updated tool-specific docs to keep capabilities and configuration knobs aligned.
Technical Notes: Examples rely on Playwright’s `executablePath`/persistent contexts and note extension loading constraints (typically headed mode). Considerations: Custom engines depend on local browser installs/paths and can affect reproducibility across environments.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

```bash
# Clone the uBlock Origin repo
git clone https://github.com/nicedoc/nicedoc.io ~/.aidevops/extensions/ublock-origin
# Or download from Chrome Web Store and extract the .crx
Copy link

Choose a reason for hiding this comment

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

The "Clone the uBlock Origin repo" command points to github.com/nicedoc/nicedoc.io, which doesn’t look like the uBlock Origin project; readers will likely clone the wrong repository.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


// Microsoft Edge - enterprise SSO, Azure AD
const browser = await chromium.launch({
executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
Copy link

Choose a reason for hiding this comment

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

This snippet redeclares const browser multiple times in the same code block, so it won’t run if someone copy/pastes it as-is.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


// Edge - enterprise SSO, Azure AD integration
const stagehand = new Stagehand({
env: "LOCAL",
Copy link

Choose a reason for hiding this comment

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

This example redeclares const stagehand within the same code block, which will error if copy/pasted as a single snippet.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

| **Chrome** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Install uBlock Origin separately |
| **Brave** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Built-in Shields (no extension needed) |
| **Edge** | [Chrome Web Store](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) | Install uBlock Origin separately |

Copy link

Choose a reason for hiding this comment

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

For Edge, installing from the Chrome Web Store typically requires an extra setting ("Allow extensions from other stores") or using the Edge Add-ons store, so this row may be misleading for Edge users.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In @.agent/tools/browser/browser-automation.md:
- Around line 302-305: In the Playwright table row (the "Playwright
(persistent)" tool entry) update the wording in the "Notes" cell to read
"Requires an unpacked extension + persistent context" instead of "Requires
unpacked extension + persistent context" so it clearly says "an unpacked
extension" and matches the suggested phrasing; locate the cell that currently
contains "Requires unpacked extension + persistent context" and replace that
fragment accordingly.
- Around line 315-321: Replace the incorrect clone URL in the "Getting uBlock
Origin unpacked" instructions: update the git clone target referenced in the
snippet (the line that currently clones "nicedoc/nicedoc.io") to point at the
official uBlock Origin repository ("gorhill/uBlock") so users download the
authentic extension source; modify only the URL in that git clone command and
verify the rest of the paragraph (comments about .crx extraction and using
--load-extension) remains unchanged.

In @.agent/tools/browser/playwright.md:
- Around line 155-163: Update the "Browser Executable Paths" section to clarify
that the listed paths are common default install locations and may vary by
distribution, package manager, or custom install; add a concise note directly
above or below the table (near the "Browser Executable Paths" heading) such as:
"Default paths shown — actual executable locations can vary by OS distribution,
package manager, and custom installs; use your system's package manager or
which/where commands to verify." Reference the table entries (e.g., the
**Brave**, **Edge**, **Chrome**, and **Chromium** rows) so readers know the note
applies to those paths.

In @.agent/tools/browser/playwriter.md:
- Around line 63-72: Update the Edge row in the Playwriter install table (the
Edge table cell) to add a brief footnote or inline note that Edge users must
enable "Allow extensions from other stores" in Edge settings before installing
from the Chrome Web Store; add a short footnote marker (e.g., †) next to the
Edge entry and a one-line footnote below the table explaining the setting and
where to enable it to prevent installation friction.
- Around line 39-42: Update the "Browser compatibility" and "Extensions" text in
.agent/tools/browser/playwriter.md to avoid overstating Edge installs and
password-manager behavior: clarify under the "Browser compatibility" heading
that Edge requires the user to enable "Allow extensions from other stores" in
Edge extension settings to install Playwriter from the Chrome Web Store (it is
not automatic), and under the "Extensions" heading note that password manager
unlock behavior varies by browser and OS (some auto-unlock via OS credentials
while others require explicit device authentication), rather than saying
password managers are already unlocked universally; keep references to
Playwriter and uBlock Origin intact.
🧹 Nitpick comments (6)
.agent/tools/browser/crawl4ai.md (1)

537-580: Replace inline example with authoritative file:line reference.
This inline code block is long and not tied to a canonical implementation. For agent docs, prefer progressive disclosure and a file:line pointer to an authoritative example (or move the example into a dedicated example file, then reference it here). As per coding guidelines, please replace the inline block with a file:line reference to the canonical example.

.agent/tools/browser/dev-browser.md (2)

43-46: Avoid duplicated “Custom browser” guidance.
The quick-reference note and the dedicated section repeat the same guidance. Recommend keeping one and linking to the other for progressive disclosure. As per coding guidelines, please consolidate.


291-323: Swap inline command block for authoritative file:line references.
This is agent documentation; inline shell blocks should be replaced with a pointer to the canonical launch/config implementation (file:line), then a short summary here. As per coding guidelines.

.agent/tools/browser/playwright.md (1)

93-184: Use canonical file:line references instead of inline code blocks.
These examples are extensive and not tied to authoritative source files. For agent docs, prefer progressive disclosure and file:line references to canonical examples (or move these snippets into a dedicated example file and reference them here). As per coding guidelines.

.agent/tools/browser/browser-automation.md (1)

234-296: Move first-run prefs JSON to canonical config + file:line ref.
Inline JSON should point to an authoritative config template (file:line) and keep this section summary-only. As per coding guidelines.

.agent/tools/browser/stagehand.md (1)

260-307: Verify extension support + avoid inline code in agent docs.
Playwright extensions usually require launchPersistentContext. Please verify Stagehand actually supports persistent contexts or forwards browserOptions.args in a way that enables extensions; otherwise this should be marked as experimental or removed. Also replace inline code blocks with file:line references to authoritative examples. As per coding guidelines.

…ment

- Fix headless mode comments: note new headless supports extensions
- Fix const redeclarations: split into separate code blocks (playwright, stagehand)
- Fix uBlock Origin clone URL: use gorhill/uBlock with build instructions
- Fix heading consistency: remove extra bold in stagehand.md
- Add Edge extension store prerequisite footnote (playwriter)
- Add default paths disclaimer note (playwright)
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 13:38:35 UTC 2026: Code review monitoring started
Tue Jan 27 13:38:35 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 13:38:35 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 13:38:37 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 13:40:05 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.agent/tools/browser/browser-automation.md:
- Line 333: Add the same clarifying inline comment to each headless example in
stagehand.md where the option 'headless: false' appears (the examples around the
headless settings at the occurrences corresponding to lines ~246, ~269, ~283,
~297 in the diff); update each 'headless: false' line to include the comment "
// Extensions may require headed mode in older Chromium; new headless
(--headless=new) supports extensions" so the stagehand examples match the
comments used in browser-automation.md and playwright.md.
🧹 Nitpick comments (1)
.agent/tools/browser/playwright.md (1)

176-181: Browser paths table duplicated across files.

The Browser Executable Paths table appears in both playwright.md (lines 176-181) and browser-automation.md (lines 249-271). Consider centralizing this reference in browser-automation.md and pointing to it from tool-specific docs to maintain single-source-of-truth.

Suggested consolidation

In playwright.md, replace the table with:

### Browser Executable Paths

See [browser-automation.md#custom-browser-engine-support](browser-automation.md#custom-browser-engine-support) for platform-specific browser executable paths.

const context = await chromium.launchPersistentContext(
'/tmp/browser-profile',
{
headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the specific line in browser-automation.md
echo "=== Checking browser-automation.md at line 333 ==="
sed -n '330,336p' .agent/tools/browser/browser-automation.md

echo -e "\n=== Searching for headless/extension references ==="
rg -n "headless.*extension|extension.*headless" .agent/tools/browser/*.md -C2

echo -e "\n=== Searching for headed mode references ==="
rg -n "headed mode|headed.*extension" .agent/tools/browser/*.md -C2

echo -e "\n=== Checking if playwright.md and stagehand.md exist ==="
ls -la .agent/tools/browser/*.md

Repository: marcusquinn/aidevops

Length of output: 10162


🏁 Script executed:

#!/bin/bash
# Check if stagehand.md discusses extensions or headless modes
echo "=== Searching stagehand.md for extension content ==="
rg -n "extension" .agent/tools/browser/stagehand.md

echo -e "\n=== Searching stagehand.md for headless references ==="
rg -n "headless" .agent/tools/browser/stagehand.md

echo -e "\n=== Checking stagehand.md for browser launch/context sections ==="
rg -n "launch|context|headless.*false" .agent/tools/browser/stagehand.md -C1

Repository: marcusquinn/aidevops

Length of output: 1982


Add clarifying comment to stagehand.md headless examples for consistency.

The comment about headless extension support is already consistent between browser-automation.md and playwright.md (both have identical inline notes). However, stagehand.md's headless examples (lines 246, 269, 283, 297) lack this clarification despite stagehand using Playwright underneath. Add the same comment to stagehand.md's code examples to prevent user confusion: headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions

🤖 Prompt for AI Agents
In @.agent/tools/browser/browser-automation.md at line 333, Add the same
clarifying inline comment to each headless example in stagehand.md where the
option 'headless: false' appears (the examples around the headless settings at
the occurrences corresponding to lines ~246, ~269, ~283, ~297 in the diff);
update each 'headless: false' line to include the comment " // Extensions may
require headed mode in older Chromium; new headless (--headless=new) supports
extensions" so the stagehand examples match the comments used in
browser-automation.md and playwright.md.

…mples

Address CodeRabbit feedback: add consistent inline comment about
headless extension support to all custom browser examples in stagehand.md,
matching browser-automation.md and playwright.md.
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 13:49:40 UTC 2026: Code review monitoring started
Tue Jan 27 13:49:41 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 13:49:41 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 13:49:43 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 13:50:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.agent/tools/browser/stagehand.md:
- Around line 260-311: Remove the three inline custom browser engine examples
from .agent/tools/browser/stagehand.md and replace them with a single
authoritative cross-reference to
browser-automation.md#custom-browser-engine-support; specifically, delete the
Brave/Edge/Chrome blocks that demonstrate Stagehand({ ..., browserOptions: {
executablePath: ... } }) and instead add a short sentence like "See
browser-automation.md#custom-browser-engine-support for Stagehand-specific
browserOptions (executablePath, args, extensions, enterprise SSO)". Also
consolidate the repeated headless-mode comment (the lines referencing headed vs
new headless support) into one brief note placed before the reference or remove
it if that info exists in the referenced section; ensure references mention
Stagehand, browserOptions, and executablePath so readers can locate the exact
config example in the authoritative doc.

Comment on lines 260 to 311
### Custom Browser Engine (Brave, Edge, Chrome)

Stagehand uses Playwright underneath, so you can pass `executablePath` via `browserOptions` to use a custom browser:

**Brave** - built-in ad/tracker blocking via Shields:

```javascript
const stagehand = new Stagehand({
env: "LOCAL",
headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions
browserOptions: {
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});
```

**Edge** - enterprise SSO, Azure AD integration:

```javascript
const stagehand = new Stagehand({
env: "LOCAL",
headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions
browserOptions: {
executablePath: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});
```

**With uBlock Origin extension**:

```javascript
const stagehand = new Stagehand({
env: "LOCAL",
headless: false, // Extensions may require headed mode in older Chromium; new headless (--headless=new) supports extensions
browserOptions: {
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
args: [
'--load-extension=/path/to/ublock-origin-unpacked',
'--disable-extensions-except=/path/to/ublock-origin-unpacked',
],
},
modelName: "gpt-4o",
modelClientOptions: { apiKey: process.env.OPENAI_API_KEY }
});
```

**Browser paths**: See `browser-automation.md` for full path reference (macOS, Linux, Windows).

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Search for Stagehand example files or implementation files
fd -E node_modules -E dist "stagehand" -t f | head -20

Repository: marcusquinn/aidevops

Length of output: 603


🏁 Script executed:

# Search for files containing executablePath configuration examples
rg -l "executablePath" --type md --type js --type ts

Repository: marcusquinn/aidevops

Length of output: 211


🏁 Script executed:

# Check browser-automation.md to see what it references
fd "browser-automation.md" -t f | xargs cat

Repository: marcusquinn/aidevops

Length of output: 30476


🏁 Script executed:

# Look for any example or demo files in the agent directories
find .agent -name "*example*" -o -name "*demo*" -o -name "*sample*" 2>/dev/null

Repository: marcusquinn/aidevops

Length of output: 142


🏁 Script executed:

# Check the full structure of .agent/tools/browser directory
ls -la .agent/tools/browser/ 2>/dev/null || echo "Directory not found"

Repository: marcusquinn/aidevops

Length of output: 1921


🏁 Script executed:

cat -n .agent/tools/browser/stagehand-examples.md | head -100

Repository: marcusquinn/aidevops

Length of output: 3770


🏁 Script executed:

# Search for executablePath or custom browser examples in stagehand-examples.md
rg "executablePath|Brave|Edge|Chrome" .agent/tools/browser/stagehand-examples.md -A 3 -B 1

Repository: marcusquinn/aidevops

Length of output: 387


🏁 Script executed:

# Check if browser-automation.md contains similar custom browser engine examples
rg "executablePath|Custom Browser Engine|Brave|Edge" .agent/tools/browser/browser-automation.md -A 5 -B 2 | head -80

Repository: marcusquinn/aidevops

Length of output: 4394


Move custom browser engine examples to .agent/tools/browser/browser-automation.md and reference from stagehand.md instead.

The coding guidelines require inline code examples to be "authoritative" or use file:line references. These three examples (Brave, Edge, Chrome with executablePath) are illustrative configurations already documented in browser-automation.md:355-430 under "Custom Browser Engine Support."

Instead of duplicating ~45 lines inline, stagehand.md should reference the authoritative section: "See browser-automation.md#custom-browser-engine-support for Stagehand-specific browserOptions configuration with browser paths and enterprise integration patterns."

Additionally, the identical headless mode comments (lines 269, 283, 297) should be consolidated into a single note before the examples, or removed entirely if referencing the external section.

This follows the progressive disclosure pattern and keeps configuration patterns synchronized across documentation.

🤖 Prompt for AI Agents
In @.agent/tools/browser/stagehand.md around lines 260 - 311, Remove the three
inline custom browser engine examples from .agent/tools/browser/stagehand.md and
replace them with a single authoritative cross-reference to
browser-automation.md#custom-browser-engine-support; specifically, delete the
Brave/Edge/Chrome blocks that demonstrate Stagehand({ ..., browserOptions: {
executablePath: ... } }) and instead add a short sentence like "See
browser-automation.md#custom-browser-engine-support for Stagehand-specific
browserOptions (executablePath, args, extensions, enterprise SSO)". Also
consolidate the repeated headless-mode comment (the lines referencing headed vs
new headless support) into one brief note placed before the reference or remove
it if that info exists in the referenced section; ensure references mention
Stagehand, browserOptions, and executablePath so readers can locate the exact
config example in the authoritative doc.

Replace three separate Brave/Edge/Chrome examples with one consolidated
example and cross-reference to browser-automation.md for full paths and
additional browsers. Follows progressive disclosure pattern.
@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 457 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 27 13:56:16 UTC 2026: Code review monitoring started
Tue Jan 27 13:56:17 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 457
Tue Jan 27 13:56:17 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 27 13:56:19 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 457
  • VULNERABILITIES: 0

Generated on: Tue Jan 27 13:57:46 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn merged commit bb30985 into main Jan 27, 2026
9 checks passed
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.

1 participant