Skip to content

feat(adminless-groups): show automatic group deletion warning UI - WPB-25305#5019

Open
David-Henner wants to merge 11 commits into
developfrom
feat/adminless-groups/automatic-group-deletion-ui-WPB-25305
Open

feat(adminless-groups): show automatic group deletion warning UI - WPB-25305#5019
David-Henner wants to merge 11 commits into
developfrom
feat/adminless-groups/automatic-group-deletion-ui-WPB-25305

Conversation

@David-Henner

@David-Henner David-Henner commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
TaskWPB-25305 [iOS] New conversation removal UI

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.

  • A red warning icon and "Will be deleted soon" subtitle in the conversation list
  • A system message showing the scheduled date with a "Read more" link.

This is UI-only — processing the conversation.adminless-reminder backend event that actually populates this state is handled in a separate follow-up task.

Screenshot 2026-07-16 at 12 07 43

Changes

Added:

  • ZMConversation+AutomaticDeletion — adds scheduledDeletionDate/isScheduledForDeletion to ZMConversation.
  • ConversationScheduledForDeletionCell — renders the red in-conversation system message with icon, formatted date, and "Read more" link.

Modified:

  • ZMMessage/ZMMessage+Internal — added ZMSystemMessageTypeConversationScheduledForDeletion and a dedicated conversationScheduledDeletionDate field to ZMSystemMessageData, so the message carries its own copy of the date independent of the conversation's live state.
  • ConversationSystemMessageCellDescription — dispatches the new system message type to ConversationScheduledForDeletionCellDescription.
  • ZMConversation+Status — adds isScheduledForDeletion to ConversationStatus and a ScheduledForDeletionMatcher driving the "Will be deleted soon" subtitle.
  • ConversationListAccessoryView — renders the red warning icon in the conversation list.
  • Message+DateFormatter — adds monthDayTimeFormatter (month, day, and time, without a year or relative wording like "Tomorrow").
  • Bundle+WireURLs/url.json — adds the "Read more" support article link.
  • Core Data model bumped to zmessaging2.139.0 for the new scheduledDeletionDate/conversationScheduledDeletionDate attributes.
  • Added unit tests (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.scheduledDeletionDate and insert a ZMSystemMessage of type .conversationScheduledForDeletion with conversationScheduledDeletionDate set.


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Copilot AI review requested due to automatic review settings July 16, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 (scheduledDeletionDate on ZMConversation, and conversationScheduledDeletionDate on 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.

Comment on lines +45 to 49
static let spellOutDateTimeFormatter: DateFormatter = {
var longDateFormatter = Message.longDateFormatter
longDateFormatter.doesRelativeDateFormatting = true
return longDateFormatter
}()
Comment on lines +159 to +161
case .scheduledForDeletion:
configureScheduledForDeletionIcon()
return iconView
Comment on lines +306 to +316
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
}

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

    3 files    553 suites   5m 47s ⏱️
4 329 tests 4 301 ✅ 27 💤 1 ❌
4 329 runs  4 302 ✅ 27 💤 0 ❌

For more details on these failures, see this check.

Results for commit c0873cd.

Summary: workflow run #29489697258
Allure report (download zip): html-report-32043-feat_adminless-groups_automatic-group-deletion-ui-WPB-25305

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