feat: add fault serialization adapter for react-router#98
Merged
adelrodriguez merged 1 commit intomainfrom Feb 19, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
This was referenced Feb 19, 2026
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
194a280 to
82e83d3
Compare
081be14 to
e581b6a
Compare
e581b6a to
c821ad6
Compare
39ff9b8 to
562f8f7
Compare
c821ad6 to
cbbae85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add fault serialization for React Router
This PR adds serialization support for
AppFaultobjects in React Router by:serialization.tsthat handles conversion betweenAppFaultobjects and their serializable representationisFaultutility andSerializableFaulttype from the error packageThis enables proper handling of fault objects when they're passed through React Router's loader/action data serialization process.
Greptile Summary
This PR adds serialization support for
AppFaultobjects in React Router by creating a custom serialization adapter that handles conversion betweenAppFaultinstances and their serializable representation.Changes made:
serialization.tswithfaultSerializeradapter using TanStack Router'screateSerializationAdapterAPIisFaultutility andSerializableFaulttype from the error package for proper type supportThe implementation enables
AppFaultobjects to be safely passed through React Router's loader/action data flow, which requires serialization for SSR and data hydration.Confidence Score: 5/5
AppFault.is()for testing,toSerializable()for serialization, andfromSerializable()for deserialization. The changes are minimal and well-contained across three files with clear separation of concerns.Important Files Changed
AppFaultobjects in React Router loaders/actionsfaultSerializeradapter with React Start instanceisFaultutility andSerializableFaulttype from faultierSequence Diagram
sequenceDiagram participant Loader as Route Loader/Action participant RR as React Router participant FS as faultSerializer participant AF as AppFault Loader->>RR: Return AppFault object RR->>FS: test(value) FS->>AF: AppFault.is(value) AF-->>FS: true FS->>AF: value.toSerializable() AF-->>FS: SerializableFault RR->>RR: Serialize to JSON Note over RR: Transfer over network RR->>RR: Deserialize from JSON RR->>FS: fromSerializable(value) FS->>AF: AppFault.fromSerializable(value) AF-->>FS: AppFault instance FS-->>RR: AppFault instance RR->>Loader: Deliver AppFault to componentLast reviewed commit: cbbae85