66221397a1
Bot Mode's group chats spawned one per-member session per room, and those "Group: ..." rows (plus canonical Bot Chats when the old eye-toggle pref was off) flooded the global Sessions sidebar — a 6-bot room dumped six identical rows into recents (reported with screenshot, Aug 17). Plugin (apps/desktop/src/plugins/hermes-bots/plugin.js): - session.create now passes hidden:true UNCONDITIONALLY for both canonical Bot Chats and group-room member sessions; the $hideBotChats pref, its eye toggle, and its storage hydrate are removed (Bot Mode sessions are plumbing or plugin-owned forever-chats, never scratch conversations). - hideOwnedBotSessions(): idempotent reconciliation sweep over every owned session id (bot meta canonical chats + each room's member sessions) via session.set_hidden, run on plugin load and on each gateway reconnect, so rows born visible under the old pref get cleaned up. - The Bots session browser and canonical-chat recovery scan pass include_hidden:true so they still see the rows they own. Gateway (tui_gateway/methods_session.py): - session.list honors an include_hidden param (default off — the resume picker and all global callers keep dropping hidden rows). - session.set_hidden gains a durable fallback: when no LIVE runtime session matches, resolve the stored session id in the target profile's state.db (via resolve_session_id) and flip the flag there. The sweep holds stored ids for chats that aren't live; the old live-only lookup 4001'd them. Validated E2E with real imports against a temp HERMES_HOME: born-hidden row (hidden=1), profile-scoped session.list default vs include_hidden (0 vs 1), and stored-id sweep on a non-live legacy row (hidden=1). Plugin suite 167/167; new RPC regression tests in tests/tui_gateway/test_session_hidden_rpc.py.