Fix 0.11 changelog and database guide gaps from 0.11.0a1 QA
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
- This change requires a documentation update
Docs and changelog only. No framework code changes.
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?
Found in the reflex 0.11.0a1 pre-release testing (FINDING-014, -020, -024).
FINDING-024: app() no longer returns a Starlette app. Since #7624, rx.App.__call__ returns _RootMiddleware, which has no add_middleware, routes or mount. The changelog mentioned this only in the Performance entry.
- Added
news/7624.breaking.md, which points atapi_transformer, the documented way to add middleware and routes.app._apiis private, so the entry doesn't mention it. - Removed the same sentence from
news/+lighter-asgi-entrypoint.performance.mdso the change isn't listed twice. - The fragment is named after #7624 instead of
+<slug>. An orphan fragment gets renamed after the PR that added it, so a+name would link the entry to this docs PR instead of the PR that made the change.
FINDING-014: admin dashboard guide (docs/database/admin-dashboard.md)
- The guide now says the dashboard is served at
/admin/./adminwithout the trailing slash returns 404 behindapi_transformer: starlette-admin'sMount("/admin")doesn't match it, so the request falls through to Reflex's catch-all mount. The migration note no longer says existing links keep working. It now saysrx.AdminDashredirected/admin, and that links without the slash need updating. - Defined the
MyAuthProviderthe example uses: a minimal starlette-admin 1.xAuthProviderthat checks one username and password from environment variables. The page still links to the starlette-admin auth guide for a real user store. - Added a note on
MappedAsDataclassmodels. starlette-admin's "New" form callsself.model()with no arguments, so every constructor field needs a default orinit=False. Otherwise saving the form fails with a 500 (TypeError: __init__() missing ... 'name').
FINDING-020: custom serializer in docs/database/tables.md. The example called dataclasses.asdict, which follows relationships. That raises DetachedInstanceError for a relationship the query didn't load and RecursionError for a loaded one that links back. The example now builds the dict from sqlalchemy.inspect(post).mapper.column_attrs, and a sentence explains why.
- Extended
test_tables_custom_serializerindocs/app/tests/test_database_examples.pyto givePosta relationship. The test now serializes a post with and without the relationship loaded. It fails withDetachedInstanceErroragainst the old snippet and passes with the new one.
Verification
- Ran the guide's main example verbatim in process through
TestClientagainst starlette-admin 1.0.3:/admin→ 404,/admin/→ 303 to login, login → 303, "New" for a SQLModel model → 303. "New" for aMappedAsDataclassmodel fails with a 500 /TypeErroras described, and with a default orinit=Falseit gives 303. docs/app:pytest tests/test_database_examples.py tests/test_doc_links.py tests/test_rendered_markdown.py tests/test_frontmatter_meta.pygave 45 passed. The sitemap link check xfails locally because it needs an exported site; CI runs it with--runxfail.pre-commit run --fileson the changed files passes.
Generated by Claude Code