From 0a9e15be8770430af84c6e6ea02f79cd086af979 Mon Sep 17 00:00:00 2001 From: Alessandro <155005371+3clyp50@users.noreply.github.com> Date: Thu, 2 Jul 2026 16:44:22 +0200 Subject: [PATCH] Disable What's New cards Move active What's New content into an empty slide list so the startup modal stays quiet until new cards are added. Keep manual Open available with an empty state, and update the static test plus DOX contract for dormant periods. --- plugins/AGENTS.md | 2 +- plugins/_whats_new/AGENTS.md | 13 ++-- .../extensions/webui/initFw_end/whats-new.js | 2 + plugins/_whats_new/webui/main.html | 24 +++++-- plugins/_whats_new/webui/whats-new-slides.js | 1 + plugins/_whats_new/webui/whats-new-store.js | 68 +++++-------------- tests/test_whats_new_static.py | 35 +++++----- 7 files changed, 64 insertions(+), 81 deletions(-) create mode 100644 plugins/_whats_new/webui/whats-new-slides.js diff --git a/plugins/AGENTS.md b/plugins/AGENTS.md index 740879f67..768a203b0 100644 --- a/plugins/AGENTS.md +++ b/plugins/AGENTS.md @@ -93,5 +93,5 @@ Direct child DOX files: | [_text_editor/AGENTS.md](_text_editor/AGENTS.md) | Native text read, write, and patch tool. | | [_time_travel/AGENTS.md](_time_travel/AGENTS.md) | Workspace history, diff, travel, snapshot, and revert flows. | | [_whatsapp_integration/AGENTS.md](_whatsapp_integration/AGENTS.md) | WhatsApp Baileys bridge integration. | -| [_whats_new/AGENTS.md](_whats_new/AGENTS.md) | Version-gated What's New showcase modal and startup trigger. | +| [_whats_new/AGENTS.md](_whats_new/AGENTS.md) | Version-gated What's New showcase modal, card list, and startup trigger. | | [_whisper_stt/AGENTS.md](_whisper_stt/AGENTS.md) | Whisper speech-to-text integration. | diff --git a/plugins/_whats_new/AGENTS.md b/plugins/_whats_new/AGENTS.md index 3c4f6b2b4..6e137cbb7 100644 --- a/plugins/_whats_new/AGENTS.md +++ b/plugins/_whats_new/AGENTS.md @@ -2,20 +2,22 @@ ## Purpose -- Own the built-in version-gated "What's New" modal for showcasing Agent Zero features after updates. +- Own the built-in version-gated "What's New" modal for showcasing Agent Zero features after updates, dormant when no cards are configured. ## Ownership - `plugin.yaml` owns metadata and always-enabled status. - `webui/main.html` owns the canonical modal opened by startup and the Builtin Plugins `Open` button. - `webui/whats-new.html` is a compatibility redirect to `webui/main.html`. +- `webui/whats-new-slides.js` owns the current card list; an empty list disables automatic display. - `webui/` owns the Alpine store, copy, and showcase media assets. -- `extensions/webui/initFw_end/` owns the startup trigger that opens the modal once per newer installed version unless the user has permanently opted out. +- `extensions/webui/initFw_end/` owns the startup trigger that opens the modal once per newer installed version when cards exist unless the user has permanently opted out. ## Local Contracts - Closing, Skip, or Done records only the current installed version as seen. -- Future updates should auto-open the modal again unless the user checks the modal's permanent opt-out checkbox. +- Future updates with cards should auto-open the modal again unless the user checks the modal's permanent opt-out checkbox. +- Do not auto-open the modal when `webui/whats-new-slides.js` exports no cards. - The permanent opt-out is stored in browser-local state under `a0_whats_new_never_show`. - Honor the legacy `a0_whats_new_seen_version` browser-local marker as the last seen version. - Keep the modal copy concise, left-aligned, and paired with feature media. @@ -24,7 +26,7 @@ ## Work Guidance -- Add showcase assets under `webui/assets/` and reference them through `/plugins/_whats_new/webui/assets/...`. +- Add showcase cards in `webui/whats-new-slides.js`; add assets under `webui/assets/` and reference them through `/plugins/_whats_new/webui/assets/...`. - Keep the startup extension idempotent and tolerant of missing or non-comparable version labels. - Prefer release-line comparisons over development commit-distance comparisons so local development builds do not reopen the modal on every commit. - Preserve `webui/main.html` so the plugin list exposes the standard `Open` action. @@ -32,7 +34,8 @@ ## Verification - Run `pytest tests/test_whats_new_static.py` after changing the modal, trigger, or assets. -- Smoke-test startup display, slide navigation, dismissal, same-version reload behavior, newer-version display behavior, opt-out behavior, and manual Builtin Plugins `Open` behavior in the WebUI. +- When the card list is empty, smoke-test no startup modal and the manual Builtin Plugins `Open` empty state when practical. +- When cards exist, smoke-test startup display, slide navigation, dismissal, same-version reload behavior, newer-version display behavior, opt-out behavior, and manual Builtin Plugins `Open` behavior in the WebUI. ## Child DOX Index diff --git a/plugins/_whats_new/extensions/webui/initFw_end/whats-new.js b/plugins/_whats_new/extensions/webui/initFw_end/whats-new.js index 9d24c34b6..096bf59c8 100644 --- a/plugins/_whats_new/extensions/webui/initFw_end/whats-new.js +++ b/plugins/_whats_new/extensions/webui/initFw_end/whats-new.js @@ -1,4 +1,5 @@ import { getModalStack, isModalOpen, openModal } from "/js/modals.js"; +import { slides } from "/plugins/_whats_new/webui/whats-new-slides.js"; const MODAL_PATH = "/plugins/_whats_new/webui/main.html"; const LEGACY_MODAL_PATH = "/plugins/_whats_new/webui/whats-new.html"; @@ -109,6 +110,7 @@ function shouldNeverShow() { } function shouldShowWhatsNew(version = currentVersion()) { + if (!slides.length) return false; if (shouldNeverShow()) return false; if (!version) return false; diff --git a/plugins/_whats_new/webui/main.html b/plugins/_whats_new/webui/main.html index 66be15082..c4403122c 100644 --- a/plugins/_whats_new/webui/main.html +++ b/plugins/_whats_new/webui/main.html @@ -10,7 +10,11 @@