Conversation
This was referenced Oct 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #73.
What changed
docs/guides/web-apps.md(nav entry after Embedding). It shows a FlexViz dashboard inside a web app, on the same server and port:st.App(routes=[Mount("/flexviz", app=flexviz.app)]), a relativeshare_url(server_url="/flexviz"),st.iframe.mount_into(app.server). The Flask backend uses the Flask recipe onapp.server.mount_into()on the FastAPI app beforegr.mount_gradio_app(path="/").mount_into().a2wsgi.ASGIMiddlewareinsideDispatcherMiddleware.TrustedHostMiddlewarewrap against DNS rebinding.DispatcherMiddleware. That cannot call an ASGI app. The guide now links to the a2wsgi recipe.mount_into()docstring and error: same fix, now naminga2wsgi.ASGIMiddleware. The test asserts the new hint.Facts behind the guide
--server.baseUrlPath, also passed.TypeError: FastAPI.__call__() missing 1 required positional argument: 'send'./makes/flexviz/viewreturn 404.st.cache_data, each rerun builds new uids, so a new URL, and the iframe reloads and loses zoom and selections. With the cache, the iframe stays.st.iframefalls back to 400 px for this URL. The guide gives the real heights: 400 px panel, 45 px toolbar, 45 px active-filter bar.TrustedHostMiddleware(flexviz.app, ...)returned 400 for a foreignHostand 200 for a loopback one, in both a FastAPI mount and a Flask/a2wsgi mount.Checks
mkdocs build --strictpasses. The anchors#who-owns-width-and-height,#in-an-iframeand#flask-and-other-wsgi-appsresolve.ruff format --checkandruff checkare clean.tests/test_integration.pyandtests/test_server.py: 121 passed. The new assertion fails onmain.Review follow-up (6fe06a4)
make_data.pywrites thereadings.parquetthat the examples read. Without the file, the first chart update returned 500.cache=True, a changed file gives a stale first view. Without the cache, the updates fail: Polars keeps the metadata of a scanned file after the first collect, and then panics (os error 22). The guide says to restart the server, and links to the caching guide. Repro posted on Cache: invalidate a cache=True source when its data changes #39./flexviz/h/Nfrom.flexviz/history.jsonl, and links to the agent safety notes. The code change is Server: do not serve /h/{n} from the mountable app #142.title. Streamlit cannot take one:st.iframehas notitleparameter and setstitle="st.iframe".mkdocs build --strictpasses.Not in this PR
Dashboard()without data, plusshare_url(source_name=...), writessource=Noneinto every figure, so each update returns 500./h/{n}only fromflexviz serveandshow(), not from the mountable app.