Add --hide-suggested-questions and --hide-build-context-hint CLI flags#47
Add --hide-suggested-questions and --hide-build-context-hint CLI flags#47SokolovYaroslav merged 6 commits intomainfrom
Conversation
Introduces two new flags (following the --read-only-domain pattern) to hide onboarding UI elements for demo deployments: - --hide-suggested-questions: hides the suggested questions block on the empty chat screen - --hide-build-context-hint: hides the 'Context isn't built yet' warning and removes the Build Context step from the setup wizard (renumbering the final step accordingly) Both flags are enabled by default in the Snowflake demo app. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds two new UI-related CLI flags to control visibility of (1) the suggested-questions block on empty chat and (2) the “context isn’t built yet” hint + the Build Context step in the setup wizard, wiring them through the Click CLI → Streamlit bootstrap → session state → UI rendering.
Changes:
- Add
--hide-suggested-questionsto hide the suggested questions UI on an empty chat. - Add
--hide-build-context-hintto hide the empty-chat “context not built” warning and conditionally remove/renumber the Build Context step in the setup wizard. - Enable both flags by default in the Snowflake demo app.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/databao_cli/ui/pages/welcome.py | Conditionally hides the Build Context wizard step and renumbers the final step. |
| src/databao_cli/ui/components/chat.py | Hides suggested questions UI and the “context not built” warning based on session flags. |
| src/databao_cli/ui/cli.py | Forwards new flags into Streamlit app args. |
| src/databao_cli/ui/app.py | Adds argparse flags and stores values in Streamlit session state; adds helper for build-context hint. |
| src/databao_cli/commands/app.py | Passes new CLI flag values into the Streamlit bootstrap call. |
| src/databao_cli/main.py | Adds Click options for the new flags and stores them in ctx.obj. |
| examples/demo-snowflake-project/src/databao_snowflake_demo/app.py | Appends the new flags to sys.argv to enable them by default in the demo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…context-hint Adds two tests that mock bootstrap_streamlit_app to assert the new flags are parsed and forwarded correctly, and default to False when omitted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds two new CLI flags (--hide-suggested-questions, --hide-build-context-hint) that control whether the empty-chat suggested-questions block and the “Context isn’t built yet” hint / setup-wizard Build Context step are shown, wiring the flags from the Click CLI through to Streamlit session state and UI rendering.
Changes:
- Add two Click flags to
databao appand forward them into the Streamlit app args. - Parse the new flags in the Streamlit app and persist them into
st.session_state. - Use the flags to conditionally hide suggested questions, the build-context hint, and the Build Context wizard step (including renumbering the final step).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/databao_cli/ui/pages/welcome.py |
Conditionally hides the Build Context wizard step and renumbers the final step. |
src/databao_cli/ui/components/chat.py |
Conditionally hides suggested questions and the “Context isn’t built yet” warning on empty chat. |
src/databao_cli/ui/cli.py |
Forwards the new flags into Streamlit subprocess app_args. |
src/databao_cli/ui/app.py |
Adds argparse flags and stores them into Streamlit session state; adds helper for build-context hiding. |
src/databao_cli/commands/app.py |
Passes new flag values into bootstrap_streamlit_app. |
src/databao_cli/__main__.py |
Adds Click options for the two new flags to databao app. |
examples/demo-snowflake-project/src/databao_snowflake_demo/app.py |
Enables both flags by default for the Snowflake demo by appending to sys.argv. |
Comments suppressed due to low confidence (1)
src/databao_cli/ui/cli.py:45
- New CLI flags are being forwarded into the Streamlit subprocess via
app_args, but there’s no test asserting the wiring end-to-end (Click →bootstrap_streamlit_app→subprocess.runargs). Consider adding a unit test (e.g., intests/test_app.py) that invokesdatabao app --hide-suggested-questions/--hide-build-context-hintand assertssubprocess.runreceives the corresponding--hide-*arguments after--.
app_args = ["--project-dir", str(project_path)]
if read_only_domain:
app_args.append("--read-only-domain")
if hide_suggested_questions:
app_args.append("--hide-suggested-questions")
if hide_build_context_hint:
app_args.append("--hide-build-context-hint")
subprocess.run(
[sys.executable, "-m", "streamlit", "run", app_path, *streamlit_args, "--", *app_args],
check=True,
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…e limit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds two new CLI flags that control visibility of specific “empty chat” and setup-wizard UI elements, wiring them through the existing CLI → Streamlit arg → session state → UI component pattern used by --read-only-domain.
Changes:
- Introduces
--hide-suggested-questionsto suppress the suggested-questions block on an empty chat. - Introduces
--hide-build-context-hintto hide the “Context isn’t built yet” warning and optionally remove/renumber the Build Context step in the setup wizard. - Adds CLI forwarding tests and enables both flags by default in the Snowflake demo app.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_app.py |
Adds coverage to ensure new flags are parsed and forwarded, and default to False. |
src/databao_cli/__main__.py |
Adds Click options for both flags and stores them in ctx.obj for forwarding. |
src/databao_cli/commands/app.py |
Forwards the new flag values into the Streamlit bootstrap call. |
src/databao_cli/ui/cli.py |
Converts the forwarded booleans into Streamlit -- ... app args. |
src/databao_cli/ui/app.py |
Adds argparse flags for the Streamlit app and stores them into session state. |
src/databao_cli/ui/components/chat.py |
Uses session-state flags to hide suggested questions and the context-build warning. |
src/databao_cli/ui/pages/welcome.py |
Uses the build-context flag to hide the Build Context wizard step and renumber the final step. |
examples/demo-snowflake-project/src/databao_snowflake_demo/app.py |
Enables both flags by default for the Snowflake demo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
--hide-suggested-questionsflag to hide the suggested questions block on the empty chat screen--hide-build-context-hintflag to hide the "Context isn't built yet" warning and remove the Build Context step from the setup wizard (renumbering the final step from 5 → 4)--read-only-domainpattern end-to-end (__main__.py→commands/app.py→ui/cli.py→ui/app.py→ session state → UI components)app.pyTest plan
--hide-suggested-questions— suggested questions block gone from empty chat--hide-build-context-hint— warning gone from empty chat, Build Context step absent from setup wizard, final step renumbered to 4app.py) hides both by default🤖 Generated with Claude Code