Skip to content

Add protection/warning for personal corpus deletion #838

@JSv4

Description

@JSv4

Context

From PR #834 code review - users can delete their personal "My Documents" corpus without any special warning or protection.

Current Behavior

  • User deletes personal corpus → documents in it become inaccessible
  • Next upload → new personal corpus is auto-created (works correctly)
  • No warning that this is a special corpus

Potential Improvements

Option A: Prevent deletion entirely

Add check in delete mutation/method:

if corpus.is_personal:
    raise ValidationError("Cannot delete personal corpus")

Option B: Soft warning in UI

Frontend displays warning when attempting to delete a corpus where is_personal=True.

Option C: Document current behavior

Current behavior (auto-recreate on next upload) is reasonable - just needs documentation so users understand.

Recommendation

Option B (warning) provides the best UX without being overly restrictive. Users should be able to delete if they really want to, but should understand the implications.

Priority

Low - edge case, current behavior is safe (just potentially confusing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions