Skip to content

Cover PDF captures in the screenshot-perf-diagnosis skill - #6141

Draft
lukemelia wants to merge 2 commits into
cs-12978-implement-mediaprint-emulation-and-css-driven-paper-sizefrom
cs-12981-update-skills-to-teach-the-pdf-export-capability
Draft

lukemelia wants to merge 2 commits into
cs-12978-implement-mediaprint-emulation-and-css-driven-paper-sizefrom
cs-12981-update-skills-to-teach-the-pdf-export-capability

Conversation

@lukemelia

Copy link
Copy Markdown
Contributor

Stacked on #6120 / the PDF persist-and-serve work — base is the cs-12977 branch, not main.

The repo-side half of teaching PDF export: the .claude screenshot-perf-diagnosis skill now covers PDF captures. (The user-facing boxel-skills half — the integrate-screenshot-card-format pattern, glossary, and integration-surfaces — lives in the separate cardstack/boxel-skills repo: cardstack/boxel-skills#138.)

What changed

boxel:screenshot-perf events carry a contentType dimension (image/* for raster, application/pdf for paged output) on both event types, and the dashboard has a matching contentType template variable. The skill now:

  • Documents contentType on both event envelopes — request events derive it from the spec or served ledger row; capture events report what the render produced (null if it never finished).
  • Adds a PDF captures section: a type=pdf capture runs the same hit-vs-render / stage-breakdown runbook scoped to application/pdf, with pagination cost landing in the render's capture stage, and an over-bounds document (past the 20-page / 10 MB caps) surfacing as a status=error capture / outcome=error request rather than a slow success.
  • Threads the encoding dimension through the frontmatter description, the dashboard template vars, and the ledger SQL (content_type column).

Docs only — no code paths touched.

🤖 Generated with Claude Code

https://claude.ai/code/session_014GsYGsuCqHJz9GAti4jheG

@lukemelia
lukemelia changed the base branch from cs-12977-persist-pdfs-to-mediacache-and-serve-from-the-get to cs-12978-implement-mediaprint-emulation-and-css-driven-paper-size September 15, 2026 23:09
@lukemelia
lukemelia added this pull request to stack #6122 September 15, 2026 23:09
The screenshot-perf events now carry a contentType dimension (image/* for
raster, application/pdf for paged output) on both the request and capture
event types, and the dashboard grows a matching contentType template
variable. Teach the skill to use it:

- Document contentType on both event envelopes: request events derive it
  from the spec or the served ledger row, capture events report what the
  render produced.
- Add a "PDF captures" section — a type=pdf capture runs the same
  hit-vs-render / stage-breakdown runbook scoped to application/pdf, with
  pagination cost landing in the render's capture stage and an over-bounds
  document (past the 20-page / 10 MB caps) surfacing as a status=error
  capture / outcome=error request rather than a slow success.
- Thread the encoding dimension through the frontmatter description, the
  dashboard template vars, and the ledger SQL (content_type column).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GsYGsuCqHJz9GAti4jheG
@lukemelia
lukemelia force-pushed the cs-12981-update-skills-to-teach-the-pdf-export-capability branch from bafa03e to df8d4a1 Compare September 15, 2026 23:25
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.

2 participants