fix: allow terminal profile deletion - #640
Merged
Merged
Conversation
This was referenced Jul 24, 2026
ben-kaufman
marked this pull request as ready for review
July 24, 2026 10:30
Greptile SummaryThis PR makes private Paykit endpoint cleanup best-effort during terminal profile deletion.
Confidence Score: 5/5The PR appears safe to merge, with the best-effort cleanup behavior and retained remote-deletion failure path matching the stated terminal deletion contract. The changed flow still awaits all private cleanup attempts, only suppresses their aggregate failure, preserves errors from authoritative Pubky deletion, and clears local state after successful deletion.
|
| Filename | Overview |
|---|---|
| Bitkit/Managers/PubkyProfileManager.swift | Changes terminal profile deletion to tolerate private Paykit cleanup failures while preserving authoritative remote deletion errors and final local sign-out cleanup. |
| Bitkit/Resources/Localization/en.lproj/Localizable.strings | Revises deletion confirmation copy to disclose that previously shared profile and payment information may remain with contacts. |
| changelog.d/next/640.fixed.md | Documents that failed private Paykit contact cleanup no longer blocks profile deletion. |
Sequence Diagram
sequenceDiagram
participant UI as Edit Profile UI
participant PM as PubkyProfileManager
participant Private as Private Paykit
participant Pubky as Pubky Service
UI->>PM: deleteProfile()
PM->>Private: remove endpoints (best effort)
alt cleanup fails
Private-->>PM: error absorbed and marked pending
else cleanup succeeds
Private-->>PM: cleanup complete
end
PM->>Pubky: deletePaykitProfile()
alt remote deletion fails
Pubky-->>PM: throw error
PM-->>UI: retry/disconnect flow
else deleted or already missing
PM->>PM: signOut without repeating private cleanup
PM-->>UI: deletion complete
end
Reviews (1): Last reviewed commit: "fix: allow terminal profile deletion" | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR allows terminal Pubky profile deletion to continue when private Paykit endpoint cleanup cannot finish, such as when a contact is offline or a private link is still being established.
Paykit lifecycle/concurrency hardening and E2E repository changes remain outside this PR.
Linked Issues/Tasks
Screenshot / Video
N/A — behavior and confirmation-copy update only.
QA Notes
Manual Tests
Automated Checks
git diff --checkpassed.PubkyProfileManagerTests.swift: 34 of 37 tests passed; three unchanged tests crash in the existing test host atEnv.swift:211because its documents directory is unavailable.