Skip to content

Agent Zero AI framework

fix(pin-to-top): scope indicators to shared row components

Alessandrof3658a816fff
diff --git a/plugins/_pin_to_top/AGENTS.md b/plugins/_pin_to_top/AGENTS.md
index e282c3705..2e47ccae6 100644
--- a/plugins/_pin_to_top/AGENTS.md
+++ b/plugins/_pin_to_top/AGENTS.md
@@ -22,6 +22,7 @@
- Pinned items sort before unpinned items, older pins remain first, and existing order is preserved within the unpinned group.
- The menu label and icon must reflect whether the active row is pinned.
- Keep pin markup, styling, and visibility inside this plugin. The idempotent startup decorator handles added rows in both list views; Alpine owns icon reactivity and cleanup when rows are removed. Do not add pin-specific hooks to the core sidebar or copy its row templates.
+- Decorate only titles owned by the shared `chat-tree.html` and `task-row.html` components; community plugins may reuse sidebar styling classes with different data scopes.
## Work Guidance
diff --git a/plugins/_pin_to_top/extensions/webui/initFw_end/pin-indicators.js b/plugins/_pin_to_top/extensions/webui/initFw_end/pin-indicators.js
index b35f8963d..f65400ffe 100644
--- a/plugins/_pin_to_top/extensions/webui/initFw_end/pin-indicators.js
+++ b/plugins/_pin_to_top/extensions/webui/initFw_end/pin-indicators.js
@@ -1,6 +1,6 @@
import { store } from "/plugins/_pin_to_top/webui/pin-to-top-store.js";
-const TITLES = "#chats-section .chat-name, #tasks-section .task-name";
+const TITLES = '#chats-section x-component[path$="sidebar/chats/chat-tree.html"] .chat-name, #tasks-section x-component[path$="sidebar/tasks/task-row.html"] .task-name';
let observer = null;
function addIndicator(title) {