revert(docs): undo loader refactor revert while keeping FDR fallback fixes #5711
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.
Fixes FER-
Short description of the changes made
This PR reverts the revert from PR #5706, restoring the original loader refactor (
9b185fce6) and MDX parallelization (fdd07184c) commits while preserving the FDR fallback fixes from #5709 and #5710.Key changes restored:
readonly-docs-loader.ts): Re-addsDocsBranch*types,loadDocsBranchfunction, andloadDocsResponsecached wrapper. Updates fallback paths to useloadDocsResponseinstead of directloadWithUrlcalls.LayoutEvaluator.tsx,ChangelogPage.tsx): Restores parallel serialization of title, subtitle, and main content usingPromise.all.PageHeader.tsx): Re-addstitleMdxandsubtitleMdxprops for pre-serialized MDX content.mdx-serializer.ts): Exports theSerializedMdxtype separately.getMetadataFromResponsecalls to pass{ baseUrl }instead of full response.What was the motivation & context behind this PR?
The revert in #5706 didn't fix the underlying issue. This PR undoes that revert while ensuring the FDR fallback fixes (
getFilesUncachedand related changes from #5709/#5710) remain in place.How has this PR been tested?
pnpm lint:biome)pnpm format)getFilesUncachedfunction is still present and exposed inCachedDocsLoaderHuman review checklist
getFilesUncachedis still properly exposed and the "retry with uncached files" logic inserialize.tsworks with the restored parallelizationgetMetadataFromResponsesignature change (accepting{ baseUrl }instead of full response) is correct at all call sites inrevalidate/route.tsLink to Devin run: https://app.devin.ai/sessions/ce4e90665acb43a48c37f968833d72cc
Requested by: Sandeep Dinesh (@sandeepdinesh)