Repository navigation
fix: prepare API presentation at build time and preserve initial styles - #315
Merged
Merged
Conversation
javorosas
marked this pull request as ready for review
October 21, 2026 15:42
Member
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
The API reference briefly loses its layout in dark mode while JavaScript loads: icons become oversized, columns collapse, and parts of the content lose their styles. The page also clones and transforms the entire specification in each browser even though those presentation changes depend only on the specification and locale.
Presentation labels and property ordering are prepared while Docusaurus loads build content. The page passes the prepared specification directly to ReDoc. The original bundle remains the download source, so the Spanish and English OpenAPI contracts and SDK types do not change. ReDoc still hydrates for interactive schemas and samples.
Nested objects with local required lists display required fields first. The three composed customer creation alternatives also group their inherited required fields before optional contact fields. Invoice and retention creation roots retain the agreed stable field order across modes, so draft status does not move above customer. The required lists themselves are unchanged. Browser checks cover Mexican, foreign, and general-public customer variants.
The generated CSS needs two corrections before hydration. Redocusaurus emits an invalid dark-mode selector, and its dark stylesheet uses generated class names that differ from the light-theme HTML rendered on the server. The post-build correction fixes the selector and adds matching server-class alternatives to the dark selectors with
:is(), preserving their specificity and their original hydrated classes. The correspondence comes from styled-components' per-component SSR metadata. Missing components, differing variant counts, or ambiguous mappings fail the build rather than silently publishing an incompatible stylesheet. This is a temporary dependency on that output format and must be reviewed during renderer upgrades; related upstream issue: rohit-gohri/redocusaurus#215. No DOM edits, dependency-source patches, or additional ReDoc render passes are introduced. PostCSS is declared as a build dependency and is not added to the browser bundle.Validation: the complete Spanish/English production build passes without a heap override. Existing contract checks verify 127 operations in each language; downloaded schemas remain structurally identical to the source specifications. Ad hoc checks verify exact presentation parity with the previous implementation, both generated stylesheets, and rejection of incompatible SSR metadata. Browser checks use temporary script-free HTML copies to inspect light/dark Spanish and dark English before hydration; normal-page checks cover invoice draft tabs, customer alternatives, required markers, retention ordering, and switching both color modes. No new test cases were added to the suite.