Skip to content

Added --purge flag to rm command to differentiate remove vs. delete#1965

Open
sshrushanth-ks wants to merge 2 commits intodelete-shared-record-modfrom
delete-shared-record-mod-int
Open

Added --purge flag to rm command to differentiate remove vs. delete#1965
sshrushanth-ks wants to merge 2 commits intodelete-shared-record-modfrom
delete-shared-record-mod-int

Conversation

@sshrushanth-ks
Copy link
Copy Markdown
Contributor

The rm command now supports two distinct operations:

  • Default (no flag): removes the record from the current user's vault only, leaving it intact for other users (pre_delete/unlink flow).
  • --purge: permanently hard-deletes the record for all users via record_update/delete_records. Requires the caller to be the record owner; non-owned records are skipped with a warning.
  • Also fixed rm failing to resolve records in shared folders when searched by title, by adding a global fallback search across all vault folders. Improved the not-found error message to be more actionable.

The rm command now supports two distinct operations:
- Default (no flag): removes the record from the current user's vault
  only, leaving it intact for other users (pre_delete/unlink flow).
- --purge: permanently hard-deletes the record for all users via
  record_update/delete_records. Requires the caller to be the record
  owner; non-owned records are skipped with a warning.
Also fixed rm failing to resolve records in shared folders when searched
by title, by adding a global fallback search across all vault folders.
Improved the not-found error message to be more actionable.
@sshrushanth-ks sshrushanth-ks self-assigned this Apr 17, 2026
@sshrushanth-ks sshrushanth-ks marked this pull request as ready for review April 17, 2026 09:41
@sali-ks sali-ks requested review from adeshmukh-ks and removed request for pvagare-ks April 17, 2026 10:38
- Added sync_down after a successful purge so the local cache reflects
  deletions immediately rather than waiting for a lazy sync
- vault_changed and BreachWatch cleanup are now only triggered when at
  least one record was actually deleted successfully
- Added a success log showing how many records were permanently deleted
- Global title fallback now errors with a list of matching UIDs when
  more than one record shares the same title, preventing unintended
  bulk deletes on ambiguous names
@sshrushanth-ks sshrushanth-ks requested review from pvagare-ks and removed request for adeshmukh-ks April 17, 2026 12:29
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.

2 participants