Repository navigation
docs: fix content correctness findings from the docs audit - #7981
FarhanAliRaza wants to merge 19 commits into
Conversation
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.
…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.
There was a problem hiding this comment.
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
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryCorrects outdated docs, preserves image alt text, fixes exported integration image links, and keeps failed previews from replacing the whole page.
Reviews (8) · Last reviewed commit: "docs: describe the AG Grid edit event by..." · Reviewed by Greptile |
- 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.
There was a problem hiding this comment.
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
- 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
…farhan/docs-content-fixes
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
There was a problem hiding this comment.
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
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.
There was a problem hiding this comment.
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
The paragraph above the example still said the handler reads rowIndex.
All Submissions:
Type of change
Changes To Core Features:
What changed
I re-checked each audit finding against current main before fixing it.
--awsor--azureflag. Its standalone deploy accepts only--gcp, and since reflex-hosting-cli 0.1.70 the command isreflex cloud gcp-standalone(reflex cloud deployis a deprecated hidden alias).bring-your-own-cloud.mdnow covers Google Cloud only and points AWS/Azure users to self-hosting.deploy-to-gcp.md,cloud-providers.mdand the orgcloud_providers.mduse the real command name.--cpu,--memory,--min/max-instances,--[no-]allow-unauthenticated,--service-account,--env,--envfile.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."rx.error_boundary: that component's defaulton_errorreports to the backend, and its fallback is the full-page error UI.rx.Model/rx.session()in the AG Grid example.Base+async_sessionmakerpattern fromdatabase/overview.md.tables.mdand the 0.11 upgrade guide explain the migration, so they stay.ITOZkzjtjUA) embedded 14 times.rx.Modelin the database segment shown on the database overview)..mdcopies..mdcopies 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_contentnow applies the same rewrite, made absolute withdeploy_urllike the other export links. It usesintegrations_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_xdnow takes the image's Markdown alt text instead of hard-coding "Documentation image". All 40 integration images have authored alt text.https://reflex.dev/docs/..., built fromREFLEX_DOMAIN_URL+frontend_path.rxconfig.pysets nodeploy_url; only the agent-readable exports depend on it. The README now says this.rx.scriptrenders through React Helmet, notnext/script(fixed onscript.mdandbrowser_javascript.md).reflex exportproduces 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.form-ll.mdused an unknownmd warning infodirective, which rendered unstyled; it's nowmd alert warning.docs/app/CLAUDE.mdis rewritten. It now describes the monorepo docs app served under/docs, its real layout, commands, the enterprise login/CIstartup 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.-lllow-level variants intentionally share their page's H1./hosting/tokens/#tokens).manual_titles/nav_titles, or frontmattertitle, 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.mdanddocs/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_apisandtest_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.mdcopies, 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_referencesandtest_page_headings_are_unique.uv run pytest tests/in docs/app,uv run pytest tests/units/reflex_site_shared, ruff, pyright andpre-commit run --from-ref origin/mainall pass.Not verified locally: a full
reflex exportcan't finish in my environment. It compiles all 1140 pages, but then the network proxy refuses themasenf/hello-reactGitHub tarball (403), sotest_doc_links.py/test_published_seo.pyagainst 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
admin-dashboard.mduses SQLModel directly, notrx.Model. It already documents the starlette-admin /MappedAsDataclassconstraint, so I left it as is.tests/test_module_reachability.pyin 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).