diff --git a/claude-plugins/plugins/base/skills/headless-screenshot/SKILL.md b/claude-plugins/plugins/base/skills/headless-screenshot/SKILL.md index 1f22650e..cfe15be1 100644 --- a/claude-plugins/plugins/base/skills/headless-screenshot/SKILL.md +++ b/claude-plugins/plugins/base/skills/headless-screenshot/SKILL.md @@ -69,3 +69,36 @@ question is genuinely about *behavior*, not appearance. A missing emoji/glyph rendering as a box in the screenshot is usually a font availability artifact of the headless environment, not a real bug - don't mistake one for the other when reporting results. + +## Two false-positive traps (and their fixes) + +Both of these look exactly like a real product bug in a naive +screenshot and aren't - check for them before filing anything, and +use the fix below if you actually need an accurate render (e.g. to +judge icon/glyph layout, not just to note "there'd be an icon here"). + +- **Tofu boxes instead of emoji.** Plain `nixpkgs#chromium` has no + color-emoji font, so any 🖥/📡/🔨-style glyph renders as an empty + box. Add `nixpkgs#noto-fonts-color-emoji` to the `nix shell` - but a + `FONTCONFIG_FILE` that lists *only* the emoji dir throws away the + base fonts and blanks all normal text instead, which is its own + false alarm. Merge, don't override: + ``` + cat > fonts.conf < + + + /etc/fonts/fonts.conf + $(nix eval --raw nixpkgs#noto-fonts-color-emoji)/share/fonts + + EOF + FONTCONFIG_FILE=$PWD/fonts.conf nix shell nixpkgs#chromium nixpkgs#noto-fonts-color-emoji \ + --command chromium --headless=new --disable-gpu --no-sandbox \ + --screenshot=out.png --window-size=1440,900 "https://example/" + ``` +- **A bare "loading..." placeholder instead of real content.** A page + whose content arrives after the initial paint (SSE, a `fetch` on + mount) can get captured before that data lands - the default + `--screenshot` doesn't wait for it. Add + `--virtual-time-budget=8000` (milliseconds; tune to the page) to let + it actually settle first.