Summary
Found during the #134 review: the project-level "Archive all sessions" button (public/sidebar.js, around the project header handler — ~line 784 at ae7a37c) iterates .session-item elements without excluding subagent rows, so archiveSession/stopSession are also invoked on subagent ids. Pre-existing — not introduced by #134, which fixed the same pattern for the group-level archive button with a :not([data-subagent]) guard.
Fix
Apply the same :not([data-subagent]) selector guard used elsewhere in sidebar.js, plus a jsdom test pinning that only top-level ids reach archiveSession.
Refs #128 (discovered in the cleanup series), #134.
Summary
Found during the #134 review: the project-level "Archive all sessions" button (
public/sidebar.js, around the project header handler —~line 784atae7a37c) iterates.session-itemelements without excluding subagent rows, soarchiveSession/stopSessionare also invoked on subagent ids. Pre-existing — not introduced by #134, which fixed the same pattern for the group-level archive button with a:not([data-subagent])guard.Fix
Apply the same
:not([data-subagent])selector guard used elsewhere insidebar.js, plus a jsdom test pinning that only top-level ids reacharchiveSession.Refs #128 (discovered in the cleanup series), #134.