docs: fix content correctness findings from the docs audit

FA
26m ago
+584-246

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

What changed

I re-checked each audit finding against current main before fixing it.

  1. BYOC documented CLI flags that don't exist. The hosting CLI has no --aws or --azure flag. Its standalone deploy accepts only --gcp, and since reflex-hosting-cli 0.1.70 the command is reflex cloud gcp-standalone (reflex cloud deploy is a deprecated hidden alias).
    • bring-your-own-cloud.md now covers Google Cloud only and points AWS/Azure users to self-hosting.
    • deploy-to-gcp.md, cloud-providers.md and the org cloud_providers.md use the real command name.
    • The Cloud Run options the CLI accepts but the page didn't list are added: --cpu, --memory, --min/max-instances, --[no-]allow-unauthenticated, --service-account, --env, --envfile.
  2. Spline demo crashed the whole page without WebGL. With WebGL off, the page showed "Application Error: Error creating WebGL context".
    • DeferredDemo.jsx (reflex-site-shared) now wraps each deferred preview in its own React error boundary, so only that preview is replaced by "This preview could not load in this browser."
    • I put the boundary in the JSX rather than using rx.error_boundary: that component's default on_error reports to the backend, and its fallback is the full-page error UI.
  3. Deprecated rx.Model / rx.session() in the AG Grid example.
    • The AG Grid database example now uses the SQLAlchemy Base + async_sessionmaker pattern from database/overview.md.
    • It also fixes two old problems: the example re-inserted the CSV on every page load, and it queried the database inside a computed var.
    • No other page teaches the deprecated APIs. tables.md and the 0.11 upgrade guide explain the migration, so they stay.
  4. 2024 third-party video (CodingEntrepreneurs, ITOZkzjtjUA) embedded 14 times.
    • All 14 embeds are removed. Its segments show APIs the docs no longer teach (e.g. rx.Model in the database segment shown on the database overview).
    • No segment was the best resource for its page, so none were kept.
  5. Integration images in the .md copies.
    • The HTML pages already rewrite screenshot URLs to the copies the site serves, but the .md copies kept the raw GitHub URLs. 18 of those 40 URLs return 404 because the images aren't on the integrations-docs default branch.
    • generate_markdown_file_content now applies the same rewrite, made absolute with deploy_url like the other export links. It uses integrations_doc_images_url() (renamed from the private _integrations_doc_images_url); that function is cached with @once, so its asset symlink is created once per process.
    • img_comp_xd now takes the image's Markdown alt text instead of hard-coding "Documentation image". All 40 integration images have authored alt text.
  6. README sitemap origin. Sitemap and canonical URLs are https://reflex.dev/docs/..., built from REFLEX_DOMAIN_URL + frontend_path. rxconfig.py sets no deploy_url; only the agent-readable exports depend on it. The README now says this.
  7. Stale content.
    • Next.js references: rx.script renders through React Helmet, not next/script (fixed on script.md and browser_javascript.md). reflex export produces a React build, not a NextJS app. The leaflet example's React code is now described as written for Next.js.
    • .web/pages → .web/app/routes.
    • reflex-enterprise 0.9.7 shipped on 2026-10-08, so the AG Grid pages no longer call it "upcoming".
    • form-ll.md used an unknown md warning info directive, which rendered unstyled; it's now md alert warning.
    • Title "Client-storage" → "Client Storage".
  8. docs/app/CLAUDE.md is rewritten. It now describes the monorepo docs app served under /docs, its real layout, commands, the enterprise login/CI startup note, the whitelist rule, tests and CI checks. Every path it names was verified to exist. It names no module that #7978 deletes.
  9. H1s.
    • 14 duplicated H1s now have unique headings. The duplicates were the Agent Toolkit, Files, Installation, Overview, Bring Your Own Cloud, Special Events, Utility Functions, Props, Theming, Tooltip and Grid H1s; -ll low-level variants intentionally share their page's H1.
    • About 35 ambiguous one-word H1s get descriptive ones, e.g. Database Queries, App Logs, Workflow Steps, React Flow Nodes, State Overview.
    • Only the H1 text changed. Routes and frontmatter titles are unchanged. I fixed the one link to an old H1 anchor (/hosting/tokens/#tokens).
    • Component-name H1s (Button, Avatar, …) are left alone because they're clear in context. API/CLI reference pages are left to session C.
    • No navigation label changed. Sidebar, pager (prev/next) and breadcrumb labels come from each route's title, which is built from the file name, manual_titles/nav_titles, or frontmatter title, never from the H1. I dumped the title of every registered route (452) plus the title maps on main and on this branch: they are identical. The H1 shows only as the page heading and as the first entry of the in-page "On this page" list.

News fragments: docs/app/news/+docs-content-audit.docs.md and docs/app/news/+integration-markdown-images.bugfix.md. reflex-site-shared is an internal package and takes none.

How I verified it

Each regression test below failed before its fix and passes after:

  • test_editorial_browser.py::test_spline_preview_falls_back_without_webgl: a Playwright run against a prod build with WebGL stubbed out. Before: h1 "Application Error". After: h1 "Wrapping React", the preview shows the fallback, and the Code tab still works. With a real Chromium launched with --disable-webgl --disable-gpu, I saw the same before/after. With WebGL enabled, the Spline canvas still renders.
  • test_database_examples.py::test_docs_examples_avoid_deprecated_database_apis and test_ag_grid_database_example: the second runs the new example against SQLite. It checks that seeding happens once, the rows load, and a cell edit persists.
  • test_agent_files.py::test_generate_markdown_file_content_serves_integration_images_locally: an exact-output test. Against the real build inputs, 0 raw GitHub image URLs remain in the .md copies, and all 40 images are in .web/public/external/integrations_docs/docs/.
  • tests/units/reflex_site_shared/docs/test_markdown.py::test_images_keep_their_markdown_alt_text: compares the full rendered output.
  • test_site_quality.py: test_docs_use_only_rendered_directives, test_docs_drop_retired_references and test_page_headings_are_unique.
  • uv run pytest tests/ in docs/app, uv run pytest tests/units/reflex_site_shared, ruff, pyright and pre-commit run --from-ref origin/main all pass.

Not verified locally: a full reflex export can't finish in my environment. It compiles all 1140 pages, but then the network proxy refuses the masenf/hello-react GitHub tarball (403), so test_doc_links.py / test_published_seo.py against a full sitemap are left to CI. I checked the routes behind every new link directly.

Two existing tests, test_spline_preview_waits_for_visibility_and_idle[390/1440], timed out in my headless environment both before and after this change. That's unrelated to this PR.

Skipped / scoped out

  • Python-generated pages with one-word H1s (CLI reference "Apps", component category pages "General"/"Other") are owned by sessions B and C.
  • admin-dashboard.md uses SQLModel directly, not rx.Model. It already documents the starlette-admin / MappedAsDataclass constraint, so I left it as is.
  • I didn't mention tests/test_module_reachability.py in CLAUDE.md because it isn't on main yet (it's added in #7978).