Repository navigation
fix(client): load the page when a sibling compilation builds, in reload mode - #2468
Conversation
🦋 Changeset detectedLatest commit: db1687e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review. WalkthroughWhen a named compilation differs from the configured name, the client now reloads the page if it receives a successful Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The failed-build test may check too early to catch an erroneous reload after the event is handled. This is a bounded test-confidence gap; synchronizing the assertion with client processing is a follow-up. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ed6f6b84-1267-4bd4-8bba-8a09bf12e616
📒 Files selected for processing (4)
.changeset/client-reload-on-sibling-builds.mdREADME.mdclient-src/index.jstest/e2e/multi-compiler.test.js
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2468 +/- ##
==========================================
+ Coverage 96.29% 96.30% +0.01%
==========================================
Files 23 23
Lines 2507 2519 +12
==========================================
+ Hits 2414 2426 +12
Misses 93 93 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
19db232 to
d6cb930
Compare
…ad mode The name filter kept a sibling's build away from the client, which is right for applying an update in place. A page rendered from another bundle's output, a server bundle for instance, was then never told to reload when that bundle changed. webpack-dev-server has always reloaded on any compilation's change. A build with errors still leaves the page alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjuMAuk9o6UazjHzcAQCTA
app.edit only writes the file, so a three second pause could end before the build or its event. The test waits for the build to complete with errors, then for the watcher to go quiet, before it checks that the page was left alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjuMAuk9o6UazjHzcAQCTA
d6cb930 to
db1687e
Compare
Summary
In a multi-compiler build, each page's client carries the
nameof its own compilation and ignores every other compilation's events. That is right for applying an update in place, since a sibling's hash is not this bundle's. It means a page rendered from another bundle's output (a server bundle, for instance) is never told to reload when that bundle changes.webpack-dev-server has always reloaded on any compilation's change, and its universal-config tests rely on it: changing the server entry reloads the browser page.
In
apply: "reload", a successful (built, no errors) sibling build now loads the page. Nothing is applied in place and a build with errors still leaves the page alone.hmrandhmr-onlybehave as before.Test plan
test/e2e/multi-compiler.test.js, using the one-bundle-per-page route: a sibling's successful build reloads the page, and a sibling's failed build does not. The first fails without the change.build:typesare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01UjuMAuk9o6UazjHzcAQCTA
Generated by Claude Code
Summary by CodeRabbit