| 1 | # What's New Plugin DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own the built-in version-gated "What's New" modal for showcasing Agent Zero features after updates, dormant when no cards are configured. |
| 6 | |
| 7 | ## Ownership |
| 8 | |
| 9 | - `plugin.yaml` owns metadata and always-enabled status. |
| 10 | - `webui/main.html` owns the canonical modal opened by startup and the Builtin Plugins `Open` button. |
| 11 | - `webui/whats-new.html` is a compatibility redirect to `webui/main.html`. |
| 12 | - `webui/whats-new-slides.js` owns the current card list; an empty list disables automatic display. |
| 13 | - `webui/` owns the Alpine store, copy, and showcase media assets. |
| 14 | - `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. |
| 15 | |
| 16 | ## Local Contracts |
| 17 | |
| 18 | - Closing, Skip, or Done records only the current installed version as seen. |
| 19 | - Future updates with cards should auto-open the modal again unless the user checks the modal's permanent opt-out checkbox. |
| 20 | - Do not auto-open the modal when `webui/whats-new-slides.js` exports no cards. |
| 21 | - The permanent opt-out is stored in browser-local state under `a0_whats_new_never_show`. |
| 22 | - Honor the legacy `a0_whats_new_seen_version` browser-local marker as the last seen version. |
| 23 | - Keep the modal copy concise, left-aligned, and paired with feature media. |
| 24 | - Keep modal actions in the pinned footer using the shared Agent Zero button classes. |
| 25 | - Store seen-version and opt-out markers in browser-local state only; do not persist this under `usr/`. |
| 26 | |
| 27 | ## Work Guidance |
| 28 | |
| 29 | - Add showcase cards in `webui/whats-new-slides.js`; add assets under `webui/assets/` and reference them through `/plugins/_whats_new/webui/assets/...`. |
| 30 | - Keep the startup extension idempotent and tolerant of missing or non-comparable version labels. |
| 31 | - Prefer release-line comparisons over development commit-distance comparisons so local development builds do not reopen the modal on every commit. |
| 32 | - Preserve `webui/main.html` so the plugin list exposes the standard `Open` action. |
| 33 | |
| 34 | ## Verification |
| 35 | |
| 36 | - Run `pytest tests/test_whats_new_static.py` after changing the modal, trigger, or assets. |
| 37 | - When the card list is empty, smoke-test no startup modal and the manual Builtin Plugins `Open` empty state when practical. |
| 38 | - 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. |
| 39 | |
| 40 | ## Child DOX Index |
| 41 | |
| 42 | No child DOX files. |