altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

[Feature] Session management safeguards and UX improvements

Open anandgupta42 opened this issue 9 months ago • 0 comments

Problem

Several session management commands have UX gaps:

  1. altimate session delete has no confirmation — permanently deletes session history immediately with no safety net
  2. altimate session list with no sessions gives no output — silent empty result, user can't tell if the command worked
  3. altimate export without session ID hangs — starts interactive selection that doesn't work in non-interactive mode
  4. altimate db with no subcommand gives no output — no help text or available subcommands shown

Desired Behavior

Session Deletion Safety

  • Require confirmation before permanent deletion: "Session 'SQL Optimization' (15 messages, 3 tool calls). Delete? [y/N]"
  • Support --force flag to skip confirmation for scripts
  • Consider soft-delete with configurable retention (e.g., 7 days) before permanent removal

Empty State Handling

  • altimate session list with no sessions → "No sessions found. Start one with: altimate"
  • altimate db with no subcommand → show available subcommands and brief help
  • altimate export without session ID in non-interactive mode → clear error with usage hint

Key Files

  • packages/altimate-code/src/cli/cmd/session.ts — session list, delete commands
  • packages/altimate-code/src/cli/cmd/export.ts — export command
  • packages/altimate-code/src/cli/cmd/db.ts — db command

Industry Patterns

  • Claude Code: Checkpointing system with /rewind — scrollable checkpoint list with options to rewind conversation only, code only, or both
  • Git: git branch -D requires -D (force) for unmerged branches; regular -d has safety check
  • GitHub CLI: All destructive operations require --yes flag or interactive confirmation

Acceptance Criteria

  • [ ] session delete requires confirmation prompt (or --force flag)
  • [ ] Session summary shown before deletion (message count, date range)
  • [ ] session list shows helpful message when no sessions exist
  • [ ] export in non-interactive mode gives clear error when no session ID provided
  • [ ] db with no subcommand shows help text

anandgupta42 avatar Mar 05 '26 23:03 anandgupta42