#1783

Remove bitchat's notifications on panic wipe; drop the unread sender name from DM userInfo

OpenRodsF1wants to merge intofrom

After a panic wipe, Notification Center still lists every bitchat alert, and with previews on each one shows the sender and the message: the data the wipe just deleted. Nothing on main removes them.

What changes

  • NotificationService.removeAllDeliveredNotifications() removes bitchat's delivered notifications through a NotificationRemoving seam, shaped like the existing authorizer, deliverer and category-registrar seams, and a no-op under tests.
  • panicClearAllData calls it next to the app-switcher snapshot step, before the commit check. So it also runs when the transaction doesn't commit, and when startup resumes an interrupted wipe. It's injected as panicNotificationRemoval, defaulting to the real call.
  • DM notifications stop putting the sender's nickname in userInfo. With previews hidden (the default) the alert itself is redacted, but userInfo still handed the nickname to the system, and nothing reads it. docs/privacy-assessment.md already says userInfo carries only the routing peer ID and deep link.
  • docs/privacy-assessment.md: the locked-device section says what the removal does and doesn't do, and the panic coverage list gains the entry.

This is removal, not erasure. The system can keep its own record of notifications it has shown, out of the app's reach, so with previews on that record can outlive the wipe. The doc now says so.

Android's panic wipe already does this: panicClearAllData calls clearAllNotifications(), which calls cancelAll().

Tests. Each one fails with its change reverted:

  • the removal reaches the notification center, and is skipped under tests;
  • the wipe removes notifications on a committed wipe, on one that doesn't commit, and on startup replay when the media wipe throws;
  • with previews hidden, userInfo carries only the peer ID.

Full iOS suite green on the simulator (2,072 Swift Testing and 212 XCTest tests), and macOS builds. No new strings.

🤖 Generated with Claude Code

Activity

8
chatgpt-codex-connector[bot]9d ago

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-10-21T01:40:48.888212Z2d57b96PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]reviewed9d ago
chatgpt-codex-connector[bot]9d ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d57b96c08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Chessing234reviewed7d ago
Chessing2347d ago

panic wipe only pulls delivered notifications. a request that's still pending can show up after the wipe, with the sender and the body if previews are on. removeAllPendingNotificationRequests belongs in the same call.

RodsF15d ago

Thanks @chessing234, and Codex. All three were real; 89a2436e fixes them, on top of a merge of main (one conflict, in a test helper).

  • Pending and in-flight posts. The wipe now removes pending requests as well as delivered alerts. That alone wouldn't cover a post still on its way: NotificationService hands each request to the center from a task, so one could land after the removal ran. Each post now carries a generation, the same shape as PTTCaptureGeneration, which the wipe invalidates before removing anything. A post that hasn't reached the center is dropped, and one the center is still taking removes itself by identifier once the center has it.
  • Crash after the commit. The removal now runs as soon as inbound traffic stops, before anything commits, so if the process dies mid-wipe, the next launch replays it with the rest of the transaction.

Each ordering has a test that fails when its fix is reverted.