fix: action report filename mismatch + README round 2#180
Conversation
Reviewer's GuideFixes 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 handlingsequenceDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.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>
32210a6 to
18d73de
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
.github/actions/upload-screenshots/action.ymlREADME.mddocs/reporters.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
CodeRabbit MD040 finding fixed — added |
Summary
Bug fix: Composite action checked for
index.htmlbut gem generatessnap_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):
<details>for scannabilityTest plan
snap_diff_report.htmlin 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:
Enhancements:
Documentation:
Summary by CodeRabbit