Skip to content

Add interactive tutorial walkthrough to UI#29

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-interactive-walkthrough-ui
Draft

Add interactive tutorial walkthrough to UI#29
Copilot wants to merge 5 commits intomainfrom
copilot/add-interactive-walkthrough-ui

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 3, 2026

Description

First-time users need guided onboarding in the Streamlit UI. This adds an expandable tutorial sidebar with sample incidents, mode descriptions, and configuration tooltips.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Changes

Tutorial System

  • Added SAMPLE_INCIDENTS constant: 3 production-quality security incident examples (phishing, access abuse, data exfiltration)
  • Added UI_MODE_DESCRIPTIONS constant: comprehensive descriptions for all 7 UI modes with usage guidelines
  • Added CONFIG_HELP_TEXT constant: explanations for all configuration options

Functions

  • initialize_tutorial_state(): manages tutorial visibility via single tutorial_mode session variable ('visible', 'dismissed_permanently')
  • load_sample_incident(sample_description, target_mode): encapsulates sample loading logic with auto-navigation
  • show_tutorial_section(): renders expandable tutorial panel in sidebar with:
    • Clickable sample incident buttons
    • Context-aware mode descriptions
    • "View All Modes" expandable reference
    • "Understanding Settings" configuration guide
    • "Don't show again" checkbox with re-enable button

Integration

  • Tooltips added to all configuration widgets (difficulty, threshold, max_classes, preprocessing, LLM, visualizations)
  • Single Incident Lab loads sample text from session state and clears after use
  • Tutorial positioned after Advanced Options in sidebar

Example Usage

# Sample incident structure
SAMPLE_INCIDENTS = [
    {
        "title": "Suspicious Email with Attachment",
        "description": "User reported receiving an email from unknown sender...",
        "category": "Phishing"
    },
    # ... 2 more samples
]

# Load sample with auto-navigation
load_sample_incident(sample['description'])  # Sets state, navigates to Single Incident Lab, reruns

How Has This Been Tested?

  • Python AST parsing validates syntax
  • Constant definitions verified (3 samples, 7 modes, 7 config tooltips)
  • Function definitions confirmed (3 new helper functions)
  • 4 rounds of automated code review, all feedback resolved
  • Manual UI testing recommended post-deployment:
    • Launch app, verify tutorial expanded by default
    • Click sample incidents, verify auto-navigation and text loading
    • Test tooltip display on configuration hover
    • Verify "Don't show again" persistence and re-enable button

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
Original prompt

This section details on the original issue you should resolve

<issue_title>Add Interactive Feature Walkthrough to UI</issue_title>
<issue_description>Description:
First-time users need better guidance when launching the Streamlit UI. Currently, there's minimal onboarding. Add an optional interactive walkthrough/tutorial sidebar that:

  • Explains each UI mode on first visit
  • Provides sample incident descriptions to try
  • Highlights key configuration options
  • Shows expected output format

Acceptance Criteria:

  • Create a "Getting Started" or "Tutorial" mode in sidebar
  • Include 2-3 pre-written sample incidents for users to analyze
  • Add expandable help sections for each UI mode
  • Display helpful tooltips for configuration options
  • Add a checkbox to "Don't show again" for returning users
  • Document the tutorial flow in docs/ui-guide.md
  • All tutorials work without requiring external data

Resources:

How to Start:

  1. Review the current UI initialization in ui_premium.py (lines 1-500)
  2. Look at st.session_state usage for persistent settings
  3. Use st.expander() and st.info() for tutorial elements
  4. Add sample data to JSON or Python constants</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 3, 2026 03:04
Co-authored-by: texasbe2trill <91504044+texasbe2trill@users.noreply.github.com>
Co-authored-by: texasbe2trill <91504044+texasbe2trill@users.noreply.github.com>
…ndling

Co-authored-by: texasbe2trill <91504044+texasbe2trill@users.noreply.github.com>
Co-authored-by: texasbe2trill <91504044+texasbe2trill@users.noreply.github.com>
Copilot AI changed the title [WIP] Add interactive feature walkthrough to UI Add interactive tutorial walkthrough to UI Jan 3, 2026
Copilot AI requested a review from texasbe2trill January 3, 2026 03:19
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.

Add Interactive Feature Walkthrough to UI

2 participants