feat(adminless-groups): show automatic group deletion warning UI - WPB-25305#5019
feat(adminless-groups): show automatic group deletion warning UI - WPB-25305#5019David-Henner wants to merge 11 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds UI support for “adminless groups” that have been scheduled for automatic deletion by the backend, spanning Core Data storage, conversation-list status/icon rendering, and an in-conversation system message with a “Read more” link.
Changes:
- Introduces persisted deletion scheduling state (
scheduledDeletionDateonZMConversation, andconversationScheduledDeletionDateon the system message). - Adds conversation list subtitle/icon handling for “Will be deleted soon”.
- Adds a new system message cell/description and related strings/URLs, plus unit + snapshot test coverage.
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WireData/Sources/WireData/Schema/zmessaging.xcdatamodeld/zmessaging2.139.0.xcdatamodel/contents | Adds Core Data attributes for scheduled deletion date on conversations and system messages. |
| WireData/Sources/WireData/Schema/zmessaging.xcdatamodeld/.xccurrentversion | Bumps the current data model version to 2.139.0. |
| wire-ios/Wire-iOS/Sources/UserInterface/ConversationList/ZMConversation+Status.swift | Adds isScheduledForDeletion to ConversationStatus and a matcher/icon path for the new state. |
| wire-ios/Wire-iOS/Sources/UserInterface/ConversationList/ListContent/ConversationListAccessoryView.swift | Renders the scheduled-for-deletion warning icon in the conversation list. |
| wire-ios/Wire-iOS/Sources/UserInterface/Conversation/Content/Cells/ConfigurationMessageCell/Components/ConversationSystemMessageCellDescription.swift | Routes the new system message type to its dedicated cell description. |
| wire-ios/Wire-iOS/Sources/UserInterface/Conversation/Content/Cells/ConfigurationMessageCell/Components/ConversationScheduledForDeletionCell.swift | Adds the in-conversation red warning system message with formatted date and “Read more” link. |
| wire-ios/Wire-iOS/Sources/Helpers/syncengine/Message+DateFormatter.swift | Introduces longDateFormatter and updates relative-date formatting formatter logic. |
| wire-ios/Wire-iOS/Sources/Helpers/Bundle/Bundle+WireURLs.swift | Adds a new support URL entry to WireURLs. |
| wire-ios/Wire-iOS/Resources/Localization/Base.lproj/Localizable.strings | Adds user-visible strings for scheduled deletion messaging/status. |
| wire-ios/Wire-iOS/Generated/Strings+Generated.swift | Regenerates Swift string accessors for new localization keys. |
| wire-ios/Wire-iOS Tests/ReferenceImages/ConversationSystemMessageCellSnapshotTests/test_conversationScheduledForDeletion.*.png | Adds LFS-backed reference snapshots for the new system message cell. |
| wire-ios/Wire-iOS Tests/ReferenceImages/ConversationListCellTests/testThatItRendersScheduledForDeletionConversation.1.png | Adds snapshot reference for conversation list cell scheduled-deletion state. |
| wire-ios/Wire-iOS Tests/ReferenceImages/ConversationListAccessoryViewTests/testThatItShowsScheduledForDeletion.1.png | Adds snapshot reference for accessory warning icon. |
| wire-ios/Wire-iOS Tests/ConversationStatusTests.swift | Adds unit tests for isScheduledForDeletion status. |
| wire-ios/Wire-iOS Tests/ConversationListAccessoryViewTests.swift | Adds snapshot test for scheduled-for-deletion accessory icon. |
| wire-ios/Wire-iOS Tests/ConversationList/ConversationListCell/ConversationListCellTests.swift | Updates status construction and adds snapshot test for scheduled deletion subtitle/icon. |
| wire-ios/Wire-iOS Tests/ConversationCell/ConversationSystemMessageCellSnapshotTests.swift | Adds snapshot coverage for the new system message type. |
| wire-ios/Tests/Mocks/MockMessage.swift | Extends mock system message data with conversationScheduledDeletionDate. |
| wire-ios/Configuration/url.json | Adds the support article URL for “Adminless Group Prevention”. |
| wire-ios-data-model/Source/Public/ZMMessage.h | Adds ZMSystemMessageTypeConversationScheduledForDeletion and system message data field exposure. |
| wire-ios-data-model/Source/Model/Message/ZMMessage+Internal.h | Adds internal Core Data property for the scheduled deletion date on system messages. |
| wire-ios-data-model/Source/Model/Message/ZMMessage.m | Wires up the new Core Data attribute/key in the Objective-C model layer. |
| wire-ios-data-model/Source/Model/Conversation/ZMConversation+AutomaticDeletion.swift | Adds persisted scheduledDeletionDate and computed isScheduledForDeletion. |
| wire-ios-data-model/Source/Model/Conversation/ZMConversation.m | Ensures the new conversation attribute is ignored for modification tracking (backend-driven). |
| wire-ios-data-model/Source/ManagedObjectContext/Migration/CoreDataMessagingMigrationVersion.swift | Registers the new Core Data migration version v139. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| static let spellOutDateTimeFormatter: DateFormatter = { | ||
| var longDateFormatter = Message.longDateFormatter | ||
| longDateFormatter.doesRelativeDateFormatting = true | ||
| return longDateFormatter | ||
| }() |
| case .scheduledForDeletion: | ||
| configureScheduledForDeletionIcon() | ||
| return iconView |
| private func configureScheduledForDeletionIcon() { | ||
| let targetSize = CGSize(width: 14, height: 14) | ||
| let resizedIcon = UIGraphicsImageRenderer(size: targetSize).image { _ in | ||
| UIImage(resource: .attention).draw(in: CGRect(origin: .zero, size: targetSize)) | ||
| }.withRenderingMode(.alwaysTemplate) | ||
|
|
||
| iconView.image = resizedIcon | ||
| iconView.tintColor = IconColors.foregroundExclamationMarkInSystemMessage | ||
| badgeView.backgroundColor = ViewColors.backgroundDefaultWhite | ||
| } | ||
|
|
Test Results 3 files 553 suites 5m 47s ⏱️ For more details on these failures, see this check. Results for commit c0873cd. Summary: workflow run #29489697258 |
This PR adds the UI for a group conversation that's been scheduled for automatic deletion by the backend due to having no eligible admins.
This is UI-only — processing the
conversation.adminless-reminderbackend event that actually populates this state is handled in a separate follow-up task.Changes
Added:
ZMConversation+AutomaticDeletion— addsscheduledDeletionDate/isScheduledForDeletiontoZMConversation.ConversationScheduledForDeletionCell— renders the red in-conversation system message with icon, formatted date, and "Read more" link.Modified:
ZMMessage/ZMMessage+Internal— addedZMSystemMessageTypeConversationScheduledForDeletionand a dedicatedconversationScheduledDeletionDatefield toZMSystemMessageData, so the message carries its own copy of the date independent of the conversation's live state.ConversationSystemMessageCellDescription— dispatches the new system message type toConversationScheduledForDeletionCellDescription.ZMConversation+Status— addsisScheduledForDeletiontoConversationStatusand aScheduledForDeletionMatcherdriving the "Will be deleted soon" subtitle.ConversationListAccessoryView— renders the red warning icon in the conversation list.Message+DateFormatter— addsmonthDayTimeFormatter(month, day, and time, without a year or relative wording like "Tomorrow").Bundle+WireURLs/url.json— adds the "Read more" support article link.zmessaging2.139.0for the newscheduledDeletionDate/conversationScheduledDeletionDateattributes.ConversationStatusTests) and snapshot tests (ConversationListCellTests,ConversationListAccessoryViewTests,ConversationSystemMessageCellSnapshotTests).Testing
There's no way to trigger this end-to-end yet since the event-processing task hasn't landed. Covered by the added unit/snapshot tests; to verify manually, set
conversation.scheduledDeletionDateand insert aZMSystemMessageof type.conversationScheduledForDeletionwithconversationScheduledDeletionDateset.Checklist
[WPB-XXX].UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: