Skip to content

docs: fix content correctness findings from the docs audit - #7981

Open
FarhanAliRaza wants to merge 19 commits into
mainfrom
farhan/docs-content-fixes
Open

FarhanAliRaza wants to merge 19 commits into
mainfrom
farhan/docs-content-fixes

Conversation

@FarhanAliRaza

@FarhanAliRaza FarhanAliRaza commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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 docs: remove dead code, unused assets and unused dependencies from the docs app #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 docs: remove dead code, unused assets and unused dependencies from the docs app #7978).

The Bring Your Own Cloud page listed `reflex cloud deploy --aws` and
`--azure`, which the hosting CLI never had: its standalone deploy only
accepts --gcp, and since reflex-hosting-cli 0.1.70 the command is named
`reflex cloud gcp-standalone` (the old name is a deprecated alias). Point
the BYOC, Cloud Run and cloud provider pages at the real command and add the
Cloud Run options the CLI accepts but the page did not list.
Without WebGL the Spline demo on the Wrapping React overview throws while
creating its context, and the error reached the app's root boundary, which
replaced the whole page with "Application Error". Wrap every deferred
preview in its own error boundary so only the preview is replaced by a short
fallback, and cover it with a browser test that disables WebGL.
The AG Grid page still taught the deprecated rx.Model and rx.session(), and
its computed var queried the database on every state read while the page
load inserted the CSV again each time. Use the SQLAlchemy base and async
session pattern from the database overview, seed the table once, and load
rows into state. Execute the example in the database docs tests and fail if
any page outside the migration guides teaches the deprecated APIs.
The HTML integration pages rewrite screenshot URLs to the copies the site
serves, but the agent-readable .md copies kept the raw GitHub URLs, and 18 of
the 40 images are not on the integrations-docs default branch, so they 404.
Apply the same rewrite to the .md copies, made absolute with deploy_url like
their other links.

Every rendered Markdown image also had the alt text "Documentation image";
pass the image's Markdown alt text through instead.
CLAUDE.md called the app a slimmed-down fork of reflex-web and pointed at
modules that do not exist. Describe it as the monorepo docs site served under
/docs, with its real layout, commands, whitelist rule, tests and CI checks.

The README said the sitemap used the localhost frontend_url; it emits
https://reflex.dev/docs/... canonical URLs built from REFLEX_DOMAIN_URL, and
only the agent-readable exports depend on deploy_url.
- Remove the 14 embeds of a 2024 third-party video tutorial; its segments
  show APIs the docs no longer teach, such as rx.Model.
- Drop Next.js-era statements: rx.script renders through React Helmet, the
  exported frontend is a React build, and pages compile to .web/app/routes.
- reflex-enterprise 0.9.7 has shipped, so the AG Grid notes no longer call
  it upcoming.
- Use the supported alert directive on the low-level form page, which used
  an unknown one that rendered unstyled, and title Client Storage properly.
- Give pages that shared an H1 with another page, and ambiguous one-word
  H1s, descriptive headings. Routes and sidebar labels are unchanged.

Tests guard against unknown directives, the retired references, and
duplicate H1s.
@FarhanAliRaza
FarhanAliRaza requested review from a team and Alek99 as code owners November 23, 2026 21:29
@FarhanAliRaza FarhanAliRaza added bug Something isn't working documentation Improvements or additions to documentation labels Nov 23, 2026 — with ChatGPT Codex Connector
…fragments

reflex-site-shared is an internal package that takes no news fragments.
The docs app imported its private _integrations_doc_images_url; rename it
to integrations_doc_images_url so the agent-file plugin uses a public name.
It stays cached with @once, so the symlink it creates is made once per
process, not per Markdown file.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/components/props.md Resolved
Comment thread docs/database/queries.md Resolved
Comment thread docs/app/README.md Resolved
Comment thread docs/events/special_events.md Resolved
Comment thread docs/ai_builder/images.md Resolved
Comment thread docs/app/README.md Resolved
Comment thread docs/app/CLAUDE.md Resolved
@codspeed

codspeed Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 19 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 146 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing farhan/docs-content-fixes (708bed3) with main (3558533)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no new blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Corrects outdated docs, preserves image alt text, fixes exported integration image links, and keeps failed previews from replacing the whole page.

  • The cloud guides show the supported GCP command and its options.
  • The AG Grid database example uses SQLAlchemy models and async sessions.
  • A failed interactive preview no longer takes down its whole docs page.
  • Exported Markdown uses local integration images and keeps image alt text.
  • The docs no longer embed the retired 2024 video.
  • Documentation headings name their topic more clearly.
  • The docs describe current routes, APIs, and site behavior.

Reviews (8) · Last reviewed commit: "docs: describe the AG Grid edit event by..." · Reviewed by Greptile

Comment thread docs/enterprise/ag_grid/index.md Resolved
Comment thread docs/components/props.md Resolved
- Restore the blank line after every renamed H1; the rename dropped it.
- Keep the component props page's H1 as Props (its first section is
  Component Props), and broaden the special-events and Reflex Build images
  headings to cover the whole page.
- Show --gcp-project, which gcp-standalone requires, on the organization
  cloud providers page, and drop the Next.js data-nscript attribute from the
  rx.script output example.
- AG Grid example: read the seed CSV off the event loop and accept edits only
  to the editable columns.
- README and CLAUDE.md: name the sitemap fallback for pages without a
  canonical URL, the fixed reflex.dev links in exports, the -style/-ll helper
  files, and where each pre-commit check runs.
- Tests: assert the Spline scene loaded before checking the fallback, walk
  list items for directives, and compare H1s by their full text.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 88 files

Requires human review: Auto-approval blocked because this review re-detected 8 unresolved issues already reported by Cubic.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/app/tests/test_site_quality.py Resolved
Comment thread docs/enterprise/ag_grid/index.md Resolved
FarhanAliRaza and others added 9 commits November 23, 2026 21:38
- AG Grid example: skip a row that no longer exists before applying an edit.
- Log the error a deferred preview's boundary catches, so a real demo bug is
  visible in the console instead of only as the browser fallback.
- Match the graphing tooltip H1 to its manual title, Graphing Tooltip.
- Check that each low-level page repeats its page's H1 instead of skipping it.
- Drop the substring check on the Code tab from the WebGL browser test; the
  exact heading and fallback text already show the page still renders.
#7980 added reflex_docs/sections.py, which assigns each route its navbar tab
and sidebar section.
- Low-level Form: put the production warning in the alert title, so the
  collapsed alert still shows it.
- AG Grid database example: say that db_url and async_db_url must be set
  in rxconfig.py (async_db_url defaults to None), with a config snippet.
- BYOC / deploy-to-gcp: match the CLI's order (Reflex auth, bash/gcloud/
  docker checks, active gcloud account), document that --interactive
  defaults to whether stdout is a terminal, and describe the missing-tool
  errors without a made-up quote.
- docs/app README: only static pages without a canonical URL fall back to
  config.frontend_url; dynamic routes without one are left out of the
  sitemap.
- docs/app CLAUDE.md: reflex export and reflex run --env prod need a paid
  tier or the Built with Reflex badge, which this app turns off.

Claude-Session: https://claude.ai/code/session_01LwJUCTniiCdPmZZTUyJMvK
…ixes

# Conflicts:
#	docs/app/tests/test_site_quality.py
The rewritten example raised as soon as its page was built. `row_data`
rejects a `list[Country]` (it takes a sequence of mappings), and
`on_cell_value_changed` passes one dict, so the three-argument handler
raised EventFnArgMismatchError. State now holds the rows as dicts and the
handler reads `rowIndex`, `field` and `newValue` from the event. The
example test now builds the page and sends the event in the grid's shape.

Claude-Session: https://claude.ai/code/session_01LwJUCVnhH4woUDb5zNE9o9
Keep the whole rule in the alert's heading, the part that stays visible
(a callout with a body renders collapsed), and drop "Please" and "for now".

Claude-Session: https://claude.ai/code/session_01LwJUCVnhH4woUDb5zNE9o9

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/enterprise/ag_grid/index.md Resolved
rowIndex is the row's position in the grid as displayed, so after sorting
or filtering it no longer indexes the state's row list and an edit could
update the wrong country. Give the grid row_id_key="id" and look the
country up by the event's node_id, the database id. The example test now
edits a row whose displayed position differs from its list index.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/enterprise/ag_grid/index.md Resolved
The paragraph above the example still said the handler reads rowIndex.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant