From 9ffb63124213198778082d1bbf046d4743c37a67 Mon Sep 17 00:00:00 2001 From: Paul Lizer Date: Tue, 7 Apr 2026 15:52:04 -0400 Subject: [PATCH 01/11] show/hide tutorial button for users in profile page --- application/single_app/config.py | 2 +- application/single_app/functions_settings.py | 4 + application/single_app/route_backend_users.py | 2 + application/single_app/support_menu_config.py | 19 ++- .../single_app/templates/_sidebar_nav.html | 5 + .../single_app/templates/admin_settings.html | 31 +++- application/single_app/templates/chats.html | 2 + .../single_app/templates/latest_features.html | 3 + application/single_app/templates/profile.html | 144 ++++++++++++++++++ .../single_app/templates/workspace.html | 2 + .../features/LATEST_FEATURES_ADMIN_TAB.md | 10 +- .../USER_TUTORIAL_VISIBILITY_PREFERENCE.md | 64 ++++++++ docs/explanation/features/index.md | 3 +- .../test_admin_latest_features_tab.py | 8 +- ...est_user_tutorial_visibility_preference.py | 113 ++++++++++++++ ..._profile_tutorial_visibility_preference.py | 106 +++++++++++++ ...ngle_app_template_json_bootstrap_render.py | 3 +- 17 files changed, 509 insertions(+), 12 deletions(-) create mode 100644 docs/explanation/features/USER_TUTORIAL_VISIBILITY_PREFERENCE.md create mode 100644 functional_tests/test_user_tutorial_visibility_preference.py create mode 100644 ui_tests/test_profile_tutorial_visibility_preference.py diff --git a/application/single_app/config.py b/application/single_app/config.py index a3200961..367c9d62 100644 --- a/application/single_app/config.py +++ b/application/single_app/config.py @@ -94,7 +94,7 @@ EXECUTOR_TYPE = 'thread' EXECUTOR_MAX_WORKERS = 30 SESSION_TYPE = 'filesystem' -VERSION = "0.240.066" +VERSION = "0.240.069" SECRET_KEY = os.getenv('SECRET_KEY', 'dev-secret-key-change-in-production') diff --git a/application/single_app/functions_settings.py b/application/single_app/functions_settings.py index d053e9e7..5db08732 100644 --- a/application/single_app/functions_settings.py +++ b/application/single_app/functions_settings.py @@ -1041,6 +1041,9 @@ def get_user_settings(user_id): if 'personal_model_endpoints' not in doc['settings']: doc['settings']['personal_model_endpoints'] = [] + if 'showTutorialButtons' not in doc['settings']: + doc['settings']['showTutorialButtons'] = True + updated = True # Try to update email/display_name if missing and available in session user = session.get("user", {}) @@ -1082,6 +1085,7 @@ def get_user_settings(user_id): display_name = user.get("name") doc = {"id": user_id, "settings": {}} doc["settings"]["personal_model_endpoints"] = [] + doc["settings"]["showTutorialButtons"] = True if email: doc["email"] = email if display_name: diff --git a/application/single_app/route_backend_users.py b/application/single_app/route_backend_users.py index 2fdee39f..459aa800 100644 --- a/application/single_app/route_backend_users.py +++ b/application/single_app/route_backend_users.py @@ -155,6 +155,8 @@ def user_settings(): 'microphonePermissionState', # Text-to-speech settings 'ttsEnabled', 'ttsVoice', 'ttsSpeed', 'ttsAutoplay', + # Tutorial visibility settings + 'showTutorialButtons', # Metrics and other settings 'metrics', 'lastUpdated' } # Add others as needed diff --git a/application/single_app/support_menu_config.py b/application/single_app/support_menu_config.py index f7fca0d2..ac305a7e 100644 --- a/application/single_app/support_menu_config.py +++ b/application/single_app/support_menu_config.py @@ -9,12 +9,13 @@ 'id': 'guided_tutorials', 'title': 'Guided Tutorials', 'icon': 'bi-signpost-split', - 'summary': 'Step-by-step walkthroughs help users discover core chat, workspace, and onboarding flows faster.', - 'details': 'Guided Tutorials add in-product walkthroughs so you can learn the interface in context instead of hunting through menus first.', - 'why': 'This matters because the fastest way to learn a new workflow is usually inside the workflow itself, with the right controls highlighted as you go.', + 'summary': 'Step-by-step walkthroughs help users discover core chat, workspace, and onboarding flows faster, and each user can now hide the launchers when they no longer need them.', + 'details': 'Guided Tutorials add in-product walkthroughs so you can learn the interface in context instead of hunting through menus first. Tutorial launchers are shown by default and can be hidden or restored later from your profile page.', + 'why': 'This matters because the fastest way to learn a new workflow is usually inside the workflow itself, with the right controls highlighted as you go, while still letting each user hide the launcher once they are comfortable with the app.', 'guidance': [ 'Start with the Chat Tutorial to learn message tools, uploads, prompts, and follow-up workflows.', 'If Personal Workspace is enabled for your environment, open the Workspace Tutorial to learn uploads, filters, tags, prompts, agents, and actions.', + 'Tutorial buttons are visible by default. If you prefer a cleaner interface, open your profile page and hide them for your own account.', ], 'actions': [ { @@ -32,6 +33,13 @@ 'icon': 'bi-folder2-open', 'requires_settings': ['enable_user_workspace'], }, + { + 'label': 'Manage Tutorial Visibility', + 'description': 'Open your profile page to show or hide the tutorial launch buttons for your account.', + 'endpoint': 'profile', + 'fragment': 'tutorial-preferences', + 'icon': 'bi-person-gear', + }, ], 'image': 'images/features/guided_tutorials_chat.png', 'image_alt': 'Guided tutorials feature screenshot', @@ -550,7 +558,10 @@ def get_support_latest_feature_catalog(): def get_default_support_latest_features_visibility(): """Return default visibility for each user-facing latest feature.""" - return {item['id']: True for item in _SUPPORT_LATEST_FEATURE_CATALOG} + defaults = {item['id']: True for item in _SUPPORT_LATEST_FEATURE_CATALOG} + defaults['deployment'] = False + defaults['redis_key_vault'] = False + return defaults def normalize_support_latest_features_visibility(raw_visibility): diff --git a/application/single_app/templates/_sidebar_nav.html b/application/single_app/templates/_sidebar_nav.html index 5e5a8b77..b922673e 100644 --- a/application/single_app/templates/_sidebar_nav.html +++ b/application/single_app/templates/_sidebar_nav.html @@ -275,6 +275,11 @@ Latest FeaturesNew