fix: let the CLI auto-open the browser - #284
Open
iabaako wants to merge 1 commit into
Open
Conversation
The datasure entry point forced --server.headless true, which suppresses Streamlit's normal behavior of opening a browser tab on launch. This looks like a leftover from the old PyInstaller-packaged build (no webbrowser.open() call exists anywhere in the current source to replace it), and it overrode the headless = false already set in src/datasure/.streamlit/config.toml. Dropping the flag restores the default streamlit run experience: uv run datasure now opens the browser automatically, matching just datasure-dev.
|
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.



Pull Request Summary 🚀
What does this PR do? 📝
Removes
--server.headless truefrom thedatasureCLI entry point(
src/datasure/cli.py) souv run datasureopens the user's defaultbrowser automatically, like plain
streamlit runalready does.Why is this change needed? 🤔
Running
uv run datasurestarts the server but never opens a browsertab.
server.headlessis the exact Streamlit setting that suppressesauto-opening a browser (intended for headless/container deployments).
Nothing in the current source calls
webbrowser.open()to compensate,so this looks like a leftover from an old PyInstaller-packaged build.
It also silently overrode
headless = false, which is already set inboth
.streamlit/config.tomlandsrc/datasure/.streamlit/config.toml-CLI flags take precedence over
config.toml, so the config's intent wasnever honored.
How was this implemented? 🛠️
Deleted the two
sys.argventries"--server.headless", "true"fromcli.py's Streamlit launch args. No other flags changed.How to test or reproduce ? 🧪
uv run datasurestarts the server but nobrowser tab opens (must copy the printed localhost URL manually)
uv run datasureopens the default browser tohttp://localhost:8501automatically, matchingjust datasure-devScreenshots (if applicable) 📷
N/A (CLI flag change, not a UI change)
Checklist ✅