Repository navigation
fix: bubble errors from recovering class boundaries - #109
BleedingDev wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 3811081 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 |
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Error bubbling and validation packages/redact/src/dom/features/class/full.ts, packages/redact/src/dom/reconcile.ts, tests/error-boundary-recovery.test.tsx, scripts/size-check.mjs |
Class recovery tracks the recovering boundary, and boundary lookup skips it when selecting an ancestor. Tests cover fallback errors across rendering and update paths. The size check adds source and built-package allowances. |
Suspense marker preservation and cleanup packages/redact/src/dom/features/suspense/full.ts, packages/redact/src/dom/reconcile.ts, .changeset/error-boundary-recovery.md |
Hydration retries retain the Suspense start and end markers. Host-node collection and removal include those markers. The changeset records the recovery and marker changes. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- TanStack/redact#95: Changes Suspense hydration retries and preservation of server DOM ranges, related to marker handling here.
- TanStack/redact#103: Changes Suspense marker ranges and fallback-range removal, related to marker cleanup here.
- TanStack/redact#76: Covers class rendering and Suspense boundary-error paths related to the recovery logic here.
Suggested reviewers: tannerlinsley
Merge Risk: 
Minimal · up to 38110
-
The reviewed recovery and hydration changes have no identified merge-blocking issue; merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 5 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Why the change
Let an enclosing error boundary handle errors thrown by an inner boundary's fallback without losing the recovered content's hydrated Suspense range.
Special things to note
052ca013262875d4a226095b1139bd83bf206bc8, with no dependency on the SSR ID or insertion-context PRs; recovery exclusions apply only while that boundary is rendering its fallback.Change outline
Reproduce with this tree in both CSR and hydration, where
Throwerthrowsloader failure,Rethrowthrows its received error, andErrorPagerenders an interactive counter:packages/redact/src/dom/features/class/full.ts:103and:126reconcile recovery while the same class remains eligible to catch child errors.packages/redact/src/dom/reconcile.ts:768therefore retargeted the fallback's error to that inner class instead of the outer boundary.🤖 Generated with Claude Code
Summary by CodeRabbit