@seybel/breakhound 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +19 -333
  2. package/dist/cli.js +21 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -16,11 +16,8 @@ breakhound 1.0.0 · 14 pages · 320–1920px
16
16
  ✖ /pricing 2 issues · layout changes at 768, 1024 4.1s
17
17
  ✔ /about clean · layout changes at 640, 1024 3.2s
18
18
  ✖ /blog/[slug] 1 issue · layout changes at 768 3.8s as /blog/hello-world
19
- ○ /dashboard Needs a login: it redirected to /login
20
19
  ...
21
20
 
22
- 3 issues on 2 pages
23
-
24
21
  ✖ error 320–599px Page scrolls horizontally (280px wider than the viewport)
25
22
  div.pricing-table · /pricing
26
23
  → It stays 600px wide no matter the screen size. Replace the fixed width
@@ -30,11 +27,8 @@ breakhound 1.0.0 · 14 pages · 320–1920px
30
27
  → Collapse this row into a menu below this width, tighten its spacing, or
31
28
  let it scroll sideways.
32
29
 
33
- ○ 1 page needs a login. Run npx @seybel/breakhound login once to sign in, then scan again.
34
-
35
30
  Report .breakhound/report.html (npx @seybel/breakhound report to open it)
36
- Fix it npx @seybel/breakhound prompt --copy then paste into your coding agent
37
- or npx @seybel/breakhound mcp install so your agent can scan, verify and undo by itself
31
+ Fix it npx @seybel/breakhound mcp install so your agent can scan, verify and undo by itself
38
32
  ```
39
33
 
40
34
  ## Quick start
@@ -45,357 +39,49 @@ In your project folder:
45
39
  npx @seybel/breakhound
46
40
  ```
47
41
 
48
- That's it: no config. npx runs it without installing anything. To type `breakhound` directly instead, install it globally:
49
-
50
- ```bash
51
- npm i -g @seybel/breakhound
52
- ```
53
-
54
- Or add it to your project with `npm i -D @seybel/breakhound`, so everyone gets the same version, and run it as `npx breakhound` or from an npm script.
55
-
56
- If your dev server is already running it's used, otherwise breakhound starts it with your `dev` script and stops it when done. Chromium is downloaded automatically the first time (about 150 MB).
57
-
58
- Other ways to run it:
59
-
60
- ```bash
61
- npx @seybel/breakhound /pricing /blog # only these routes
62
- npx @seybel/breakhound http://localhost:3000 # just this one page
63
- npx @seybel/breakhound --url https://staging.example.com # every route, on another server
64
- ```
65
-
66
- ## Finding routes
67
-
68
- | Project | Where routes come from |
69
- |---|---|
70
- | Next.js (App and Pages Router) | `app/` and `pages/`, skipping route groups, parallel slots, private folders and API routes |
71
- | Nuxt | the live Vue router, so module and custom routes count too (falls back to `pages/`) |
72
- | SvelteKit | `src/routes` |
73
- | Astro | `src/pages` |
74
- | Remix, React Router 7 | the route manifest, `app/routes.ts` and `app/routes/` |
75
- | TanStack Router | `routeTree.gen.ts` and the live router |
76
- | React Router (code-defined) | the live route tree, including `<Routes>` nested inside pages; falls back to reading your router code |
77
- | Vue Router (code-defined) | the live router; falls back to reading your router code |
78
- | Angular | your route definitions, from `src/main.ts` on, with lazily loaded `loadChildren` routes under their path |
79
- | Anything else | links followed from the home page (up to 50 pages, a few per section) |
80
-
81
- **Dynamic routes** like `/blog/[slug]` are scanned once, using a real link found on your pages (routes that share a template share a layout). Routes below one reuse its values: once `/users/jane` is found, `/users/[username]/settings` is scanned as `/users/jane/settings`. If something is still missing, it's listed with a hint naming the parameters. Give them a real value once, by name, and every route that uses them is filled in:
82
-
83
- ```ts
84
- params: { username: 'jane', orderId: '1001' }
85
- ```
86
-
87
- Or give one route its own URL, which wins over `params`:
88
-
89
- ```ts
90
- samples: { '/products/[id]': '/products/42' }
91
- ```
92
-
93
- **Pages behind a login** are spotted (they redirect to a sign-in page) and listed instead of scanning the login page over and over. Sign in once:
94
-
95
- ```bash
96
- npx @seybel/breakhound login
97
- ```
98
-
99
- A browser window opens; log in as you normally would, then press Enter. The session is saved to `.breakhound/auth.json`, which is never committed (see below), and used by later scans. breakhound never sees your password.
100
-
101
- Links that would log you out, delete something, or download a file are never followed.
102
-
103
- ## What it checks
104
-
105
- | Check | Finds |
106
- |---|---|
107
- | `page-overflow` | Anything that makes the page scroll sideways, or gets cut off at the screen edge (including inside full-width wrappers) |
108
- | `content-overflow` | Content spilling out of a card, panel or bordered box, sideways or out of the bottom of a fixed-height box |
109
- | `media-overflow` | Images, video and embeds that don't shrink with their container |
110
- | `overlap` | Content painted on top of other content |
111
- | `unexpected-wrap` | Nav rows and button labels breaking onto extra lines |
112
- | `clipped-text` | Text cut off, or pushed out of sight, by a fixed-size container at narrower widths |
113
- | `squished-text` | Columns so narrow that words break apart |
114
- | `distorted-media` | Images stretched or squashed out of proportion |
115
- | `small-tap-target` | Buttons and links under 24×24px that crowd each other on touch screens (WCAG 2.2) |
116
- | `tiny-text` | Text under 12px on phones |
117
- | `oversized-text` | Headings and display text left at their desktop size on phones, wrapping a word or two a line |
118
- | `edge-gutter` | Text pressed against the edge of a phone screen |
119
- | `viewport-meta` | A missing responsive viewport tag |
120
-
121
- Every issue comes with the exact width ranges where it happens, the element to blame, the numbers behind it, a screenshot, and a likely fix. breakhound also reports the widths where your layout actually changes and flags changes that no media or container query explains.
122
-
123
- It's built to be quiet: carousels, off-canvas menus, badges, decorative shapes, ellipsis and line-clamp, and framework dev overlays are all understood and left alone. It also looks inside web components (open shadow roots) and handles right-to-left pages.
124
-
125
- ### Safari and Firefox
126
-
127
- Chromium finds most layout bugs, but Safari and Firefox lay some things out differently (flex gaps, `dvh` units, form controls, font metrics). `--browsers chromium,webkit,firefox` checks the pages again in WebKit (Safari's engine) and Firefox once Chromium is done, one browser at a time so memory stays flat. An issue that shows up in only some of them says so: `(only in WebKit)`. Each extra browser is a one-time download of about 80 to 90 MB, done on first use or ahead of time with `npx @seybel/breakhound install webkit firefox`.
128
-
129
- Two differences you'll meet early: Safari gives buttons, inputs and selects an 11px font unless you set one (Chrome and Firefox use about 13px), so unstyled controls show up as tiny text only in WebKit, with `font: inherit` as the fix (that's WebKit on a Mac: Playwright's WebKit on Linux, as in most CI, draws them like Chrome); and Firefox breaks long URLs at their slashes, so a URL that pushes the page wide in Chrome and Safari can wrap fine in Firefox.
130
-
131
- ### Menus, dialogs, tabs and expandable sections
132
-
133
- A lot of what breaks on a phone is hidden until you tap: the mobile menu, a sign-up modal, an FAQ answer, the second tab. After scanning a page as it loads, breakhound opens what it finds there one at a time and sweeps the widths where each can be opened. That covers buttons with `aria-expanded`, `<details>`, popovers, dialogs, tabs (`role="tab"`, as in Radix, shadcn/ui, Headless UI and MUI), Bootstrap toggles, and buttons that are clearly a menu (`hamburger`, `menu-toggle`, an accessible name of "Menu"). Only what breaks while something is open gets reported, with what to open first:
134
-
135
- ```
136
- ✖ 320–399px Page scrolls horizontally (80px wider than the viewport), with "Menu" open
137
- ```
138
-
139
- It never clicks a link to another page or a button that submits a form, and it opens only one question of an FAQ, since they all share a layout, but every tab, since each shows something different. It opens up to 5 per page. Set `states` to change that, or `--no-states` (or `data-breakhound-ignore="states"` on an element) to leave them closed.
140
-
141
- ### A second opinion from a vision model (optional)
142
-
143
- Rules can't tell when a layout is merely cramped or awkward. `--vision` shows each page at 375, 768 and 1280px to your own vision model (an Anthropic or OpenAI key, or a local Ollama model such as `qwen2.5vl`, set up the same way as `breakhound fix`) and adds what it says looks off. Those come in as info, tied to the element whose text the model quotes, and never fail a run. Verify leaves them out, since an opinion can't be measured again.
144
-
145
- ## Reports
42
+ No config needed. It works with Next.js, Nuxt, SvelteKit, Astro, Remix, React Router, TanStack Router, Vue, Angular and plain Vite apps, at the root of a monorepo too, and follows links on anything else. Chromium downloads the first time (about 150 MB).
146
43
 
147
- Every run writes to `.breakhound/`:
44
+ To type `breakhound` on its own, install it globally with `npm i -g @seybel/breakhound`, or add it to your project with `npm i -D @seybel/breakhound`.
148
45
 
149
- | File | What it is |
150
- |---|---|
151
- | `report.html` | Self-contained report: width map, filters, screenshots, copy buttons. Open it with `breakhound report`. |
152
- | `summary.md` | One line per issue |
153
- | `report.md` | Every issue with evidence and screenshots |
154
- | `prompt.md` | Instructions for a coding agent |
155
- | `result.json` | The raw result |
156
- | `report.pdf` | With `--pdf` |
46
+ ## What it finds
157
47
 
158
- The folder is for you, not your repo, so it keeps itself out of git: breakhound puts a `.gitignore` inside it that ignores everything there, the way tool caches like `.pytest_cache` do. Nothing to add to your own `.gitignore`, and breakhound never edits it. To commit a report anyway, edit or delete that inner `.gitignore`; breakhound only writes it when it's missing.
48
+ Pages that scroll sideways, content spilling out of its box, media that doesn't shrink, overlapping content, nav rows and labels that wrap, clipped and squished text, text too small or too big for phones, small tap targets, distorted images, text against the screen edge, and a missing viewport tag.
159
49
 
160
- ## Chrome extension
50
+ Every issue comes with the exact widths where it happens, the element to blame, the numbers behind it, a screenshot, and a likely fix. It also opens menus, dialogs, tabs and accordions and checks them open, can check Safari's and Firefox's engines too, and is built to stay quiet on carousels, off-canvas menus and other patterns that only look wrong. [All the checks →](https://seybel.github.io/breakhound/guide/checks)
161
51
 
162
- The breakhound extension runs the same checks on the tab you have open, with nothing to install in your project. Get it from the [Chrome Web Store](https://chromewebstore.google.com/detail/ddnmhnjmcokbfabeileblceehjhefkpc); it works on any page Chrome can open, from localhost to production. For a page opened from a file (`file://`), Chrome asks you to turn on **Allow access to file URLs** for breakhound once; the panel has a button that takes you there. The quickest way in is to right-click the page and choose **Scan with breakhound**: the breakhound panel opens in Chrome's side panel and starts right away. Clicking the breakhound icon in the toolbar opens it ready to scan, and the same panel is a **breakhound** tab in DevTools. The page grows steadily from 320px to 1920px (or the widths you set) while the timeline fills in live: each run of widths that share a layout, every width where the layout changes, and where something breaks. Then you get:
52
+ ## Three ways to use it
163
53
 
164
- - the issues, each with its exact width ranges, the element, the numbers and the likely fix
165
- - the timeline: the layout bands, the media query widths, the changes no media or container query explains, and a bar for each issue across the widths it covers
54
+ **In the terminal**, as above. Pages behind a login, dynamic routes, staging servers and big apps are all covered in [recipes](https://seybel.github.io/breakhound/guide/recipes).
166
55
 
167
- To check only some screens, pick **Mobile** (320 to 599px), **Tablet** (600 to 1023px) or **Desktop** (1024 to 1920px) next to the widths. Pick a neighbour as well to check both, so Mobile and Tablet is 320 to 1023px; **All** goes back to every width. They only fill in the two width fields, so you can still type any range you like, and a smaller range scans faster.
56
+ **In Chrome**, with the [breakhound extension](https://chromewebstore.google.com/detail/ddnmhnjmcokbfabeileblceehjhefkpc): right-click any page, from localhost to production, and choose **Scan with breakhound**. A timeline fills in live as the page grows from 320px to 1920px. [More →](https://seybel.github.io/breakhound/guide/extension)
168
57
 
169
- Drag across the timeline to resize the page live, click anywhere on it to jump to a width, or use the arrow keys to nudge a pixel at a time. Widths wider than the tab are zoomed out to fit, like DevTools' device mode, so a 1920px layout is shown whole, and the page refits when you drag DevTools bigger or smaller. If you press Cancel on Chrome's debugging bar, the tab goes back to its own width and breakhound's outlines disappear. Click an issue to see the page at the width where it's worst, with the element outlined. **Select in Elements** jumps to the element, and **Copy prompt** gives your coding agent the same instructions `breakhound prompt` would. (Select in Elements is only in the DevTools tab, since only DevTools has an Elements panel.) It finds what the CLI finds on the same page, since both run the same code.
170
-
171
- While it scans or shows a width, Chrome displays a bar saying breakhound started debugging this browser: that is how an extension resizes a tab. The bar goes away afterwards, and the tab goes back to its own width and scroll position. **Reload first** reloads the page before scanning, so breakhound can wait for the page's own resize handlers exactly, as the CLI does. Leave it off to scan the page as you have it.
172
-
173
- **Whole site** scans every page of the site, starting from the one you're on. breakhound finds the pages the way the CLI does: from the app's live router when it has one (Vue, React Router, Nuxt, Remix, TanStack), otherwise by following links from the page you're on and the home page (never a logout, delete or file link, and a few pages per section, since blog posts share a layout), up to 25 pages. It loads each one in the same tab, scans it, and comes back to where you were. Chrome stops drawing a tab that's out of view, so if you switch away while it runs, the scan pauses and carries on by itself when you come back. Your own login applies, so pages behind it are scanned too. Each page gets a chip with its issue count; an issue shared by several pages is counted once, and **Copy prompt** lists it once with every page it's on. Showing an issue from another page takes the tab there first.
174
-
175
- **Send to agent** hands the issues to the coding agent working on that app, so it can fix them and check each fix in your browser. See [From the browser](#from-the-browser) below.
176
-
177
- Routes only your project's files list (Next.js, SvelteKit and Astro route folders) need the CLI, as do menus opened, other browsers, screenshots and reports.
178
-
179
-
180
- ## Fix it with your coding agent
181
-
182
- breakhound doesn't edit your code: your own agent does, and breakhound checks its work. Nothing leaves your machine and it costs nothing.
183
-
184
- ### Over MCP (recommended)
58
+ **With your coding agent.** breakhound doesn't edit your code: your agent does, and breakhound checks its work at every width.
185
59
 
186
60
  ```bash
187
61
  npx @seybel/breakhound mcp install
188
62
  ```
189
63
 
190
- It finds Claude Code, Cursor, VS Code, Antigravity, Windsurf and Codex, shows what it will add to their MCP settings, and asks first. Then ask your agent to fix the responsive issues. It can:
191
-
192
- | Tool | What it does |
193
- |---|---|
194
- | `scan` | Find every route and its issues. This becomes the baseline |
195
- | `list_routes`, `list_issues` | What was found |
196
- | `get_issue` | Widths, element, source file and line, measurements, likely fix and a screenshot |
197
- | `verify` | Scan again and compare with the baseline: fixed, still there, and **new** |
198
- | `checkpoint` | Commit the fix for some routes as its own git commit |
199
- | `undo` | Revert the fixes for some routes, or the whole session |
200
-
201
- `verify` is the point: agents often fix 812px and break 1280px, or fix one page and break another that shares a component. New issues show up there, at any width, on any page that was scanned.
202
-
203
- The dev server stays up between calls, so each verify only takes as long as the scan. In Claude Code, `/mcp__breakhound__fix` asks for the whole loop in one go.
204
-
205
- ### From the browser
206
-
207
- Scanned a page in the breakhound extension? Click **Send to agent** and the issues go to the agent working on that app, with nothing to copy and paste. Then ask it to "fix the breakhound issues".
208
-
209
- - It goes to the project, not to one agent: Claude Code and Cursor open on the same app both see it.
210
- - breakhound picks the project serving the page, the way the CLI recognises your dev server (or from `baseUrl` in your config). When it can't tell, for a staging site say, it asks which project.
211
- - When the agent verifies a fix, the panel scans those pages again **in your browser**: same login, same browser, so the comparison is exact. Keep the panel open while it works; a chip in the toolbar shows the agent is connected. If the panel is closed, verify says so, and the agent asks you to open it.
212
-
213
- It works through the MCP server, so it needs `npx @seybel/breakhound mcp install` once (the panel shows the command if your agent isn't connected yet). `breakhound mcp` listens on 127.0.0.1 only, on a port from 47821, and answers only the breakhound extension. It only ever writes the scan you sent into `.breakhound/`; it never reads or sends your files.
214
-
215
- ### With a prompt
216
-
217
- ```bash
218
- npx @seybel/breakhound prompt --copy
219
- ```
220
-
221
- Paste it into any agent. It lists each unique issue once with the widths, the element, the evidence and the likely fix, and tells the agent to run `npx @seybel/breakhound verify` until nothing is left.
222
-
223
- ### With your own model
224
-
225
- No agent at hand? `breakhound fix` works through the last scan's issues itself, using your own API key or a model running on your machine:
226
-
227
- ```bash
228
- ANTHROPIC_API_KEY=... npx @seybel/breakhound fix # or OPENAI_API_KEY=... with --model <name>
229
- npx @seybel/breakhound fix --provider ollama --model qwen2.5-coder # free and local, with Ollama
230
- ```
231
-
232
- For each issue it shows the model the issue and the files most likely behind it (where the element is written, then the files that mention its classes), applies the edits it suggests, and checks the pages again. A fix that clears the issue without breaking anything else, at any width, becomes its own commit, which `breakhound undo` can take back. One that doesn't is put back, and the model gets one more try with the reason. Files with uncommitted changes are never touched. It needs a git repository, and only the code around each issue is sent to the model you chose.
233
-
234
- ### Verify, checkpoint, undo
235
-
236
- The same loop works from the command line:
237
-
238
- ```bash
239
- npx @seybel/breakhound verify /pricing # compare with the last full scan
240
- npx @seybel/breakhound checkpoint /pricing -m "Let the pricing table shrink"
241
- npx @seybel/breakhound undo /pricing # revert just that fix
242
- npx @seybel/breakhound undo --session # revert every fix since the scan
243
- npx @seybel/breakhound undo # list the fixes you can undo
244
- ```
245
-
246
- Checkpoints are ordinary commits with a `Breakhound-Route:` trailer, and undo makes a new commit that reverts them: history is never rewritten. breakhound never commits changes you had before the scan (it stops and says so), and undo refuses to run over uncommitted work.
247
-
248
- ### Point the agent at the right line
249
-
250
- In development, breakhound reads where elements come from out of React's and Vue's dev info, which usually gives the component and its file. For the exact line of every element, add the plugin (development only, production builds are untouched):
251
-
252
- ```ts
253
- // vite.config.ts (React, Vue, Svelte, Preact, Solid; Nuxt: under `vite.plugins`)
254
- import breakhound from '@seybel/breakhound/vite';
255
- export default defineConfig({ plugins: [breakhound(), react()] });
256
- ```
257
-
258
- ```js
259
- // next.config.mjs (Turbopack and webpack)
260
- import { withBreakhound } from '@seybel/breakhound/next';
261
- export default withBreakhound({ /* your config */ });
262
- ```
263
-
264
- ```js
265
- // webpack.config.js
266
- const { BreakhoundPlugin } = require('@seybel/breakhound/webpack');
267
- module.exports = { plugins: [new BreakhoundPlugin()] };
268
- ```
269
-
270
- Each HTML element gets a `data-bh-src="src/components/Nav.tsx:42:7"` attribute on the dev server, and reports and prompts show `Source: src/components/Nav.tsx:42`.
271
-
272
- ## Configuration
273
-
274
- Optional. `npx @seybel/breakhound init` creates one. If breakhound is in your dev dependencies you get `breakhound.config.ts` (or `.mjs` without TypeScript), fully typed:
275
-
276
- ```ts
277
- import { defineConfig } from '@seybel/breakhound';
278
-
279
- export default defineConfig({
280
- exclude: ['/admin/**'], // or include: ['/blog/**']
281
- samples: { '/products/[id]': '/products/42' },
282
- widths: { min: 320, max: 1920 },
283
- ignore: ['.intercom-launcher', { selector: '.map', detectors: ['overlap'] }],
284
- detectors: { 'tiny-text': false, 'edge-gutter': 'info' },
285
- failOn: 'error',
286
- });
287
- ```
288
-
289
- Running breakhound through `npx` without installing it, you get `breakhound.config.json` instead. A TypeScript file importing a package that isn't installed would break your project's own type check (and builds that run it, like `next build`). The JSON file points at breakhound's schema, so your editor still suggests and explains every option:
290
-
291
- ```json
292
- {
293
- "$schema": "https://cdn.jsdelivr.net/npm/@seybel/breakhound/dist/schema.json",
294
- "exclude": ["/admin/**"]
295
- }
296
- ```
297
-
298
- `.js`, `.cjs` and `.mts` configs work too. The types ship for both `import` and `require`.
299
-
300
- | Option | What it does |
301
- |---|---|
302
- | `baseUrl` | Scan this server instead of finding or starting the dev server |
303
- | `routes` | Scan exactly these routes instead of discovering them |
304
- | `include`, `exclude` | Route globs: `*` is one segment, `**` any number |
305
- | `samples` | A real URL for a dynamic route |
306
- | `params` | Real values for dynamic route parameters by name, for every route that uses them |
307
- | `maxRoutes` | Most routes per run (default 100) |
308
- | `server` | How to start the app: `{ command: 'npm run preview', port: 4173, timeout: 120 }` |
309
- | `widths` | `{ min, max, step }` in CSS pixels |
310
- | `ignore`, `detectors` | Leave elements out, turn checks off or change their severity |
311
- | `failOn` | Exit 1 at `error`, `warning`, `info` or `none` |
312
- | `vision` | `true` to add a vision model's opinion, or `{ model, provider, widths }` |
313
- | `fix` | The model `breakhound fix` uses: `{ provider: 'ollama', model: 'qwen2.5-coder' }` |
314
- | `browsers` | Engines to check in: `["chromium", "webkit", "firefox"]` (default Chromium only) |
315
- | `states` | Most menus, dialogs, tabs and expandable sections to open per page (default 5), or `false` |
316
- | `concurrency` | Browser tabs to use at once (default half your CPU cores, up to 4) |
317
- | `memoryLimit` | Most memory the dev server and browser may use together, e.g. `"6GB"`, `"50%"` or `"off"` (default 60% of your memory) |
318
-
319
- You can also mark elements in your markup:
320
-
321
- ```html
322
- <div data-breakhound-ignore>...</div> <!-- every check -->
323
- <div data-breakhound-ignore="overlap small-tap-target">...</div>
324
- ```
64
+ That sets it up for Claude Code, Cursor, VS Code, Antigravity, Windsurf and Codex. Then ask your agent to fix the responsive issues: it can scan, verify that each fix didn't break another width or page, commit each fix on its own, and undo it. No MCP? `npx @seybel/breakhound prompt --copy` gives you instructions to paste into any agent. [More →](https://seybel.github.io/breakhound/guide/agents)
325
65
 
326
- ## CLI
327
-
328
- Run these with `npx @seybel/breakhound`, or as `breakhound` after `npm i -g @seybel/breakhound`. Installed in a project, it's `npx breakhound` or an npm script.
329
-
330
- ```
331
- breakhound Find your app and scan every route
332
- breakhound /pricing /blog Scan only these routes of your app
333
- breakhound <url or file ...> Scan just these pages
334
- breakhound login [route] Log in once in a browser window; later scans reuse the session
335
- breakhound report Open the last HTML report
336
- breakhound prompt Print the fix prompt (--copy to copy it, --all to include info)
337
- breakhound init Create a config file
338
- breakhound install [browsers] Download Chromium, or webkit and firefox (--with-deps adds Linux libraries)
339
-
340
- breakhound verify [routes] Scan again and compare with the last full scan (--all to count info)
341
- breakhound checkpoint <routes> Commit the current changes as the fix for these routes (-m message)
342
- breakhound undo [routes] Revert the fixes for these routes (--session for all)
343
- breakhound mcp install Add the MCP server to your agents (--client, --yes)
344
- breakhound mcp Run the MCP server (your agent starts it)
345
-
346
- --url <url> Where your app runs (skips finding the dev server)
347
- --include <glob> Only scan matching routes (repeatable)
348
- --exclude <glob> Skip matching routes (repeatable)
349
- --max-routes <n> Most routes to scan (default 100)
350
- --min <px> --max <px> Width range (default 320 to 1920)
351
- --fail-on <level> Exit 1 at error, warning, info or none (default error)
352
- --pdf Also write report.pdf
353
- --no-screenshots Skip screenshots
354
- --no-states Don't open menus, dialogs, tabs and expandable sections
355
- --browsers <list> Also check other engines, e.g. chromium,webkit,firefox
356
- --vision Also ask your own vision model what looks off (info only)
357
- --concurrency <n> Browser tabs to use at once
358
- --memory-limit <size> Memory the dev server and browser may use, e.g. 6GB, 50% or off
359
- --out <dir> Report folder (default .breakhound)
360
- --open Open the report when done
361
- -q, --quiet Only print errors
362
- ```
363
-
364
- While it runs, breakhound watches the memory of the dev server it started (and everything that server runs) and of its browser, along with how much memory your system has left. If they grow past `memoryLimit`, or the system runs out of memory, it shuts them down at once and tells you what used the memory and what to try. It only ever stops processes it started itself.
365
-
366
- Exit codes: `0` clean, `1` issues at or above `--fail-on`, `2` a page couldn't be checked (it failed to load, answered with an HTTP error, or rendered nothing). Pages behind a login and dynamic routes without a URL are reported but don't fail the run.
367
-
368
- ## CI
369
-
370
- On GitHub Actions, after installing your dependencies:
66
+ ## In CI
371
67
 
372
68
  ```yaml
373
69
  - uses: Seybel/breakhound@v1
374
70
  with:
375
71
  fail-on: error
376
- # url: ${{ steps.deploy.outputs.preview-url }} # or scan a preview deployment
377
72
  ```
378
73
 
379
- It starts your dev server (or scans `url`), turns each issue into an annotation, adds the summary to the job page, and uploads the report as an artifact.
74
+ It starts your dev server (or scans a preview deployment), turns each issue into an annotation, and uploads the report as an artifact. [More →](https://seybel.github.io/breakhound/guide/ci)
380
75
 
381
- Anywhere else, `npx @seybel/breakhound install --with-deps && npx @seybel/breakhound` does the same job; `CI=true` keeps it from opening windows or asking questions.
76
+ ## Docs
382
77
 
383
- ## Development
384
-
385
- ```bash
386
- npm install
387
- npx playwright install chromium
388
- npm test # accuracy suite in real Chromium, plus unit tests
389
- npm run typecheck
390
- npm run lint
391
- npm run build # builds the publishable package in packages/cli/dist
392
- npm run build:extension # builds the DevTools panel in packages/extension/dist
393
- npm run dev -- http://localhost:3000
394
- ```
78
+ - [Getting started](https://seybel.github.io/breakhound/guide/getting-started) and [your first scan](https://seybel.github.io/breakhound/guide/first-scan)
79
+ - [Recipes](https://seybel.github.io/breakhound/guide/recipes) for common jobs
80
+ - [Configuration](https://seybel.github.io/breakhound/reference/config) and the [CLI](https://seybel.github.io/breakhound/reference/cli)
395
81
 
396
- `fixtures/pages` is the accuracy benchmark: pages with planted bugs (marked with `data-bh-expect`) and pages full of tricky-but-fine patterns that must stay clean. Every detector change has to keep it at 100%.
82
+ ## Contributing
397
83
 
398
- Found a false positive, or a bug breakhound missed? That's the most useful thing to report: see [CONTRIBUTING.md](https://github.com/Seybel/breakhound/blob/main/CONTRIBUTING.md). How it all works is in [docs/DESIGN.md](https://github.com/Seybel/breakhound/blob/main/docs/DESIGN.md).
84
+ Found a false positive, or a bug breakhound missed? That's the most useful thing to report. See [CONTRIBUTING.md](https://github.com/Seybel/breakhound/blob/main/CONTRIBUTING.md) for that and for working on the code.
399
85
 
400
86
  ## License
401
87
 
package/dist/cli.js CHANGED
@@ -369,6 +369,7 @@ var NetworkTracker = class {
369
369
  }
370
370
  };
371
371
  var RESIZE_PROBE = `(() => {
372
+ if (window.__breakhound_settle) return;
372
373
  const MAX_DEPTH = 3;
373
374
  const MAX_DELAY = 2000;
374
375
  let depth = 0;
@@ -411,10 +412,11 @@ var RESIZE_PROBE = `(() => {
411
412
  };
412
413
 
413
414
  const wrappers = new WeakMap();
415
+ const wrapped = new WeakSet();
414
416
  const wrap = (listener) => {
415
417
  if (!listener) return listener;
416
418
  let w = wrappers.get(listener);
417
- if (!w) { w = tracked(listener, 1); wrappers.set(listener, w); }
419
+ if (!w) { w = tracked(listener, 1); wrappers.set(listener, w); wrapped.add(w); }
418
420
  return w;
419
421
  };
420
422
 
@@ -449,8 +451,25 @@ var RESIZE_PROBE = `(() => {
449
451
  };
450
452
  }
451
453
 
454
+ // A window resize listener added before this script: taken off and added again, wrapped. One set
455
+ // as window.onresize is wrapped where it is.
456
+ const adopt = (listener, capture, passive, once) => {
457
+ // The browser lists a listener added after this script by its wrapper.
458
+ if (!listener || wrappers.has(listener) || wrapped.has(listener)) return;
459
+ if (listener === window.onresize) {
460
+ window.onresize = wrap(listener);
461
+ return;
462
+ }
463
+ remove.call(window, 'resize', listener, capture);
464
+ window.addEventListener('resize', listener, { capture, passive, once });
465
+ };
466
+
452
467
  Object.defineProperty(window, '__breakhound_settle', {
453
- value: { pending: () => pending, listeners: () => listeners + (window.onresize ? 1 : 0) },
468
+ value: {
469
+ pending: () => pending,
470
+ listeners: () => listeners + (window.onresize ? 1 : 0),
471
+ adopt,
472
+ },
454
473
  });
455
474
  })();`;
456
475
  var FREEZE_CSS = `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seybel/breakhound",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Find where your layout breaks across every viewport width, then hand the fix to your coding agent.",
5
5
  "keywords": [
6
6
  "responsive",
@@ -11,7 +11,7 @@
11
11
  "playwright",
12
12
  "mcp"
13
13
  ],
14
- "homepage": "https://github.com/Seybel/breakhound#readme",
14
+ "homepage": "https://seybel.github.io/breakhound/",
15
15
  "bugs": {
16
16
  "url": "https://github.com/Seybel/breakhound/issues"
17
17
  },