Uh oh!
There was an error while loading. Please reload this page.
test(react-router): cover pending and not-found context - #8243
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe PR adds React Router tests for context behavior during pending child loading, overlapping invalidations, automatic not-found navigation, client not-found responses, SSR rendering, and root ChangesRouter context handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk:⚪ Minimal · up to This change adds regression coverage for pending navigation and not-found context behavior without changing production behavior. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
View your CI Pipeline Execution ↗ for commit 40bfa36
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:a0f4fdd46e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| function ChildNotFoundComponent() { | ||
| const context = parentRoute.useRouteContext() |
There was a problem hiding this comment.
Exercise the child match's context in the not-found boundary
When the /parent/child context callback throws, parentRoute.useRouteContext() reads the separate, already-successful parent match, so both client and SSR assertions pass even if the failing child match loses all inherited context. This leaves the stated regression untested because a real child notFoundComponent can call childRoute.useRouteContext(); use that hook here and assert only the inherited fields so the test actually covers the failed match.
Useful? React with 👍 / 👎.
🚀 Changeset Version Preview6 package(s) bumped directly, 18 bumped as dependents. 🟩 Patch bumps
|
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 8.65%
|
| Mode | Benchmark | BASE | HEAD | Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server error-paths unmatched (react) | 421 KB | 1,547.5 KB | -72.8% |
| ❌ | Memory | mem client unique-location-churn (vue) | 424 KB | 450.4 KB | -5.87% |
| ❌ | Memory | mem client navigation-churn (vue) | 1.6 MB | 1.7 MB | -5.2% |
| ❌ | Memory | mem client preload-churn (vue) | 759 KB | 792.9 KB | -4.28% |
| ❌ | Memory | mem server error-paths unmatched (vue) | 572.7 KB | 592.2 KB | -3.29% |
| ⚡ | Memory | mem server error-paths not-found (vue) | 751.3 KB | 533.7 KB | +40.77% |
| ⚡ | Memory | mem server error-paths not-found (react) | 472.6 KB | 431.4 KB | +9.55% |
| ⚡ | Memory | mem client interrupted-navigations (vue) | 381.6 KB | 357.4 KB | +6.78% |
| ⚡ | Memory | mem client navigation-churn (solid) | 687.9 KB | 651.9 KB | +5.53% |
| ⚡ | Memory | mem server peak-large-page (solid) | 1.1 MB | 1.1 MB | +4.82% |
| 👁 | Memory | mem server aborted-requests (vue) | 1 MB | 1 MB | -4.11% |
| 👁 | Memory | mem server peak-large-page (vue) | 1 MB | 1.2 MB | -13.98% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing codex/8128-context-regressions (40bfa36) with fix/skip-descendant-lifecycle-boundaries (a383ad5)
Footnotes
48 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
d8ccbba to
a8d549bCompare
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
a8d549b to
96affcaCompareThere was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We classified this failure as an environment issue rather than a code change because the failing task (tanstack-vue-start-e2e-basic:test:e2e--rsbuild-ssr) belongs to a Vue Start e2e project that was not touched by this PR, which only adds React Router unit tests. The root cause is a port conflict (EADDRINUSE :::37965) caused by a stale process in the CI runner, unrelated to any of our changes — a clean rerun should resolve it.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
96affca to
40bfa36CompareUh oh!
There was an error while loading. Please reload this page.
🎯 Changes
Add six regression tests for context availability during pending navigation and not-found handling:
The SSR assertions check each output independently. These cases consolidate the recovered investigation probes and cover existing behavior. Stacked on #8165.
Validation: the full react-router unit, type, and lint targets passed locally (1,047 unit tests passed; one skipped).
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit