Skip to content

Report failed stylesheets and fonts; skill hints for upgrades - #16

Merged
tmashara merged 2 commits into
mainfrom
capture-failed-assets
Oct 23, 2026
Merged

tmashara merged 2 commits into
mainfrom
capture-failed-assets

Conversation

@tmashara

Copy link
Copy Markdown
Owner

Ideas taken from pixel-by-pixel, page-compare and visual-regression-upgrade.

Tool

  • Each side now records the stylesheets that failed or answered ≥ 400, and the font faces with status === "error". Requests aborted by blockUrlPatterns don't count. This catches the classic false regression where a font CDN refuses localhost and the whole page reflows into the fallback font.
    • Summary: a failed left: …; right: … line under the row, before dom.
    • --progress and the report card show it too.
    • results.json gets failed: { left, right }.
  • The wait on document.fonts.ready is now capped at 5s; before it had no limit.

Skill

  • Adds allowed-tools for the renderdiff CLI, so the loop doesn't stop at a permission prompt on every run.
  • Read failed first.
  • For upgrades, use the pre-upgrade commit in a git worktree as the reference.
  • Serve a production build, since dev overlays and debug bars appear only on the local side.
  • Pick one route per template.

Tests

  • New broken-asset guard-rail fixture: a 404 stylesheet, a blocked stylesheet and a 404 font face on both sides.
  • Unit tests: 219/219. Visual tests: 300/300.

🤖 Generated with Claude Code

tmashara and others added 2 commits October 23, 2026 17:41
- Record per side the stylesheets that failed or answered >= 400 (blocked URLs aside) and
  the font faces in error; shown as a `failed` line under the row, on the report card and
  in results.json.
- Cap the wait on document.fonts.ready at 5s.
- Skill: allowed-tools for the renderdiff CLI; read `failed` first; pre-upgrade worktree as
  the reference, production builds over dev overlays, one route per template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Clear the failures per load in capture(), not on framenavigated, which a same-document
  pushState during hydration fires too.
- Ignore net::ERR_ABORTED: the page or the next navigation cancelled it.
- Keep the query in stylesheet URLs (Google Fonts css2?family=…).
- A shot with a failed asset is neither clean nor reused by --rerun-failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit a834d28 into main Oct 23, 2026
2 checks passed
@tmashara
tmashara deleted the capture-failed-assets branch October 23, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant