fix(react-router): catch falsy thrown values - #8205
Conversation
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 a12302e
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesFalsy caught-value handling
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to This change preserves falsy thrown values while keeping the existing error UI and diagnostics safe. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
🚀 Changeset Version Preview4 package(s) bumped directly, 10 bumped as dependents. 🟩 Patch bumps
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a12302ed3d
ℹ️ 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".
| }> { | ||
| state = { error: null } as { error: Error | null; resetKey?: unknown } | ||
| // Wrapping caught values keeps every possible thrown value truthy. | ||
| state = { error: 0 } as { error: [Error] | 0; resetKey?: unknown } |
There was a problem hiding this comment.
Add a patch changeset for the published fix
This changes the runtime behavior of the published @tanstack/react-router package, but the commit contains no .changeset entry. CONTRIBUTING.md requires every published-package change to include one, so add a patch changeset to ensure this fix is represented in the release metadata and changelog.
AGENTS.md reference: AGENTS.md:L3-L5
Useful? React with 👍 / 👎.
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 regress 11 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server serialization-payload (solid) |
4.7 MB | 7.4 MB | -37.32% |
| ❌ | Simulation | client-control-flow navigation loop (react) |
105.4 ms | 114.6 ms | -7.98% |
| ❌ | Memory | mem server error-paths unmatched (vue) |
577.5 KB | 627.2 KB | -7.93% |
| ❌ | Memory | mem server server-fn-churn (solid) |
336.7 KB | 364.2 KB | -7.57% |
| ❌ | Memory | mem server peak-large-page (vue) |
1 MB | 1.1 MB | -6.99% |
| ❌ | Memory | mem server error-paths unmatched (react) |
441.5 KB | 464.8 KB | -5.01% |
| ❌ | Memory | mem server aborted-requests (solid) |
1.2 MB | 1.2 MB | -4.13% |
| ❌ | Memory | mem server peak-large-page (solid) |
1.1 MB | 1.2 MB | -3.4% |
| ❌ | Memory | mem server request-churn (react) |
639.3 KB | 661.2 KB | -3.32% |
| ❌ | Memory | mem server serialization-payload (vue) |
4.4 MB | 4.5 MB | -3.08% |
| ❌ | Memory | mem client loader-data-retention (solid) |
156.8 KB | 161.7 KB | -3.03% |
| ⚡ | Memory | mem server error-paths redirect (vue) |
891.9 KB | 425.1 KB | ×2.1 |
| ⚡ | Memory | mem server error-paths not-found (solid) |
698.7 KB | 540.9 KB | +29.17% |
| ⚡ | Memory | mem client preload-churn (vue) |
919.3 KB | 761.7 KB | +20.7% |
| ⚡ | Memory | mem server error-paths not-found (react) |
436.4 KB | 401.5 KB | +8.69% |
| ⚡ | Simulation | ssr global-mw document (solid) |
366.2 ms | 349.4 ms | +4.8% |
| ⚡ | Memory | mem client navigation-churn (solid) |
649.4 KB | 620 KB | +4.74% |
| ⚡ | Memory | mem client navigation-churn (vue) |
1.7 MB | 1.6 MB | +4.74% |
| ⚡ | Memory | mem server error-paths unmatched (solid) |
570.7 KB | 550 KB | +3.76% |
| ⚡ | Memory | mem server error-paths redirect (react) |
315.9 KB | 305.2 KB | +3.51% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/react-catch-boundary-falsy-values (a12302e) with main (37877da)
Summary
CatchBoundaryusing a truthy tuple stateBundle size
react-router.minimal: +9 gzip bytes, -3 raw bytesTesting
Summary by CodeRabbit