Skip to content

feat(tui): add memory and session deletion flows#471

Closed
1563245379 wants to merge 13 commits into
Gentleman-Programming:mainfrom
1563245379:feat/tui-memory-session-deletion
Closed

feat(tui): add memory and session deletion flows#471
1563245379 wants to merge 13 commits into
Gentleman-Programming:mainfrom
1563245379:feat/tui-memory-session-deletion

Conversation

@1563245379

@1563245379 1563245379 commented Jun 8, 2026

Copy link
Copy Markdown

Linked Issue

Closes #94


PR Type

  • type:bug - Bug fix
  • type:feature - New feature
  • type:docs - Documentation only
  • type:refactor - Code refactoring (no behavior change)
  • type:chore - Maintenance, dependencies, tooling
  • type:breaking-change - Breaking change

Summary

  • Adds recoverable deleted-memory browse, restore, and purge flows across store and TUI.
  • Adds TUI delete confirmation handling for memories and sessions, including session cascade warnings.
  • Makes MCP mem_delete soft-delete only and updates docs to match recycle-bin behavior.

Changes

File Change
internal/store/store.go Adds include-deleted reads, restore/purge behavior, and session deletion handling while preserving soft-deleted memory content.
internal/tui/model.go Adds recycle-bin and confirmation state for memory/session deletion workflows.
internal/tui/update.go Wires delete, restore, purge, and confirmation key handling.
internal/tui/view.go Renders recycle-bin/deleted-memory states and destructive-action confirmation copy.
internal/mcp/mcp.go Removes hard-delete behavior from mem_delete; deletes are soft-only.
internal/*/*_test.go Adds regression coverage for store, MCP, and TUI deletion/recovery behavior.
README.md, DOCS.md, docs/ARCHITECTURE.md Aligns user-facing and architecture docs with soft delete and recycle-bin semantics.

Test Plan

  • Unit tests pass locally: go test ./...
  • E2E tests pass locally: go test -tags e2e ./internal/server/...
  • Manually tested the affected functionality

Local checks run:

  • go test ./internal/store ./internal/tui ./internal/mcp -count=1
    • internal/tui passed.
    • internal/store failed on Windows temp DB cleanup with The process cannot access the file because it is being used by another process.
    • The combined command timed out after 120s in the Codex environment.
  • go test ./internal/mcp -count=1
    • Failed in the Codex sandbox with eval expected dir: Access is denied. for current-working-directory symlink evaluation tests.
  • go test ./internal/mcp -count=1 -run TestSessionStartWithoutDirectoryUsesCurrentWorkingDirectory outside the Codex filesystem sandbox passed.
  • go test ./internal/mcp -count=1 -run TestSessionStartWithWhitespaceDirectoryUsesCurrentWorkingDirectory outside the Codex filesystem sandbox passed.
  • git diff --check main..HEAD passed.

Automated Checks

These run automatically and all must pass before merge:

Check What it verifies Status
Check Issue Reference PR body contains Closes #N / Fixes #N / Resolves #N Pending
Check Issue Has status:approved Linked issue has status:approved label Pending
Check PR Has type: Label* PR has exactly one type:* label Pending
Unit Tests go test ./... passes Pending
E2E Tests go test -tags e2e ./internal/server/... passes Pending

Contributor Checklist

  • I linked an approved issue above (Closes #N)
  • I added exactly one type:* label to this PR
  • I ran unit tests locally: go test ./...
  • I ran e2e tests locally: go test -tags e2e ./internal/server/...
  • Docs updated (if behavior changed)
  • Commits follow conventional commits format
  • No Co-Authored-By trailers in commits

Notes for Reviewers

This PR was opened from a fork because the authenticated account cannot push directly to Gentleman-Programming/engram. The targeted local test command has known Windows/Codex environment failures documented above; CI should provide the authoritative clean environment signal.

@1563245379 1563245379 marked this pull request as ready for review June 8, 2026 16:23
@Alan-TheGentleman

Copy link
Copy Markdown
Collaborator

Thanks for the work here, but I am closing this PR because it is too broad for #94 and overlaps with the smaller session-delete PR in #444. This changes memory deletion, restore, purge, recycle-bin behavior, MCP semantics, docs, and TUI behavior in one 2,360-line PR. If we want recycle-bin semantics later, it needs its own approved issue and a chained PR plan with one reviewable slice at a time. For now, #444 covers the session deletion scope we actually want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engram TUI permitir borrar sessions manualmente

2 participants