Skip to content

Add --hide-suggested-questions and --hide-build-context-hint CLI flags#47

Merged
SokolovYaroslav merged 6 commits intomainfrom
yas/hide-onboarding-flags
Mar 13, 2026
Merged

Add --hide-suggested-questions and --hide-build-context-hint CLI flags#47
SokolovYaroslav merged 6 commits intomainfrom
yas/hide-onboarding-flags

Conversation

@SokolovYaroslav
Copy link
Collaborator

@SokolovYaroslav SokolovYaroslav commented Mar 13, 2026

Summary

  • Adds --hide-suggested-questions flag to hide the suggested questions block on the empty chat screen
  • Adds --hide-build-context-hint flag 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)
  • Both flags follow the existing --read-only-domain pattern end-to-end (__main__.pycommands/app.pyui/cli.pyui/app.py → session state → UI components)
  • Both flags are enabled by default in the Snowflake demo app.py

Test plan

  • Run app without flags — both elements visible as before
  • Run with --hide-suggested-questions — suggested questions block gone from empty chat
  • Run with --hide-build-context-hint — warning gone from empty chat, Build Context step absent from setup wizard, final step renumbered to 4
  • Run with both flags — all hidden
  • Verify Snowflake demo (app.py) hides both by default

🤖 Generated with Claude Code

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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-questions to hide the suggested questions UI on an empty chat.
  • Add --hide-build-context-hint to 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>
Copilot AI review requested due to automatic review settings March 13, 2026 12:17
…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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 app and 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_appsubprocess.run args). Consider adding a unit test (e.g., in tests/test_app.py) that invokes databao app --hide-suggested-questions/--hide-build-context-hint and asserts subprocess.run receives 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.

SokolovYaroslav and others added 2 commits March 13, 2026 13:27
…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>
Copilot AI review requested due to automatic review settings March 13, 2026 12:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-questions to suppress the suggested-questions block on an empty chat.
  • Introduces --hide-build-context-hint to 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>
@SokolovYaroslav SokolovYaroslav merged commit 9579e22 into main Mar 13, 2026
6 checks passed
@SokolovYaroslav SokolovYaroslav deleted the yas/hide-onboarding-flags branch March 13, 2026 13:09
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.

3 participants