fix(cli): capture saves an inline SVG as a file only when it is a plain image (#8699)

An inline SVG that carries a script, an event handler, embedded HTML, a link or a
reference to another file is no longer written under assets/svgs/. It is counted as
unavailable and stays in extracted/page.html. Downloaded SVG files already had this rule.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
James Russo
2026-11-24 11:29:43 +00:00
committed by GitHub
co-authored by Claude Fable 5.2
parent fb81a9d3d3
commit 37e4d4b75a
4 changed files with 37 additions and 2 deletions
+1 -1
View File
@@ -428,7 +428,7 @@ way to tell them apart is to open the page yourself.
| `size-floor` | Fetched, then judged too small to be a real asset rather than a spacer or tracking pixel. |
| `budget-exhausted` | `--capture-budget` ran out before this one was reached. Raise it, or pass `--skip-vision` to buy time. |
| `cap-reached` | A per-run or per-family limit was already met: 30 inline SVGs, 30 fonts, 6 faces per family. |
| `unavailable` | The request or the write failed: network error, timeout, refused address, bad status, disk. |
| `unavailable` | The request or the write failed: network error, timeout, refused address, bad status, disk. Also an inline SVG that is more than a plain image (it carries a script, an event handler, embedded HTML, a link, or a reference to another file): it stays in `extracted/page.html` but is not saved as a file under `assets/svgs/`. |
Three of those are decisions the capture made and one is a failure it hit, so a
run that is thin with an all-zero `dropped` is a thin page, and a run that is