Skip to content

docs: add /screenshot command for PR preview screenshots - #1918

Merged
jessepollak merged 3 commits into
masterfrom
add-pr-screenshot-flow
Sep 2, 2026
Merged

docs: add /screenshot command for PR preview screenshots#1918
jessepollak merged 3 commits into
masterfrom
add-pr-screenshot-flow

Conversation

@jessepollak

@jessepollak jessepollak commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What changed? Why?

Ports the screenshot flow from bdocs so every PR gets visual previews of the pages it changes:

  • New /screenshot Claude command (.claude/commands/screenshot.md): maps changed files to Mintlify routes (docs/<path>.mdx/<path>, with reverse-lookup rules for snippets/ and images/ changes), captures affected pages with agent-browser against the local mintlify dev server, uploads them as release assets (screenshots-pr-<N>), and returns markdown for the PR body.
  • PR template gains a Screenshots section (with an "N/A" escape hatch for non-visual changes).
  • CLAUDE.md gains an "Opening PRs" section documenting the flow, plus a /screenshot row in the commands table.
  • .gitignore excludes the local screenshots/ staging directory — images are shared via releases, never committed.

Notes to reviewers

  • No docs pages, docs.json, or gated .github/ surfaces (workflows, CODEOWNERS, ia-governance.json, .github/scripts/) are touched, so no IA approval gates activate.
  • Screenshots are uploaded as prereleases rather than drafts: draft-release assets on a public github.com repo aren't anonymously fetchable, so GitHub's image proxy can't render them in PR bodies (verified — draft asset URL returns 404 unauthenticated, published prerelease returns 200). Prereleases stay off "latest" and are deleted (with their tag) after merge.

How has it been tested?

Ran the flow end to end in this repo: started mintlify dev from docs/, captured /get-started/base-chain full-page at 1280×800 with agent-browser, verified the render, uploaded the asset via gh 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-chain captured by /screenshot:

get-started/base-chain rendered by mintlify dev, captured by the /screenshot flow

@cb-heimdall

cb-heimdall commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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>
jessepollak and others added 2 commits September 2, 2026 11:15
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
jessepollak force-pushed the add-pr-screenshot-flow branch from 496b782 to fbc54cc Compare September 2, 2026 18:15
@jessepollak
jessepollak merged commit 9e2eeaf into master Sep 2, 2026
13 checks passed
@jessepollak
jessepollak deleted the add-pr-screenshot-flow branch September 2, 2026 19:39
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.

4 participants