Skip to content

Fix account deletion failing on non-archived notes - #67

Merged
thermcampos merged 1 commit into
mainfrom
fix/65-account-deletion
Aug 29, 2026
Merged

thermcampos merged 1 commit into
mainfrom
fix/65-account-deletion

Conversation

@thermcampos

Copy link
Copy Markdown
Owner

Closes #65

Summary

  • Account deletion previously reused the single-note delete path, which enforces the "only archived notes may be deleted" trash-can rule and aborted the whole transaction on the first active note. It now uses a dedicated bulk path that removes all of the user's notes (archived or not), their note URLs, and all remaining tags, so the final user-row delete hits no foreign-key blockers.
  • The single-note delete endpoint keeps the archived-only rule unchanged.

Testing

  • New integration test covers the mixed archived/non-archived scenario end to end against a real database; unit tests updated for the new flow.
  • tools/check-backend.sh passes (checkstyle, unit + integration tests, coverage).

💘 Generated with Crush

Account deletion reused the single-note delete path, which enforces the
"only archived notes may be deleted" rule and aborted the whole
transaction on the first active note. Account deletion now uses a
dedicated bulk path that removes all of the user's notes (archived or
not), note URLs, and tags, while the single-note endpoint keeps the
trash-can rule unchanged.

💘 Generated with Crush

Assisted-by: Crush:kimi-k3

@thermcampos thermcampos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All AC passes

@thermcampos
thermcampos merged commit 16ac9d3 into main Aug 29, 2026
2 checks passed
@thermcampos
thermcampos deleted the fix/65-account-deletion branch August 29, 2026 18:52
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.

Fix account deletion failing on non-archived notes

1 participant