Agent Zero AI framework
Keep action-required notifications visible
Alessandroa55a76f62b9d
diff --git a/extensions/python/user_message_ui/AGENTS.md b/extensions/python/user_message_ui/AGENTS.mdindex 55428a4d7..5755ea69d 100644--- a/extensions/python/user_message_ui/AGENTS.md+++ b/extensions/python/user_message_ui/AGENTS.md@@ -11,6 +11,7 @@## Local Contracts- Keep proactive UI messages relevant, non-spammy, and safe for display.+- Keep update-available notifications visible until the user dismisses them.- Do not expose local diagnostics or update data that should stay internal.## Work Guidancediff --git a/extensions/python/user_message_ui/_10_update_check.py b/extensions/python/user_message_ui/_10_update_check.pyindex ff1e5844e..00cf5fa2f 100644--- a/extensions/python/user_message_ui/_10_update_check.py+++ b/extensions/python/user_message_ui/_10_update_check.py@@ -104,7 +104,7 @@ class UpdateCheck(Extension):message=notif.get("message", "A newer version of Agent Zero is available. Please update to the latest version."),type=notif.get("type", "info"),detail=notif.get("detail", ""),- display_time=notif.get("display_time", 10),+ display_time=0,group=notif.get("group", "update_check"),priority=notif.get("priority", notification.NotificationPriority.NORMAL),id=notif.get("id", "update_check_available"),diff --git a/helpers/plugins.py b/helpers/plugins.pyindex e7fd776e9..e2c69be85 100644--- a/helpers/plugins.py+++ b/helpers/plugins.py@@ -842,7 +842,7 @@ def send_frontend_reload_notification(plugin_names: list[str] | None = None):title="Plugins with frontend extensions updated, page reload recommended",message="""<button type="button" class="button confirm" onclick="window.location.reload()"><span class="icon material-symbols-outlined">refresh</span>Reload page</button>""",detail="",- display_time=display_time,+ display_time=0,group="plugins_changed",id="plugins_frontend_reload",)diff --git a/helpers/plugins.py.dox.md b/helpers/plugins.py.dox.mdindex 4447d8850..59bdb54bf 100644--- a/helpers/plugins.py.dox.md+++ b/helpers/plugins.py.dox.md@@ -40,7 +40,7 @@- `find_plugin_asset(plugin_name: str, *subpaths, project_name=..., agent_profile=...)`- `find_plugin_assets(*subpaths, plugin_name: str=..., project_name: str=..., agent_profile: str=..., only_first: bool=...) -> list[PluginAssetFile]`- `determine_plugin_asset_path(plugin_name: str, project_name: str, agent_profile: str, *subpaths)`-- `send_frontend_reload_notification(plugin_names: list[str] | None=...)`: If the plugin changed has webui extensions, notify frontend to reload the page+- `send_frontend_reload_notification(plugin_names: list[str] | None=...)`: If the plugin changed has webui extensions, show a persistent reload notification- `call_plugin_hook(plugin_name: str, hook_name: str, default: Any=..., *args, **kwargs)`- `_apply_defaults_from_env(plugin_name: str, config: dict[str, Any])`- Notable constants/configuration names: `_META_TARGET_RE`, `META_FILE_NAME`, `CONFIG_FILE_NAME`, `CONFIG_DEFAULT_FILE_NAME`, `DISABLED_FILE_NAME`, `ENABLED_FILE_NAME`, `TOGGLE_FILE_PATTERN`, `HOOKS_SCRIPT`, `HOOKS_CACHE_AREA`, `PLUGINS_LIST_CACHE_AREA`, `ENABLED_PLUGINS_LIST_CACHE_AREA`, `ENABLED_PLUGINS_PATHS_CACHE_AREA`.diff --git a/tests/test_download_toast_regressions.py b/tests/test_download_toast_regressions.pyindex 530ae1891..cdf5db3f1 100644--- a/tests/test_download_toast_regressions.py+++ b/tests/test_download_toast_regressions.py@@ -89,6 +89,8 @@ def previous_non_space(source: str, index: int) -> str:def test_notification_store_supports_persistent_grouped_toasts():store = read("webui", "components", "notifications", "notification-store.js")api = read("api", "notification_create.py")+ plugins = read("helpers", "plugins.py")+ update_check = read("extensions", "python", "user_message_ui", "_10_update_check.py")assert "isPersistentToast(toast)" in storeassert "return this.getToastDisplayTime(toast) <= 0;" in store@@ -97,6 +99,10 @@ def test_notification_store_supports_persistent_grouped_toasts():assert "this.removeFromToastStack(existingToast.toastId);" in storeassert "if display_time < 0:" in apiassert "if display_time <= 0:" not in api+ assert 'id="plugins_frontend_reload",' in plugins+ assert 'id=notif.get("id", "update_check_available"),' in update_check+ assert "display_time=0," in plugins+ assert "display_time=0," in update_checkdef test_backup_zip_downloads_emit_grouped_preparing_and_downloading_toasts():