refactor: update Base infrastructure for hooks compatibility#1300
Merged
serikjensen merged 3 commits intomainfrom Mar 20, 2026
Merged
refactor: update Base infrastructure for hooks compatibility#1300serikjensen merged 3 commits intomainfrom
serikjensen merged 3 commits intomainfrom
Conversation
Remove Suspense from BaseBoundaries and add it back at each component call site, so hook-based components can opt out of Suspense-based data fetching. Add isLoading prop to BaseLayout for simple loading state without Suspense. Update BaseLayout to accept an array of SDKErrors with a multiple-errors rendering path (top-level message + bulleted list with nested field errors per error). Made-with: Cursor
jeffredodd
approved these changes
Mar 20, 2026
Rename fe -> fieldError and err -> error for readability. Regenerate i18n types for multipleErrorsEncountered key. Made-with: Cursor
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.
Summary
Refactors
BaseBoundariesandBaseLayoutto support hook-based usage without requiring Suspense, as described in the hooks RFC (PR #1254).BaseBoundariesno longer wraps children inSuspense—Suspenseis added back at each existing component call site so current SDK components are unaffectedBaseLayoutaccepts anisLoadingprop for hook-based components to render a loading state without SuspenseBaseLayoutacceptsSDKError | SDKError[] | nullfor theerrorprop (backwards compatible) — multiple errors render a top-level "multiple problems" message with a bulleted list of each error, field errors nested as sub-listsBaseLayoutandBaseLayoutPropsare now exported from@/components/BaseChanges
Base.tsx: RemoveSuspensefromBaseBoundaries; add it directly inBaseComponent. RefactorBaseLayoutintoSingleErrorContentandMultipleErrorsContentsub-components. AddisLoadingprop.index.ts: ExportBaseLayout,BaseLayoutProps,BaseBoundariesPropsConfirmWireDetails.tsx: AddSuspensewrapper insideBaseBoundariesInformationRequests.tsx: AddSuspensewrapper insideBaseBoundariesPayrollConfigurationProvider.tsx: AcceptLoaderComponentdirectly, addSuspensewrapper insideBaseBoundariescommon.json: Addstatus.multipleErrorsEncounteredtranslation keyTest plan
tsc --noEmitpasses (verified locally)BaseLayoutwith a singleSDKErrorrenders identically to beforeBaseLayoutwith an array ofSDKError[]renders top-level message + bulleted error list with nested field errorsBaseLayout isLoadingrenders the loading indicatorMade with Cursor