Skip to content

feat: add searching for apps - WPB-20362#4243

Merged
caldrian merged 715 commits intodevelopfrom
feat/search-for-apps-WPB-20362
Mar 24, 2026
Merged

feat: add searching for apps - WPB-20362#4243
caldrian merged 715 commits intodevelopfrom
feat/search-for-apps-WPB-20362

Conversation

@caldrian
Copy link
Copy Markdown
Contributor

@caldrian caldrian commented Feb 2, 2026

TaskWPB-20362 [iOS/Integration] - Searching for Apps specifically

Issue

This PR adds support for searching apps to the search UI.

Testing

Have a team with MLS and apps enabled, add apps to the team and observe that apps are listed and filtered in the search UI.


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.

@caldrian caldrian force-pushed the feat/search-for-apps-WPB-20362 branch from 50c2e3d to a258b8b Compare February 12, 2026 12:50
@caldrian caldrian marked this pull request as ready for review March 20, 2026 11:58
@caldrian caldrian enabled auto-merge March 20, 2026 12:14
@caldrian caldrian requested review from johnxnguyen and removed request for David-Henner March 20, 2026 12:24
@caldrian caldrian requested a review from jullianm March 24, 2026 08:59
Copy link
Copy Markdown
Collaborator

@johnxnguyen johnxnguyen left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor questions.

Comment thread wire-ios-sync-engine/Tests/Source/SessionManager/URLActionTests.swift Outdated
@caldrian caldrian requested a review from Copilot March 24, 2026 09:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds app-specific searching to the Start/Add Participants search UI, differentiating between apps (MLS) and bots (Proteus), and updates underlying data/model/search plumbing to support user types.

Changes:

  • Introduces new search groups (apps, bots) and updates UI flows to query/display apps vs bots.
  • Updates service/app detail handling and app/bot conversation entrypoints, including new user-type migration.
  • Refactors sync-engine search aggregation and data-model user typing; updates/extends snapshot + unit tests accordingly.

Reviewed changes

Copilot reviewed 64 out of 64 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/StartUIViewController.swift Wires new group selector and routes queries to apps vs bots search.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/StartUIViewController+SearchResults.swift Updates selection handling for app/bot detail presentation and result callbacks.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/SearchResultsViewControllerDelegate.swift Splits delegate callbacks into app vs bot taps.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/SearchResultsViewController.swift Adds apps/bots groups/sections and routes selection by user type.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/SearchGroupSelector.swift Makes group selector protocol-aware (MLS vs Proteus).
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/Common/SectionControllers/Services/SearchServicesSectionController.swift Renames/refactors services section into apps/bots section controller.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/Common/EmptySearchResultsView.swift Renames services empty states to apps and updates UI state logic.
wire-ios/Wire-iOS/Sources/UserInterface/StartUI/Common/Cells/OpenServicesAdminCell.swift Renames the admin cell to bots admin cell.
wire-ios/Wire-iOS/Sources/UserInterface/Services/ServiceView.swift Passes userSession to image view and switches to service.user.
wire-ios/Wire-iOS/Sources/UserInterface/Services/ServiceDetailViewController.swift Extends details flow for apps vs legacy bots; adds async add/open flows.
wire-ios/Wire-iOS/Sources/UserInterface/Helpers/UserDetailViewControllerFactory.swift Updates service detail controller init for new API and removal action.
wire-ios/Wire-iOS/Sources/UserInterface/Conversation/ConversationViewController+ProfileViewControllerDelegate.swift Removes an outdated TODO comment.
wire-ios/Wire-iOS/Sources/UserInterface/Components/Views/UserCell.swift Renames subtitle helper for app/bot search users.
wire-ios/Wire-iOS/Sources/UserInterface/AddContacts/AddParticipantsViewController.swift Updates search group behavior and routes to apps/bots search + detail actions.
wire-ios/Wire-iOS.xcodeproj/project.pbxproj Adds WireData/WireNetwork support dependencies to test targets.
wire-ios/Wire-iOS UnitTests/ZMUserMentionsTest.swift Updates mentions tests to use bot mock semantics.
wire-ios/Wire-iOS Tests/Utils/CoreDataSnapshotTestCase.swift Renames fixture helper to create a bot.
wire-ios/Wire-iOS Tests/UserSearchResultsViewControllerTests.swift Updates snapshot fixture to bot mock.
wire-ios/Wire-iOS Tests/ReferenceImages/EmptySearchResultsViewTests/testServicesNotEnabled.1.png Updates snapshot reference for empty apps/bots state.
wire-ios/Wire-iOS Tests/ReferenceImages/EmptySearchResultsViewTests/testNoResultsForServices.1.png Updates snapshot reference for empty apps/bots state.
wire-ios/Wire-iOS Tests/EmptySearchResultsViewTests.swift Re-enables/updates snapshots for apps/bots empty results states.
wire-ios/Wire-iOS Tests/ConversationViewControllerSnapshotTests.swift Updates snapshot fixture to bot creation helper.
wire-ios/Wire-iOS Tests/ConversationMessageCell/ConversationSystemMessageTests.swift Updates mock service user to bot.
wire-ios/Wire-iOS Tests/ConversationMessageCell/ConversationMessageFailedRecipientsTests.swift Updates snapshot fixture to bot creation helper.
wire-ios/Wire-iOS Tests/ConversationDetail/ServiceDetailViewControllerSnapshotTests.swift Updates snapshots to new ServiceDetail VC init + bot mock.
wire-ios/Tests/Mocks/MockUserType.swift Adds appInfo to mock user type.
wire-ios/Tests/Mocks/MockServiceUserType+Creation.swift Renames service-user factory to bot factory.
wire-ios/Tests/Fixture/CoreDataFixture.swift Renames service-user creation to bot creation.
wire-ios-sync-engine/Tests/Source/UserSession/ZMUserSession/AppVersionMigrations/AppVersionMigration_4_18_0Tests.swift Adds test for new migration that forces user refresh for type fetching.
wire-ios-sync-engine/Tests/Source/UserSession/Search/SearchTaskTests.swift Updates tests for renamed bots remote search.
wire-ios-sync-engine/Tests/Source/UserSession/Search/SearchDirectoryTests.swift Updates ZMSearchUser init for new type parameter.
wire-ios-sync-engine/Tests/Source/SessionManager/URLActionTests.swift Makes test class final and adds connect-bot URL parsing assertion.
wire-ios-sync-engine/Source/UserSession/ZMUserSession/ZMUserSession.swift Registers new app-version migration 4.18.0.
wire-ios-sync-engine/Source/UserSession/ZMUserSession/AppVersionMigrations/AppVersionMigration_4_18_0.swift Implements migration to mark users for backend refresh to populate type.
wire-ios-sync-engine/Source/UserSession/URLActionProcessors/ConnectToBotURLActionProcessor.swift Updates connect-bot action payload parsing and sets search user type to bot.
wire-ios-sync-engine/Source/UserSession/Search/SearchTask.swift Adds apps local/remote handling and renames services search to bots search.
wire-ios-sync-engine/Source/UserSession/Search/SearchResult.swift Adds union helpers for apps/bots results.
wire-ios-sync-engine/Source/UserSession/Search/SearchRequest.swift Adds CustomDebugStringConvertible for easier SearchOptions debugging.
wire-ios-sync-engine/Source/SessionManager/URLActions.swift Changes connect-bot action signature to providerID/serviceID.
wire-ios-sync-engine/Source/Data Model/ServiceUser.swift Refactors service/bot add/fetch helpers and adds cancelled to AddBotResult.
wire-ios-data-model/Tests/Source/Model/UserTypeTests+Materialize.swift Updates ZMSearchUser init calls for new type parameter.
wire-ios-data-model/Tests/Source/Model/User/ZMSearchUserTests.m Updates Objective-C initializers for new type parameter.
wire-ios-data-model/Tests/Source/Model/User/ZMSearchUserTests+TeamUser.swift Updates ZMSearchUser init calls for new type parameter.
wire-ios-data-model/Tests/Source/Model/User/ZMSearchUserTests+ProfileImages.swift Updates helper to pass type through to ZMSearchUser.
wire-ios-data-model/Tests/Source/Model/User/ZMSearchUserTests+Connections.swift Updates ZMSearchUser init calls for new type parameter.
wire-ios-data-model/Tests/Source/Model/TeamTests.swift Updates team member search to filter by regular user type.
wire-ios-data-model/Tests/Source/Model/Observer/SearchUserSnapshotTests.swift Updates helper to pass type through to ZMSearchUser.
wire-ios-data-model/Tests/Source/Model/Observer/SearchUserObserverTests.swift Updates helper to pass type through to ZMSearchUser.
wire-ios-data-model/Tests/Source/Model/Observer/SearchUserObserverCenterTests.swift Updates helper to pass type through to ZMSearchUser.
wire-ios-data-model/Source/Model/User/ZMSearchUser.swift Adds internal user type + summary, ObjC wrapper for type, and app/bot detection.
wire-ios-data-model/Source/Model/User/UserType.swift Extends UserType with teamIdentifier and appInfo to support apps.
wire-ios-data-model/Source/Model/Teams/Team.swift Adds server-side type filtering to team member search.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/Snapshots/TeamsAPITests/testGetApp_givenV14AndAbove_AndSuccessResponse200_thenSucceeds.request-0-v15.txt Removes obsolete app endpoint request snapshot for V14/V15 loop.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/Snapshots/TeamsAPITests/testGetApp_givenV14AndAbove_AndSuccessResponse200_thenSucceeds.request-0-v14.txt Removes obsolete app endpoint request snapshot for V14/V15 loop.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/Snapshots/TeamsAPITests/testGetApp_FailureResponse_AppFound_V14AndAbove.request-0-v15.txt Removes obsolete app endpoint error snapshot for V14/V15 loop.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/Snapshots/TeamsAPITests/testGetApp_FailureResponse_AppFound_V14AndAbove.request-0-v14.txt Removes obsolete app endpoint error snapshot for V14/V15 loop.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/TeamsAPITests.swift Removes deprecated V14 get-app tests.
WireNetwork/Tests/WireNetworkTests/APIs/Rest/TeamsAPI/Resources/GetAppSuccessResponseV14.json Removes deprecated V14 response fixture.
WireNetwork/Sources/WireNetwork/Models/Team/TmpApp.swift Removes temporary app model used only by deprecated V14 endpoint.
WireNetwork/Sources/WireNetwork/APIs/Rest/TeamsAPI/TeamsAPIV14.swift Removes V14 app endpoint implementation.
WireNetwork/Sources/WireNetwork/APIs/Rest/TeamsAPI/TeamsAPIV0.swift Removes unsupported get-app stub from base API.
WireNetwork/Sources/WireNetwork/APIs/Rest/TeamsAPI/TeamsAPIError.swift Removes app-not-found error for deleted endpoint.
WireNetwork/Sources/WireNetwork/APIs/Rest/TeamsAPI/TeamsAPI.swift Removes get-app from TeamsAPI protocol.
WireData/Tests/WireDataTests/WireDataTests.swift Replaces placeholder test with a UI delegate protocol (likely misplaced).
Comments suppressed due to low confidence (5)

wire-ios/Wire-iOS/Sources/UserInterface/Services/ServiceDetailViewController.swift:1

  • The app/bot branches appear inverted: isLegacyBot is set from user.isBot, so !service.isLegacyBot corresponds to an app, but it calls openConversationWithBot, and vice versa. Swap these calls so apps use openConversationWithApp(...) and legacy bots use openConversationWithBot(...).
    wire-ios/Wire-iOS/Sources/UserInterface/StartUI/StartUI/SearchResultsViewController.swift:1
  • Apps represented as ZMSearchUser (or any non-ZMUser conforming UserType) will fall into user.isAppOrBot and be reported as didTapOnBot, even when user.isApp == true. This breaks downstream flows that distinguish app vs bot (e.g., AddParticipants chooses .addApp vs .addBot). Route based on user.isApp / user.isBot rather than only ZMUser.type.
    wire-ios/Wire-iOS/Sources/UserInterface/AddContacts/AddParticipantsViewController.swift:1
  • This behavior used to apply to the old .services tab; after splitting into .apps and .bots, the same UX issue applies to the .bots group as well. Update the condition to clear input/hide confirm when switching to either .apps or .bots.
    wire-ios-data-model/Tests/Source/Model/UserTypeTests+Materialize.swift:1
  • The helper accepts a type parameter but always passes type: .regular to ZMSearchUser, ignoring the argument. This makes it impossible for tests to create .app/.bot search users and can mask issues. Pass the type parameter through to the initializer.
//

wire-ios-sync-engine/Tests/Source/SessionManager/URLActionTests.swift:1

  • The test name testThatIt is non-descriptive and doesn’t convey the behavior under test. Rename it to reflect what’s asserted (e.g., parsing a wire://connect?... URL into .connectBot(providerID:serviceID:)).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wire-ios-sync-engine/Source/UserSession/Search/SearchTask.swift
Comment thread wire-ios-sync-engine/Source/UserSession/Search/SearchTask.swift Outdated
Comment thread wire-ios-data-model/Source/Model/User/UserType.swift Outdated
@caldrian caldrian disabled auto-merge March 24, 2026 09:59
@caldrian caldrian enabled auto-merge March 24, 2026 12:27
@sonarqubecloud
Copy link
Copy Markdown

@caldrian caldrian added this pull request to the merge queue Mar 24, 2026
Merged via the queue into develop with commit 235eb8c Mar 24, 2026
15 checks passed
@caldrian caldrian deleted the feat/search-for-apps-WPB-20362 branch March 24, 2026 16:43
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.

4 participants