Skip to content

report --markdown: --base-url for absolute image links - #111

Merged
tmashara merged 1 commit into
mainfrom
claude/issue-104-base-url
Oct 30, 2026
Merged

tmashara merged 1 commit into
mainfrom
claude/issue-104-base-url

Conversation

@tmashara

Copy link
Copy Markdown
Owner

Part of #104: items 1 and 3.

Change

  • renderdiff report <out> --markdown <file> --base-url <url>: the image links in the markdown become <url>/<shot> instead of paths relative to the Markdown file. Trailing slashes on the URL are dropped. There is no URL validation, and report.html is unchanged. --base-url without --markdown exits 2.
  • --help (usage line, error usage, report paragraph), README, and the skill mention the flag.
  • docs/output.md#markdown: a Cloudflare Pages recipe and a separate-reports-repo recipe.
    • Cloudflare: one-time project create, deploy per branch, CI env vars, and simple branch aliases.
    • Access-protected images don't render in PRs, because GitHub's camo proxy is anonymous. Use the reports repo for private inline images.
    • github.com/<repo>/raw/main/... links render for signed-in viewers with read access. Don't copy ?token= raw URLs, which expire.
    • Use a separate repo rather than a branch of the main repo: every clone of the main repo downloads the screenshots, and history keeps them after the branch is deleted.
  • The docs-flag consistency test now allowlists the wrangler and git flags those recipes use.

Deferred

renderdiff publish and the action's publish-repo input are not in this PR. Both push to an outside repo using the user's credentials, and the documented clone/copy/push recipe plus --base-url already covers the flow. Add them if the one-command flow is asked for.

Verification

  • npm run typecheck, npm run lint, npm run format:check: clean
  • npm test: 362 pass. New tests check absolute links with a trailing slash and an out dir with a space in it, with no path leaking into the link, and that --base-url without --markdown exits 2.
  • npm run test:visual: 392 pass

🤖 Generated with Claude Code

Image links become <url>/<shot>, so the out dir can be uploaded anywhere and the
tables render in a PR description. docs/output.md gains a Cloudflare Pages and a
reports-repo recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tmashara
tmashara merged commit 5e1fb40 into main Oct 30, 2026
3 checks passed
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