Control, debug, and test live All API Hub extension UI on desktop or Android Firefox, Edge, and Lemur, including installed release diagnostics and development hot updates via CDP/RDP.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Live Extension Ui Automation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/qixing-jk-live-extension-ui-automation)
---
name: live-extension-ui-automation
description: Control, debug, and test live All API Hub extension UI on desktop or Android Firefox, Edge, and Lemur, including installed release diagnostics and development hot updates via CDP/RDP.
---
# Live Extension UI Automation
## Core principle
Automate and test the development browser extension UI against real accounts and logged-in states without closing or disturbing the user's daily primary browser.
For desktop extension testing, prefer an independent CDP browser with the current worktree's verified build. Reuse an authenticated target session; when login exists only in the daily browser, prioritize authorized, site-scoped authentication transfer using [session assessment and reuse](references/session-reuse.md). Use the daily Edge Playwright bridge for website inspection and session reads. Its attachment does not establish control of another extension's pages, worker, popup or side panel. Diagnose CDP and transfer failures before explaining a concrete remaining blocker and alternatives such as computer use or interactive login. Keep a specifically requested installed-release diagnosis on its requested target and label any development reproduction separately.
Default to **extension-led UI acceptance** after website session preparation: start at the ordinary extension entrypoint and let the product identify the site/account, acquire credentials, discover capabilities, save and execute. Do not replace these steps with seeded extension accounts, injected detection evidence, forced site/method selections, runtime messages or direct API calls. Authorized website authentication transfer is setup, must be recorded, and requires source/target identity verification; it does not prove the extension's own login or credential-acquisition behavior. Preserve original session conditions for first-contact, expired-session and login-recovery tests. Existing saved-account, protocol and synthetic-fixture checks remain useful for explicitly scoped diagnostics; label them accordingly and do not count them as normal onboarding acceptance. Passive network observation and visible DOM inspection may corroborate UI outcomes.
Native website login, OAuth consent, token creation and security verification are part of this UI path. Automate their real controls, using shared env login inputs when needed; reading a credential displayed by the website and filling the extension's normal field is allowed. A product label such as “Enter an Access Token manually” does not require a human to perform the step. Before declaring credential acquisition blocked, inspect the existing site E2E continuation and reuse its UI helper; exclude any direct-API setup/cleanup it also performs. Env tokens or IDs must not stand in for acquisition/identity discovery being tested; IDs may be assertions against the detected result.
For acceptance, default to exercising all applicable actions and state branches in the scoped workflow. Before browser execution, follow [coverage before execution and closure](../add-site-integration/references/evidence-and-validation.md#coverage-before-execution): derive the inventory independently of the existing script, execute available authorized cases, and account for every untested row. Generic smoke, representative screenshots and a green selected suite do not establish complete coverage. Read-only diagnosis stays read-only; coverage adds no mutation authority.
Apply this to every UI acceptance task, including settings, permissions, popup/sidepanel, imports/exports, models, account/key workflows and Android CDP/RDP, not only new site integrations. Use the [shared execution and reporting contract](../../../e2e/README.md#reusable-cdp-ui-checks) for maintained runners: derive `all` from registered suites, reject unknown selections, retain skipped/blocked/unselected coverage and both execution/cleanup errors, and preserve each run's report. A successful focused run proves only its asserted scope; neither all registered suites nor a successful device connection establishes complete product acceptance. Do not expand read-only or explicit-write modes to satisfy coverage.
## Changes to shared interactive controls
Before replacing, relocating, or simplifying an existing action, record its request/selection effects and enabled state in each reachable state. Exercise the original action after failure and after successful recovery; a status message or replacement button does not establish that the original control still works. Preserve current selections and known options where the workflow permits retries, and distinguish failed requests, successful empty results, and searches with no matches.
When a user requests complete before/after evidence, capture a matched state matrix from verified earlier and final source builds using the same fixture, viewport, locale, theme and interaction state. Include closed and open controls, surrounding actions and readable local crops; include loading with existing data, empty, success, failure, detailed diagnostics, search with no matches and manual selection when applicable. Pair every applicable row in one gallery, assert recovery behavior separately from screenshot generation, and identify unavailable baselines or cases explicitly. Do not substitute a representative screenshot for the requested matrix or infer disabled/enabled behavior from appearance. See [task acceptance](../../../docs/agents/task-acceptance.md).
## Choose the runtime
- **Android phone/tablet, including Firefox, Edge, or Lemur (狐猴):** read [mobile debugging and hot updates](references/mobile-debugging.md). Use the unified `scripts/mobile-browser.mjs` entrypoint for discovery, diagnostics, and development sessions. Diagnose the installed release when that is the user's goal; do not replace it with a dev build merely to obtain execution access.
- **Desktop Chromium:** use the profile and CDP workflow below. Its build, profile-sync, and launcher steps do not apply to Android.
## Desktop Chromium
Chromium blocks `--remote-debugging-port` on the system default user data directory. CDP automation uses a separate profile under the current worktree's `.browser-data/dev-browser`, keeping unrelated tasks' browser state independent. The optional global profile remains at `AllApiHub/dev-browser` for deliberate cross-worktree reuse.
## Window identity
Several debug browsers can be open at once, so the launcher brands the window it starts: the profile name (`AAH <worktree>`, or `AAH dev-browser` for the shared profile) and a per-profile avatar identify it in the window title, profile card and profile picker, the frame gets a stable per-profile tint, and the extension about to be mounted is pinned to the toolbar. A name the user set themselves is kept, and an already installed theme is not replaced.
Chromium reads these files only while starting and rewrites them on exit, so the launcher writes them while the profile is free and pins `--profile-directory` to the profile it branded. Reusing a running browser keeps its existing identity, `--restart` re-applies it, and `--no-identity` skips the branding entirely.
## Worktree and shared dev profiles
By default each worktree uses `.browser-data/dev-browser` with a stable CDP port derived from its path. A temporary worktree carries its browser data with it, and removing the worktree removes that profile. This profile is reused by tasks in the same worktree, so concurrent independent CDP tasks should use distinct worktrees or an explicit `AAH_DEV_PROFILE_DIR`.
Use `pnpm browser:cdp:shared` to select the global `AllApiHub/dev-browser` profile on port 9222 when cross-worktree browser state is needed. Its tabs, installed extensions and cookies are shared; restart or reload can affect another worktree's session. `AAH_DEV_PROFILE_PER_WORKTREE=0` selects the same mode for a CDP runner. `AAH_DEV_PROFILE_DIR` and `CDP_PORT` continue to override the resolved profile and port.
| Goal | Command |
| :--- | :--- |
| Worktree browser (default) | `pnpm browser:cdp` |
| Worktree browser (explicit) | `pnpm browser:cdp:isolate` |
| Shared global browser | `pnpm browser:cdp:shared` |
| Sync into the selected worktree profile | `pnpm browser:sync -- --cookies` |
| Sync into the global profile | `pnpm browser:sync:shared -- --cookies` |
| Env-var equivalents | `AAH_DEV_PROFILE_PER_WORKTREE=0` selects global shared state; explicit `AAH_DEV_PROFILE_DIR` / `CDP_PORT` still win. |
Live suites (`e2e:cdp:*`) compute their default CDP URL from the same resolver. Their default matches `pnpm browser:cdp`; pass `--isolate` only to make that choice explicit. Each worktree profile needs its own login or sync when a live site requires authentication. Existing global profile data remains available through the shared command and is not copied or removed automatically.
### Reclaiming debug profiles
Each worktree profile keeps a full Chromium user data directory, including site data and regenerable caches. `pnpm browser:cdp -- --list` inventories the current worktree profile and global profiles; the maintenance commands above reclaim eligible data.
Deleting a profile also discards its site logins and extension data, so global orphan deletion needs `--prune-profiles`. Cache pruning under `--clean` applies only to closed profiles and skips entries younger than a day. Worktree-local profile data naturally leaves with its checkout; the cleanup command can still prune eligible caches while the checkout exists.
A deleted profile is partly recoverable: account data comes back from `pnpm browser:sync`, and website sessions plus Local Storage from adding `--cookies`, because both copy out of a still-logged-in daily browser. What does not come back is that profile's browsing history, its installed extensions, and any data that was never synced out of it.
## Available Tooling & Commands
All commands are cross-platform (Windows, macOS, Linux) and runnable directly via `pnpm`:
| Command | Script | Description |
| :--- | :--- | :--- |
| `pnpm browser:sync` | `scripts/sync-extension-profile.mjs` | Discovers extension storage sources (`--list`); copies databases only with browsers closed. Website sessions require `--cookies`. |
| `pnpm browser:cdp` | `scripts/launch-cdp-browser.mjs` | Launches (or connects to) this worktree's dedicated debug browser with the current worktree extension mounted. |
| `pnpm browser:cdp:shared` | `scripts/launch-cdp-browser.mjs` | Selects the optional global shared profile on port `9222`. |
| `pnpm browser:cdp -- --list` | `scripts/launch-cdp-browser.mjs` | Inventories every running debug browser (port, profile, PID, mounted worktrees) and every dev profile with its size and whether its checkout still exists. |
| `pnpm browser:cdp -- --stop-browsers` | `scripts/launch-cdp-browser.mjs` | Asks every running debug browser to exit through CDP and waits for it to release its profile. |
| `pnpm browser:cdp -- --clean` | `scripts/launch-cdp-browser.mjs` | Reports the same inventory, then deletes only regenerable caches (`component_crx_cache`, `ProvenanceData`, shader caches) from profiles that are closed. |
| `pnpm browser:cdp -- --prune-profiles` | `scripts/launch-cdp-browser.mjs` | Adds to `--clean` the deletion of *orphaned* profiles — profiles this tooling named whose recorded checkouts have all been deleted. Implies `--clean`. |
| `pnpm e2e:cdp` | `scripts/e2e-cdp-control.mjs` | Connects via CDP, detects the current worktree extension, opens its UI, and automates interactions. |
## Workflow
### 1. Choose the build mode
Use **dev for interactive UI debugging and repeated edits**. Start with `pnpm browser:cdp -- --dev`; the launcher starts WXT in the background and prepares `.output/chrome-mv3-dev`, so a separate `pnpm build` is unnecessary. Explicit `--dev` fails if the development server cannot become ready, preserving the failure for diagnosis instead of automatically falling back to production.
Use **production for final release-like acceptance, production-only failures, or an existing runner that requires `.output/chrome-mv3`**. Launch with `pnpm browser:cdp -- --prod`; reuse an already verified production build when its inputs have not changed. The launcher checks staleness; add `--build` only when a forced rebuild is needed. Switching modes does not itself require rebuilding or restarting the browser. Some site runners hard-code the production path: inspect the selected runner before launching. For repeated UI edits, use exact-path dev discovery as shown below; keep a required production runner as a separate acceptance step.
### 2. Launch, verify, and iterate
```bash
pnpm browser:cdp -- --dev
```
The default `pnpm browser:cdp -- --dev` already uses this worktree's profile and port. Use `pnpm browser:cdp:shared -- --dev` only for intentional global profile reuse. CDP runners share the same resolver; use `AAH_DEV_PROFILE_PER_WORKTREE=0` when selecting the global profile for runners without a `--shared` option.
- **Prioritize Dev Mode (Auto-Spawn)**: By default, the launcher prioritizes the HMR dev mode (`.output/chrome-mv3-dev`). If WXT dev server is not running, it launches it in the background and waits for a server response before loading the extension. Require the rendered Options app separately before driving UI.
- **Actively Suppress Duplicate Browser Windows**: The launcher passes `WXT_OPEN_BROWSER=0` to skip WXT's automatic browser opening on server startup and config restarts. Browser config edits apply on the next manual opening. The built-in runner remains available for `o + Enter` in interactive terminals; see [development commands](../../../docs/development/setup.md#running-the-extension). Dev server logs stream silently to `.scratch/wxt-dev.log`.
- **Dynamic Port & Multi-Worktree**: When multiple worktrees run dev servers concurrently, WXT assigns dynamic ports (`3000`, `3001`, `3002`...). The launcher inspects `.output/chrome-mv3-dev/options.html` and probes the Vite client to bind cleanly to the current worktree's assigned port over IPv4 (`127.0.0.1`).
- **Verify the actual target**: Read the launch log's profile, CDP port, extension path, and dev-server URL. Resolve the extension ID from the expected absolute output path with `findInstalledDevExtension`, then require the Options app to render. A listening port, a Vite response, or the first extension target alone does not prove that the current worktree's UI is ready. The launcher can probe other dev-server ports; verify the server URL embedded in this worktree's `options.html` and that edits reach the selected UI before relying on HMR.
- **Iterate in dev**: Keep WXT running and let UI HMR apply edits; wait for the affected UI state before capturing evidence. For background, content-script, or manifest changes, verify the affected context has reloaded and exercise its behavior. When explicit reload is needed, `pnpm browser:cdp -- --dev --reload` targets the current worktree's installed dev output by exact path, verifies the replacement worker identity and a read-only background message response, and refreshes or restores only that extension's open pages. See [background reload verification](references/desktop-dev-recovery.md#reload-the-selected-background). Reloading the browser extension is not proof that every existing site tab has received updated content scripts.
- **Mode switches**: Verify the newly loaded path and ID after changing modes. Dev and production output paths can receive different extension IDs and therefore separate extension storage even in one browser profile. Inspect the chosen extension's saved accounts and the site's authenticated identity independently; use the normal onboarding or authorized session-reuse flow when needed. An empty dev account list does not establish that website login was lost.
- **Convenience Flags**:
- `pnpm browser:cdp -- --reload`: Reload the current worktree's installed dev extension. Use `--prod --reload` for its installed production extension. Reload does not build, start WXT, or install a missing extension; use the full launch command when the chosen mode is not installed. A missing target or reload failure exits with an error.
- `pnpm browser:cdp -- --stop-dev`: Terminate the background WXT dev server process.
- `pnpm browser:cdp -- --prod`: Force standalone production build mode (`.output/chrome-mv3`).
- `pnpm browser:cdp -- --prod --build`: Force a full production rebuild before launching. Pair `--build` with `--prod`; `--build` alone still prefers dev.
- `pnpm browser:cdp -- --restart`: Terminate the running debug browser and start a fresh instance. Restarting is also what re-applies a window identity that the current instance still lacks.
- `pnpm browser:cdp -- --no-identity`: Leave the profile name, frame tint and toolbar pin untouched, e.g. when inspecting a profile someone else branded.
If dev startup fails or the loaded UI does not receive edits, follow [desktop dev recovery](references/desktop-dev-recovery.md). Switch to production only for a diagnosed remaining blocker or the acceptance cases above, and report that reason and the loaded path rather than claiming dev/HMR verification.
### 3. Verify Session Readiness Before Authenticated Flows
For tests of first-contact WAF, expired sessions, or behavior with no site page open, use [preserving initial session conditions](references/session-reuse.md#preserve-initial-session-conditions) instead of the normal authenticated preflight below.
Checking readiness is required. Reuse a valid target session immediately; otherwise prefer the authorized daily-browser session transfer described above, then the normal website login UI when no applicable transfer works. Compare the target identity with the source and the extension's fresh detected identity; use passively observed identity responses when available. A tab title, saved extension account or Cookie count alone is insufficient. Do not renew or transfer authentication when doing so would bypass the starting condition under test.
If no reusable target or transferable source session is available, automate the available website login with the authorized env credentials or OAuth session. Record a remaining CAPTCHA/consent/login prerequisite explicitly. A target 401 establishes only that the target lacks authentication. Network failures, challenges and identity mismatches require diagnosis rather than a premature login request.
Use [session assessment and reuse](references/session-reuse.md) for the shared preflight helper, origin-scoped live transfer and offline sync commands. Request manual login only after authorized sources and applicable transfer methods have been checked and found unusable. Report missing evidence as uninspected, not unavailable, and do not replace an authenticated but mismatched account silently.
### 4. Automate and Verify the Extension UI
For an optional general connectivity check, run the smoke runner with its default worktree profile:
```bash
pnpm e2e:cdp
```
This smoke runner uses title-based discovery. Use the exact-path pattern below for mode-specific evidence, especially when dev and production extensions coexist; it replaces this optional smoke step rather than requiring both.
### CDP cleanup
Before attaching, determine whether the browser is already running. Record the PID, port and profile if this task launches a browser for its exclusive use. A per-worktree profile can already be in use by another task. Track the actual handles of temporary pages and popups created by this run.
On success, failure or a blocked run, close the tracked disposable pages and verify they are closed. Keep pre-existing pages, user drafts and pages needed for follow-up. Use the [scenario cleanup helper](../../../e2e/README.md#reusable-cdp-ui-checks) in maintained runners to attempt each cleanup step and report cleanup errors alongside execution errors.
When a browser started exclusively for this run is no longer needed, recheck its PID, port and profile, send `Browser.close` on its browser-level CDP session, and verify that the process exited. Keep the profile for reuse. For a browser that stays open, including any shared or pre-existing browser, use `dev.close()` to detach Playwright. The default browser context and its tabs can outlive that connection. Use the read-only `pnpm browser:cdp -- --list` to check existing windows, and reserve `--stop-browsers` for explicitly requested global maintenance. In the handoff, identify any pages or browser left open by the run and why.
### 5. Authoring Custom Automated E2E/CDP Tests
Two Playwright traps cost real time when driving these pages, so handle them deliberately:
- `page.goto()` that differs only by hash is an intra-document navigation: it bypasses the app's router and leaves the Options content area blank. When the page is already on the target document, set `location.hash` instead (and wait for the rendered shell).
- `locator.isVisible({ timeout })` ignores the timeout and returns a snapshot; a route that has not rendered yet reads as "absent". Use `waitFor({ state: "visible", timeout })` for any readiness assertion.
- A dev-mode Options page compiles the whole module graph on first paint and keeps an HMR connection open, so the default 30s navigation budget and the `load` event are both unreliable. Navigate with `waitUntil: "domcontentloaded"` and a larger timeout.
When implementing a new feature or reproducing UI bugs, author or extend a CDP automation script following this pattern:
```javascript
import path from "node:path"
import { runScenarioWithCleanup } from "./e2e/utils/scenarioErrors.ts"
import { findInstalledDevExtension } from "./scripts/cdp/browser-runtime.mjs"
import {
connectDevBrowser,
connectExtensionById,
} from "./scripts/cdp/client.mjs"
import { applyIsolateFlag } from "./scripts/cdp/dev-profile.mjs"
import { loadLocalEnv } from "./scripts/utils/local-env.mjs"
// Imports assume a repo-root script; adjust relative paths for a runner under scripts/.
await loadLocalEnv()
applyIsolateFlag(process.argv)
// 1. Pin the current worktree's chosen mode, even with multiple extensions installed.
const extensionDir = path.resolve(".output/chrome-mv3-dev")
const discovery = await connectDevBrowser()
let extensionId
try {
extensionId = await findInstalledDevExtension(discovery.browser, extensionDir)
} finally {
await discovery.close()
}
const dev = await connectExtensionById({ extensionId })
let page
await runScenarioWithCleanup({
run: async () => {
// 2. Open the extension entrypoint and stabilize transitions.
page = await dev.context.newPage()
await page.emulateMedia({ reducedMotion: "reduce" })
await page.goto(`chrome-extension://${extensionId}/options.html#account`)
await page.waitForLoadState("domcontentloaded")
// 3. Wait for the rendered controls before interacting.
const root = page.locator('[data-testid="options-app"]')
await root.waitFor({ state: "visible", timeout: 10000 })
const target = page.getByTestId("account-management-add-account-button")
await target.waitFor({ state: "visible", timeout: 8000 })
await target.click()
// Look up the dialog from the page because Radix renders it in a portal.
const dialog = page.getByTestId("account-management-account-dialog")
await dialog.waitFor({ state: "visible", timeout: 10000 })
// 4. Continue through Auto Detect, native credential guidance, and Save.
// Reopen the saved account through its row action and assert persisted fields.
// Use the extension's own capability-detection and execution controls.
// Expected site/method IDs are assertions, never values forced into the draft.
},
finalizers: [
async () => {
await page?.close()
},
() => dev.close(),
],
cleanupMessage: "CDP cleanup failed",
failureMessage: "CDP scenario and cleanup failed",
})
```
## Account onboarding validation
For account integrations, use the authentication and guidance contract in [account sites](../add-site-integration/references/account-sites.md#complete-automatic-onboarding). Drive a fresh add-account form with its normal authentication default through automatic detection, any credential guidance, verification, save, and refresh. Manually preselecting another method or pre-seeding a saved account only validates that alternate path; it does not establish that ordinary onboarding works.
When credentials require user interaction, assert that detection preserves the discovered account context, offers the official acquisition page and a clear return/paste action, and reaches an actionable state. Exercise the persistent UI handoff when starting from a popup. Record the authentication mode and starting state in the reusable runner's evidence. If the credential is unavailable, validate the guide independently and report save/refresh as unverified; do not count a successful Cookie fallback as proof of the preferred token path.
New API token/security UI is shared by [`newApiAccountRecovery.ts`](../../../e2e/utils/realSite/newApiAccountRecovery.ts) and [`new-api-token-ui.mjs`](../../../scripts/flows/new-api-token-ui.mjs). The UI helper contains no direct-API cleanup; its caller owns resource retention/removal. Use [`e2e:cdp:checkin-ui`](../../../e2e/README.md#extension-led-check-in-acceptance) for Xingya/Runanytime normal onboarding. Its synthetic configuration sibling does not prove this path.
For automatic check-in acceptance, assert the automatic selection before saving and after reopening; exercise the actual detect/re-detect control without choosing the expected method, and wait for this attempt's completion feedback. Follow offered account login configuration through its normal controls when session check-in needs it, using the authorized credentials or OAuth provider; verify persistence and preserve the automatically discovered check-in selection. Verify account-scoped execution and repeat behavior through UI results. Keep first grant, already-checked skip, native PoW/CAPTCHA and login recovery separate in the coverage record. An already-checked account cannot pass the first-grant or PoW case; report it incomplete and wait for a natural eligible account/day, never reset dates or status. Preserve failed attempts and both execution/cleanup errors; do not turn a partial live run into a full-pass summary.
## Native resource editor readiness
For native resource editors, a visible modal may still contain only the opening/loading shell while fresh provider data is fetched. Wait for an always-present field from the accepted editor before reading values or asserting secret retention, with a bounded timeout suitable for live provider requests. Modal visibility alone and the default short DOM assertion timeout do not establish that the editor has loaded; avoid replacing this check with a fixed sleep. Once the editor is ready, a missing conditional control may indicate an incomplete detail projection or incorrect visibility state; compare the saved configuration and controlling value before increasing timeouts or forcing the control visible.
## Developer image previews
For UI visual regression capture, stabilization, and side-by-side result presentation, follow [UI visual evidence and capture guidelines](references/ui-visual-evidence.md):
- **Component focus with context**: Target the immediate semantic parent (e.g. table row `tr`, card `.card`, action group, or dialog section) at natural pixel scale instead of full-page viewports (which shrink details to unreadable thumbnails) or micro-cropped icons (which strip spatial context).
- **Stabilization & waiting**: Never rely on static sleeps. Wait explicitly for element visibility (`waitFor({ state: "visible" })`). Freeze Framer Motion transitions (`emulateMedia({ reducedMotion: "reduce" })` and `animations: "disabled"`).
- **Side-by-side composite stitching**: Stitch Before (left, amber/red label) and After (right, emerald/green label) into single composite images (`[BEFORE | AFTER]`) using `pnpm visual:compare` or image compositing, avoiding detached files. For multi-surface updates, provide consolidated Markdown reports or standalone HTML galleries.
For deterministic Playwright workflows, use `pnpm visual:capture --help` and the [generic capture/comparison workflow](../../../docs/development/visual-evidence.md#local-screenshot-comparison). Select an existing test via `--spec --grep --fixture` and add opt-in `captureVisualViews` checkpoints; optional `--view` settings control dimensions/themes. No registry entry is needed for new surfaces; `--list` exposes maintained hotspot shortcuts. This runner handles current-worktree build validation, capture, metadata and optional baseline pairing in temporary browser profiles. It does not replace authenticated site-specific CDP workflows or add automatic image inspection.
For site adaptation or a requested visual handoff, follow [visual previews](../add-site-integration/references/visual-previews.md). Persist screenshots at meaningful asserted states in the site-specific runner. The task acceptance inventory owns which final cases need manual inspection; reuse valid unchanged review during small refinements. Local developer evidence is raw and unmasked by default, lives outside Git, and uses the shared [evidence storage rules](../add-site-integration/references/evidence-and-validation.md#retain-evidence-while-discovering-it). Keep automatic CI/real-site capture settings unchanged; report missing live access or image-rendering limitations explicitly.
For branch-wide or multi-turn visual review, follow the [maintained reviewer entry point](../../../docs/agents/task-acceptance.md#maintain-one-reviewer-entry-point): keep the fixed branch baseline, update one report organized by affected product area, capture complete related panels with readable focused views, and record manual review separately from generated evidence. Use `AAH_VISUAL_CAPTURE_CONTEXT=1` when existing checkpoints capture only a focused element; capture additional scrolling states explicitly. Per-run reports remain supporting evidence under that entry point.
## Multi-Worktree Conventions
1. **Worktree Profile**: CDP stores the default profile under `.browser-data/dev-browser` in the current checkout and derives a stable port from that path. Tasks within the worktree reuse its account and site state.
2. **Optional Shared Profile**: `pnpm browser:cdp:shared` selects `%LOCALAPPDATA%\AllApiHub\dev-browser` on Windows or `~/Library/Application Support/AllApiHub/dev-browser` on macOS. Use `AAH_DEV_PROFILE_PER_WORKTREE=0` for compatible runners without a `--shared` flag.
3. **Current Branch Targeting**: The smoke runner's title matching is a best-effort discovery heuristic. Exact-path discovery followed by ID-pinned connection establishes the selected worktree and mode when multiple extensions are mounted.