← Back to PRs

#12884: Feature/named persistent sessions

by dylanb open 2026-02-09 21:13 View on GitHub →
app: web-ui gateway stale
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> Added named persistent sessions feature allowing users to create labeled sessions that survive `/new` and `/reset` commands. Sessions can be created via `sessions.create` API or `/session new` command, deleted sessions are archived with metadata sidecars for restoration, and the UI displays persistent sessions with a 📌 badge. Major changes: - Added `persistent`, `userCreated`, `description`, and `createdAt` fields to `SessionEntry` type - Implemented `sessions.create` RPC method to create named sessions with optional inheritance from existing sessions - Implemented `sessions.restore` RPC method to recover deleted sessions from archived transcripts and metadata sidecars - Modified `sessions.delete` to write session metadata to separate `.metadata.json` sidecar files (preserves clean JSONL transcripts) - Modified `sessions.reset` to block resetting persistent sessions - Added `includeDeleted` parameter to `sessions.list` to show archived sessions - Added `/session new`, `/session list`, and `/session switch` commands for chat-based session management - UI changes include delete/restore controls and persistent session indicators <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The implementation is thorough with comprehensive e2e tests covering creation, deletion, restoration, and edge cases. Previous review concerns about transcript mutation and full-file reads have been addressed by using metadata sidecar files. Input validation is proper with schema-based constraints on labels and parameters. The code follows existing patterns and includes proper error handling. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs