docs: add /screenshot command for PR preview screenshots - #1918
Merged
Conversation
Collaborator
✅ Heimdall Review Status
|
jessepollak
added a commit
that referenced
this pull request
Sep 2, 2026
Draft-release assets on a public repo return 404 to anonymous fetches, so GitHub's image proxy renders them broken in PR bodies (verified on PR #1918). Published prereleases serve assets publicly and stay off "latest"; clean up with --cleanup-tag after merge. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Port the bdocs screenshot flow: a /screenshot slash command that maps changed files to Mintlify routes, captures affected pages with agent-browser against the local dev server, uploads them as draft GitHub release assets, and returns markdown for the PR body. Wire it into every PR via a Screenshots section in the PR template and an "Opening PRs" section in CLAUDE.md; gitignore the local screenshots/ directory. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Draft-release assets on a public repo return 404 to anonymous fetches, so GitHub's image proxy renders them broken in PR bodies (verified on PR #1918). Published prereleases serve assets publicly and stay off "latest"; clean up with --cleanup-tag after merge. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
jessepollak
force-pushed
the
add-pr-screenshot-flow
branch
from
September 2, 2026 18:15
496b782 to
fbc54cc
Compare
soheimam
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
Ports the screenshot flow from bdocs so every PR gets visual previews of the pages it changes:
/screenshotClaude command (.claude/commands/screenshot.md): maps changed files to Mintlify routes (docs/<path>.mdx→/<path>, with reverse-lookup rules forsnippets/andimages/changes), captures affected pages withagent-browseragainst the localmintlify devserver, uploads them as release assets (screenshots-pr-<N>), and returns markdown for the PR body./screenshotrow in the commands table..gitignoreexcludes the localscreenshots/staging directory — images are shared via releases, never committed.Notes to reviewers
docs.json, or gated.github/surfaces (workflows, CODEOWNERS,ia-governance.json,.github/scripts/) are touched, so no IA approval gates activate.How has it been tested?
Ran the flow end to end in this repo: started
mintlify devfromdocs/, captured/get-started/base-chainfull-page at 1280×800 withagent-browser, verified the render, uploaded the asset viagh release create screenshots-pr-1918, and confirmed the asset URL is publicly fetchable. The screenshot below is the output of that run.Screenshots
This PR itself has no user-facing page changes, but here is the flow's output as an illustration —
/get-started/base-chaincaptured by/screenshot: