Agent TUI: browse, inspect, and delete conversations and sessions #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Expand the current metadata-only Sessions screen into an operator conversation/session browser. It must list conversations with avatar, channel, timestamps, size/status metadata; open the selected transcript; and delete the selected conversation safely.
Current state and Mentra discovery
MetaCrate already owns the logical conversation index:
ConversationStore::list_metadata()returns session ID, avatar UUID, channel, created/last-active time, turns, and bytes.ConversationStore::context()holds the bounded, trust-labelled message projection.delete()andexpire()already remove a logical session; the control plane currently exposes only metadata listing and an expire shortcut for the first row.Mentra 0.18.3 owns the model transcript:
Runtime::list_persisted_agents()returns persisted agent ID/name/status/history length without reviving the agent.resume_agent()exposes the activeAgentTranscript, including active items, archived branches, message/tool entries, and compaction history.Authorized avatar conversations reuse one Mentra agent so long-term memory survives session rollover. Therefore deleting a conversation should clear the selected logical transcript/session while preserving durable memories by default. This needs a Mentra host API that can clear/reset a transcript in place without changing the memory namespace. Session-scoped public/unprivileged Mentra agents may instead be deleted once Mentra exposes a supported delete API.
Design
ConversationStoreas the source of avatar/channel/time metadata and add a bounded operator-only entry projection that retains timestamp, role, record kind, trust label, and sanitized text.Acceptance criteria
No implementation is part of this issue creation pass.
Implemented and pushed in
096911a. The Sessions TUI now has deterministic active/expired/compacted metadata, avatar/channel/status/time filters, list and transcript paging, selection-preserving detail/back navigation, and exact high-risk delete. Operator detail combines bounded sanitized MetaCrate entries with content-free Mentra active/archive/tool/compaction metadata; observers receive pseudonymous metadata and cannot read or delete. Added persisted logical-session→Mentra-agent/profile-generation mappings and a supported Mentra transcript-clear API. Delete cancels/fences the selected active run, persists exact MetaCrate removal, clears only working transcript state, preserves durable memories, and stale completions cannot recreate the session. Focused restart/isolation/bounds/role/audit/TUI tests pass; strict live-grid Clippy, MetaCrate rustdoc, Mentra strict Clippy, dependency policy 7/7, and acceptance gate 2/2 are green. Mentra standalone rustdoc still reports its pre-existing unrelated broken links.