Improve docs indexing, accessibility, and initial load performance - #7078
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
All reported issues were addressed across 73 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 13 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Addressed Masen’s AI sidebar casing feedback in a7e412a: the APIs and URLs page titles now preserve their acronyms, and the sidebar normalizer preserves those plural forms too. The group labels and child entries now match ( |

Problem and result
Mounted production builds were overwriting prerendered docs with asset directories and the root SPA shell. This left the docs home without indexable content and six articles returning 404. Other pages repeated metadata, exposed legacy URLs as 200/JavaScript redirects, and loaded substantial code and chart work before readers needed it.
This PR repairs the production output, improves shared docs structure and accessibility, and reduces initial work while preserving interactive examples. The complete final production crawl verifies 418/418 canonical pages, and all 94 legacy redirects resolve correctly.
What changed and why
REFLEX_DEPLOY_URLsupplied by deployment jobs), the standard sitemap XML namespace, and frontend-prefix-aware sitemap generation. Fix duplicate H1 content, broken fragments, and missing image alt text.frontend_lazy_bundled_librariesconfiguration and enable it for docs; optional dynamic namespaces load once on demand and retry after failures. Core React/context identity is preserved, and the framework default stays eager for compatibility. Preload global CSS explicitly.demo exec deferflag mounts Plotly previews as readers approach them, reserves space, and preserves server-rendered source. Charts now fit their mobile container. Remove docs-wide marketing pixels/session recorders.Before and after
Lighthouse performance scores (out of 100), before → after:
Lighthouse SEO is 100 in all 26 recorded runs. Best practices improved from 54 to 100 except AG Grid (96, due to enterprise trial-license console messages). SEO scores alone missed the original broken/empty pages, so the full raw-HTML crawl is the primary correctness check.
Initial local JavaScript in the HTML/module-preload graph (gzip):
/docs/getting-started/introduction//docs/library/forms/button//docs/api-reference/app//docs/library/graphing/other-charts/plotly/Measurement provenance: the Lighthouse table was recorded on
654132a. The subsequent review fixes change highlighting invalidation, focus outlines, title casing, breadcrumb edge cases, and test fixtures; all 26 performance runs were not repeated after those fixes. The complete 418-page crawl and production browser checks were repeated atfe56d43a. The follow-up inf2a0f434was checked with the complete docs suite, all four frontend regressions, real app imports under staging URL settings, and separate dev/static frontend redirect checks.Method: production builds against base
bae7294119a8ffa2b3177a0a0f0063d76b616d86, same macOS/Apple M5 Pro machine, Node 26, Chrome 152, Lighthouse 13.4.1 with default simulated throttling and fresh headless Chrome launches. Eleven routes on mobile/desktop; home/introduction mobile scores are medians of three runs, others single runs. All 26 results are included, including regressions. These local measurements are not field Core Web Vitals. The home originally served an empty shell, so its corrected payload is not an equivalent isolated speed comparison.Validation
uv run --no-sync coverage run -m pytest tests/units -q, thencoverage report.docs/app.reflex-docsPython 3.11/3.12 CI jobs now run the frontend suite after the production build, so these checks run on each PR.pyright reflex testspass; no stub hash changes.Initial validation coverage detail (654132a): pytest-cov's standard invocation passes all unit tests but reports 71.14% because optional pytest plugins import framework modules before its hook starts. Starting coverage before pytest measures 76.50%; the separate units-plus-docs pytest-cov run measures 72.90%. Earlier CLI failures were resolved by fetching Git history/tags and reinstalling editable packages to replace invalid shallow-clone version metadata. No assertions or coverage thresholds were disabled.
Review notes and limits
Submission checklist
The subsequent
a7e412affollow-up removes the hardcoded production origin from docs config, preserves APIs/URLs casing in page titles and sidebar labels, and passes 449 docs tests (1 skipped). Theshow_built_with_reflex=Falsesetting remains enabled in the docs config to hide the badge.