Skip to content

fix(server): serve the /h/N history page only from flexviz serve and show(), not from a mounted app - #149

Merged
jvdd merged 4 commits into
mainfrom
fix/history-route-agent-server-only
Oct 5, 2026
Merged

jvdd merged 4 commits into
mainfrom
fix/history-route-agent-server-only

Conversation

@jvdd

@jvdd jvdd commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

GET /h/{n} was a route of flexviz.app, so every app that mounts or runs FlexViz (mount_into(), Streamlit, Dash, Gradio, uvicorn.run(app)) served the recorded history of its working folder: figure titles, column names and selections.

  • app no longer has /h/{n}. run_server() (used by flexviz serve and show()) serves a separate app that adds the route and delegates every other path to app. It never changes app, so a later mount_into() in the same process still has no history route.
  • The served app keeps the API docs of app (/openapi.json, /docs).
  • run_server is exported from flexviz. The skill's derived-column recipe now calls it, so it keeps /h/N and gets the loopback Host check.
  • The agent eval harness grades run_server(...) as a serve call, and its loopback check uses the server's own is_loopback_bind.
  • Architecture.md, the API reference, and the agent and web apps guides are updated.

Tests: the bare and mounted app answer 404 on /h/1 in a folder with a history entry; the app that run_server serves answers 200 and still documents the dashboard routes.

Closes #142

@codspeed

codspeed Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 32 untouched benchmarks


Comparing fix/history-route-agent-server-only (b350c98) with main (7e4b61a)

Open in CodSpeed

@jvdd
jvdd merged commit 6ca9cd1 into main Oct 5, 2026
20 checks passed
@jvdd
jvdd deleted the fix/history-route-agent-server-only branch October 5, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server: do not serve /h/{n} from the mountable app

1 participant