Report live reload build failures#64
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 25 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ 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.
Pull request overview
This PR improves the dev server live-reload flow by capturing rebuild exit status/output and emitting a dedicated SSE event for rebuild failures, so the browser doesn’t reload stale pages after failed rebuilds.
Changes:
- Change
SiteBuildRunner::build()to return aSiteBuildResult(exit code + captured output). - Update live reload server logic to send
reloadonly on successful rebuilds, and sendbuild-errorSSE events (with build output) on failure. - Update unit tests to validate failure results include exit code and output.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Web/LiveReload/SiteBuildRunnerTest.php | Updates tests for the new SiteBuildResult contract and output/exit-code assertions. |
| src/Web/LiveReload/SiteBuildRunner.php | Returns a structured SiteBuildResult instead of a boolean. |
| src/Web/LiveReload/SiteBuildResult.php | Adds a small value object representing build outcome and output. |
| src/Web/DevServer/assets/live-reload.js | Adds a client-side handler for build-error SSE events. |
| src/Console/ServeCommand.php | Emits reload only on successful rebuilds; emits build-error events with output on failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| es.addEventListener("build-error", function(event) { | ||
| es.close(); |
Summary
Tests