d3a753df30
ws_orphan_reap, idle_timeout, lru_evict, ws_disconnect, and tui_shutdown are runtime/connection GC — not user intent. Ending the durable session row during these automatic cleanup reasons confuses GC with user action, causing secondary bot chats to vanish from the sidebar even though the transcript is intact in state.db. The canonical Bot Chat already has resurrection paths for accidental ws_orphan_reap ends, but non-canonical secondary chats do not, so they are hit harder. Skip db.end_session() when _desktop_automatic_cleanup is True (automatic cleanup reason + Desktop source). Runtime is still reclaimed, the session.reclaimed event still fires, and explicit user close/archive/reset still ends the durable row normally. Fixes #105588