Surface package changelogs on docs site#6636
Conversation
At startup the docs app now reaches up to the repo root and pulls in the towncrier-managed changelogs (repo-root CHANGELOG.md plus each packages/*/CHANGELOG.md), serving them through the regular docgen pipeline: - /changelog/ renders the main reflex changelog; each subpackage gets /changelog/<package>/. New package changelogs appear automatically. - The reflex-enterprise changelog is read from the installed distribution (via its dist RECORD) instead of a checked-in copy, so it can never go stale; the page appears once the published wheel ships a CHANGELOG.md. - Changelog markdown is normalized with a canonical H1 title, and the on-page TOC is limited to version headings. - Pages are listed in a Changelog section of the API Reference sidebar, included in llms.txt/llms-full.txt and .md asset serving, and the footer/navbar Changelog links now point at the new page instead of GitHub releases. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR surfaces package changelogs directly on the docs site at
Confidence Score: 5/5Safe to merge — changes are additive, well-tested, and confined to the docs app. All changes are additive: a new discovery module, a new rendering handler, sidebar wiring, and CI flag additions. The implementation is consistent with existing patterns in the codebase, includes a comprehensive test suite covering discovery, normalisation, route validation, and edge cases. The only production code path that could fail at runtime (file read on render) is guarded by the same startup-time existence check used elsewhere in the pipeline. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "Set APP_HARNESS_FLAG for CI jobs that ru..." | Re-trigger Greptile |
A wheel can vendor third-party changelogs deeper in its tree (e.g. bundled frontend assets); picking the first RECORD match could surface the wrong file. Sort candidates by path depth so the package-level changelog wins. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
The 0.9.0.post1 wheel ships reflex_enterprise/CHANGELOG.md, so the docs site now renders the enterprise changelog at /changelog/reflex-enterprise/. Exempt reflex-enterprise from the exclude-newer cutoff like the other internal lockstep packages. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
reflex-enterprise 0.9.0 restricts `reflex run --env prod` to paid tiers, which broke the reflex-docs integration jobs after the version bump. The gate explicitly exempts reflex's own integration tests via the app harness flag, so set it for every job that boots the docs app in prod. https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
Type of change
Description
This PR adds changelog discovery and rendering to the docs site, making package changelogs accessible at
/docs/changelog/instead of requiring users to visit GitHub releases.What changed:
New
reflex_docs/changelogs.pymodule — Discovers and normalizes changelogs:discover_repo_changelogs()finds towncrier-managed changelogs in the monorepo (repo root +packages/*/CHANGELOG.md)find_distribution_changelog()locates changelogs shipped with installed distributions (e.g.,reflex-enterprise)discover_changelogs()combines both sources, orderingreflexfirst then alphabeticallynormalize_changelog()ensures consistent H1 headings across different changelog formats (towncrier vs. Keep-a-Changelog)Changelog rendering in docs — Integrated into the docs pipeline:
handle_changelog_doc()handler normalizes changelog markdown and limits TOC to version headings (H2 and above)docs/changelog/with the mainreflexchangelog at the section index/changelog/instead of GitHub releasesSidebar navigation — Added changelog section to the docs sidebar:
get_sidebar_items_changelog()dynamically generates sidebar items from discovered packagesHelper function — Added
render_markdown_with_toc()to extract heading structure while rendering markdownDocumentation — Updated
CONTRIBUTING.mdto explain where changelogs are publishedTests
docs/app/tests/test_changelogs.pycovering:test_routes.pyto ensure all discovered changelogs are servedtest_agent_files.pyfor root-level markdown docsAll tests pass with the changes.
Related issues
Closes the need for users to navigate to GitHub releases for changelog information.
https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7