Skip to content

fix: action report filename mismatch + README round 2#180

Merged
pftg merged 2 commits intomasterfrom
fix/readme-round2-and-action-bug
Apr 12, 2026
Merged

fix: action report filename mismatch + README round 2#180
pftg merged 2 commits intomasterfrom
fix/readme-round2-and-action-bug

Conversation

@pftg
Copy link
Copy Markdown
Collaborator

@pftg pftg commented Apr 12, 2026

Summary

Bug fix: Composite action checked for index.html but gem generates snap_diff_report.html — the report was never found in CI, silently producing no inline preview.

README round 2 (from 3-reviewer brutal honesty review — newcomer, principal eng, DevRel):

  • Add prerequisites note (Capybara + browser driver required)
  • Add non-Rails setup section (Hugo/Jekyll/static sites) — was buried in docs
  • Convert Quick Start to numbered steps with directory tree showing expected output
  • Reformat FAQ with collapsible <details> for scannability
  • Add "Will this slow down my tests?" FAQ entry
  • Rename "Advanced Topics" to "Docs" — Framework Setup isn't advanced
  • Remove Docker Testing from public docs list (internal dev concern)
  • Fix Requirements to show non-Rails is supported

Test plan

  • Unit tests pass (218 runs, 0 failures)
  • Verify action finds snap_diff_report.html in CI

🤖 Generated with Claude Code

Summary by Sourcery

Fix the GitHub Action HTML report detection to match the generated filename and refresh the README and reporter docs to better explain setup, usage, and the Web UI report.

Bug Fixes:

  • Update the upload-screenshots GitHub Action to look for and copy the correct HTML report filename generated by the gem.

Enhancements:

  • Document and highlight the image comparison API usage and configuration guidance for flaky tests, including thresholds and window sizing.
  • Reorganize and rename documentation sections to improve discoverability of framework setup, CI/non-Rails integration, configuration, and reporters.

Documentation:

  • Revise README with clearer value proposition, prerequisites, step-by-step quick start, non-Rails/static-site setup, expanded FAQ, and clarified installation/requirements.
  • Describe the Web UI HTML report in both README and reporters documentation, including how to enable and access the interactive report from CI.

Summary by CodeRabbit

  • Documentation
    • Updated README with clearer workflow guidance for screenshot testing setup and CI integration
    • Added new Web UI section for reviewing screenshot differences
    • Expanded documentation for non-Rails and static site projects
    • Added FAQ section addressing common setup and usage questions
    • Reorganized documentation index with new configuration reference link

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 12, 2026

Reviewer's Guide

Fixes the GitHub composite action to look for the correct HTML report filename generated by the gem, and significantly refines README/docs to better explain setup (including non-Rails use), workflow, troubleshooting, and the HTML report/Web UI capabilities.

Sequence diagram for corrected GitHub Action HTML report handling

sequenceDiagram
  actor Developer
  participant GitHubActions
  participant UploadScreenshotsAction
  participant CheckReportStep
  participant PrepareReportStep
  participant UploadReportStep

  Developer->>GitHubActions: Push branch / open pull request
  GitHubActions->>UploadScreenshotsAction: Run composite action upload-screenshots

  UploadScreenshotsAction->>CheckReportStep: Shell check for snap_diff_report.html
  CheckReportStep->>CheckReportStep: if [ -f "${{ inputs.report-path }}/snap_diff_report.html" ]
  alt Report_exists
    CheckReportStep-->>UploadScreenshotsAction: exists=true
    UploadScreenshotsAction->>PrepareReportStep: Copy snap_diff_report.html to name-snap_diff-report.html
    PrepareReportStep->>PrepareReportStep: cp snap_diff_report.html "${{ inputs.name }}-snap_diff-report.html"
    PrepareReportStep-->>UploadScreenshotsAction: Report prepared
    UploadScreenshotsAction->>UploadReportStep: Upload HTML report artifact
    UploadReportStep-->>GitHubActions: Expose inline preview in PR
  else Report_missing
    CheckReportStep-->>UploadScreenshotsAction: exists=false
    UploadScreenshotsAction-->>GitHubActions: Skip inline preview upload
  end
Loading

File-Level Changes

Change Details Files
Fix composite GitHub Action to detect and upload the correct HTML report file generated by the gem.
  • Update existence check to look for snap_diff_report.html instead of index.html in the report directory.
  • Update copy command to duplicate snap_diff_report.html into a name-scoped artifact file for inline preview.
.github/actions/upload-screenshots/action.yml
Revise README to clarify value proposition, quick start workflow, prerequisites, and non-Rails usage while reorganizing docs links and FAQs.
  • Rewrite intro to emphasize local, git-based visual regression testing vs SaaS tools.
  • Add Capybara + browser driver prerequisites note and optional ruby-vips recommendation in Gemfile snippet.
  • Convert Quick Start into explicit numbered steps including committing baselines and showing expected directory structure, and clarify CI failure behavior when baselines are missing.
  • Add a dedicated non-Rails (Hugo/Jekyll/static sites) section using CapybaraScreenshotDiff.serve and link to CI docs.
  • Rename and expand the HTML report section into a Web UI section with clearer instructions and GitHub Actions usage snippet, referencing snap_diff_report.html explicitly.
  • Move and expand the compare-any-two-images example into its own section with return value usage.
  • Refine flaky-test guidance to emphasize setting window_size and configuring perceptual_threshold/tolerance via configure block, and link to configuration docs.
  • Replace the old troubleshooting section with an expanded FAQ using
    Details blocks, including new performance (“Will this slow down my tests?”) and debug-mode entries.
  • Clarify installation requirements to explicitly note non-Rails support and reorganize documentation links, removing Docker Testing from the public docs list and renaming Advanced Topics to Docs.
README.md
Align reporters documentation terminology with the new Web UI phrasing.
  • Rename the HTML report subsection heading and description to describe it as an interactive Web UI report for screenshot differences.
docs/reporters.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 12, 2026

Warning

Rate limit exceeded

@pftg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 37 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 37 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 10ba99c1-0120-48ad-920b-65ed91f702eb

📥 Commits

Reviewing files that changed from the base of the PR and between 32210a6 and 93a7ea8.

📒 Files selected for processing (2)
  • .github/actions/upload-screenshots/action.yml
  • README.md
📝 Walkthrough

Walkthrough

The changes update GitHub Actions configuration to reference a new HTML report file name and expand documentation to emphasize local screenshot workflow, CI regression detection, non-Rails integration, and Web UI usage for reviewing screenshot differences.

Changes

Cohort / File(s) Summary
GitHub Actions Configuration
.github/actions/upload-screenshots/action.yml
Updated report detection to look for snap_diff_report.html instead of index.html and adjusted the copy command to match the new file name.
Documentation Updates
README.md, docs/reporters.md
Expanded README with ordered setup steps, non-Rails/static site usage, Web UI review workflow, HTML reporter integration, API examples, and FAQ sections. Renamed reporters documentation section from "HTML Report" to "Web UI for Reviewing Screenshot Changes."

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A diff report emerges with a newer name,
From index to snap\_diff\_report—the game's the same!
With docs so fluffy, expanded and bright,
Baselines committed, regressions in sight.
Our Web UI hops forward—take a peek, all right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary changes: fixing a GitHub Action report filename mismatch and revising the README documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/readme-round2-and-action-bug

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The GitHub Action now hardcodes snap_diff_report.html; consider either deriving this from a single shared constant/config or making the filename an action input so future changes to the report name don’t require coordinated updates across the gem and action.
  • In the non-Rails setup example (CapybaraScreenshotDiff.serve("_site")), it may help to briefly clarify how this is typically wired into a Rack app or test stack so users understand where that call belongs in their setup.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The GitHub Action now hardcodes `snap_diff_report.html`; consider either deriving this from a single shared constant/config or making the filename an action input so future changes to the report name don’t require coordinated updates across the gem and action.
- In the non-Rails setup example (`CapybaraScreenshotDiff.serve("_site")`), it may help to briefly clarify how this is typically wired into a Rack app or test stack so users understand where that call belongs in their setup.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Bug fix:
- Composite action checked for `index.html` but gem generates
  `snap_diff_report.html` — report was never found in CI

README improvements (from 3-reviewer round 2):
- Add prerequisites note (Capybara + browser driver required)
- Add non-Rails setup section (Hugo/Jekyll/static sites)
- Convert Quick Start to numbered steps with directory tree output
- Reformat FAQ with collapsible details for scannability
- Add "Will this slow down my tests?" FAQ entry
- Rename "Advanced Topics" to "Docs" (Framework Setup isn't advanced)
- Remove Docker Testing from docs list (internal dev concern)
- Fix Requirements to show non-Rails is supported

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pftg pftg force-pushed the fix/readme-round2-and-action-bug branch from 32210a6 to 18d73de Compare April 12, 2026 21:48
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 58-61: The fenced code block in README.md containing the directory
tree ("doc/screenshots/ ... homepage.png") is missing a language specifier;
update that fence to include a language such as "text" (i.e., change the opening
``` to ```text) so markdownlint MD040 is satisfied while preserving the block
content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09811bf5-50e8-4afd-9b4f-e544d0897f2a

📥 Commits

Reviewing files that changed from the base of the PR and between f9ae0cf and 32210a6.

📒 Files selected for processing (3)
  • .github/actions/upload-screenshots/action.yml
  • README.md
  • docs/reporters.md

Comment thread README.md Outdated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pftg
Copy link
Copy Markdown
Collaborator Author

pftg commented Apr 12, 2026

CodeRabbit MD040 finding fixed — added text language specifier to directory tree code block in commit 93a7ea8.

@pftg pftg merged commit 491cf52 into master Apr 12, 2026
8 checks passed
@pftg pftg deleted the fix/readme-round2-and-action-bug branch April 12, 2026 21:59
@coderabbitai coderabbitai Bot mentioned this pull request Apr 12, 2026
2 tasks
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