fix(router-core): skip lifecycle callbacks below fallback boundaries - #8165
fix(router-core): skip lifecycle callbacks below fallback boundaries#8165Sheraff wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
View your CI Pipeline Execution ↗ for commit 7963ad6
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Merging this PR will degrade performance by 1.1%
|
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
We update the keeps a hidden child matched without projecting it below a parent error test assertion to align with the PR's intended behavior change: descendants below an error/not-found boundary should no longer receive onEnter callbacks. The previous assertion (toHaveBeenCalledTimes(1)) reflected the old traversal behavior where the loop continued through all matches regardless of boundary status; the fix changes it to not.toHaveBeenCalled() to match the new runRouteLifecycle break semantics.
Tip
✅ We verified this fix by re-running @tanstack/router-core:test:unit.
diff --git a/packages/router-core/tests/client-lane-adversarial.test.ts b/packages/router-core/tests/client-lane-adversarial.test.ts
index bcd75475..e3552864 100644
--- a/packages/router-core/tests/client-lane-adversarial.test.ts
+++ b/packages/router-core/tests/client-lane-adversarial.test.ts
@@ -407,7 +407,7 @@ describe('adversarial client lane ownership', () => {
error: parentError,
})
expect(childHead).not.toHaveBeenCalled()
- expect(childOnEnter).toHaveBeenCalledTimes(1)
+ expect(childOnEnter).not.toHaveBeenCalled()
})
test('a redirect aborts the discarded loader generation', async () => {
Or Apply changes locally with:
npx nx-cloud apply-locally Agah-xui7
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
Summary
Testing
Not run per request.