BrowserCat - Official docs (browsercat.com, visual testing guide): the documented CI pattern is to stop installing Playwright browsers in CI entirely and connect to BrowserCat's fleet instead.

## The fix

The documented BrowserCat CI setup:

1. Store the API key as a CI secret (BROWSERCAT_API_KEY).
2. In playwright.config.ts:

const useBC = !!process.env.BROWSERCAT_API_KEY;
export default defineConfig({
  workers: useBC ? 10 : 1,
  retries: useBC ? 2 : 0,
  use: {
    connectOptions: useBC ? {
      wsEndpoint: 'wss://api.browsercat.com/connect',
      headers: { 'Api-Key': process.env.BROWSERCAT_API_KEY },
    } : undefined,
  },
});

3. Remove the browser-install step from the pipeline.

Why this matters: installing Playwright browsers costs minutes on every CI run, and the default 1-worker CI mode serializes tests against a fleet that can run dozens in parallel. Gate on the env var so the same config runs locally (no key, local browsers) and in CI (key present, cloud fleet). Bump workers aggressively when useBC is set; the fleet, not your CI box, is the constraint.

Thread: docs:browsercat:ci-visual-testing