Telegram-iOS/submodules/ChatListUI/Sources
isaac 69bfc65da7 Postbox refactor waves 138–276: 168-commit squash
Consolidates 137 wave commits + 31 supporting commits (CLAUDE.md bump,
typealias additions, AnyObject→EngineMedia restoration) into one squashed
commit. Migrates dozens of consumer-side public APIs, struct fields,
protocol methods, and enum payloads from Postbox protocols/structs to
TelegramEngine engine wrappers and typealiases. Drops `import Postbox`
from many files. Adds new TelegramCore typealiases and one
TelegramEngineUnauthorized facade.

Notable changes by category:

**TelegramCore typealias additions** (rule 2 — narrow utility typealiases):
- EngineChatListIndex, EngineTempBoxFile, EngineItemCollectionItemIndex,
  EngineItemCollectionViewEntryIndex, EngineValueBoxEncryptionParameters,
  EngineMessageAndThreadId, EnginePeerStoryStats, EngineMessageHistoryAnchorIndex,
  EngineChatListTotalUnreadStateCategory, EngineChatListTotalUnreadStateStats,
  EnginePeerSummaryCounterTags, EngineChatListTotalUnreadState,
  EngineItemCacheEntryId, EngineHashFunctions,
  EngineCachedMediaResourceRepresentationResult,
  EngineMediaResourceDataFetchResult, EngineMediaResourceDataFetchError,
  EngineMediaResourceStatus, EngineCachedPeerData

**TelegramCore engine extensions/forwarders**:
- EngineMessage.engineMedia, EngineMessage.enginePeers,
  EngineMessage.adAttribute, EngineMessage.effectivelyIncoming
- engineFileSize forwarder
- TelegramEngine.Resources.clearCachedMediaResources(mediaResourceIds: Set<EngineMediaResource.Id>)
- TelegramEngine.Resources.fetchStatus(id:resourceSize:)
- TelegramEngineUnauthorized.UnauthorizedResources facade with storeResourceData

**Public API/struct migrations to engine types**:
- ChatAvailableMessageActions.banAuthor/banAuthors → EnginePeer?/[EnginePeer]
- WebSessionsContextState.peers → [EnginePeer.Id: EnginePeer]
- CacheUsageStats.peers → [EnginePeer.Id: EnginePeer]
- PeerCommand.peer → EnginePeer
- PeerInfoControllerMode.calls(messages:) → [EngineMessage]
- CallControllerNodeProtocol.updatePeer → EnginePeer params
- ChatHistoryListNode.messageInCurrentHistoryView (and 4 variants) → EngineMessage?
- ChatHistorySearchContainerNode.messageForGallery → EngineMessage?
- PeerInfoPaneNode.findLoadedMessage / ensureMessageIsVisible /
  transitionNodeForGallery → engine-typed
- GalleryHiddenMediaTarget.getTransitionInfo /
  GalleryHiddenMediaManager.findTarget → engine-typed
- ChatPanelInterfaceInteraction.presentReactionDeletionOptions /
  presentBan*MessageOptions → EnginePeer
- DrawingMessageRenderer.messages → [EngineMessage]
- ChatVideoGalleryItemScrubberView.setFetchStatusSignal →
  EngineMediaResource.FetchStatus
- ChannelDiscussionGroupActionSheetItem.peer, VoiceChatPeerEntry.peer,
  VoiceChatFullscreenParticipantItem.peer, MediaStreamComponent.chatPeer,
  MediaStreamVideoComponent.callPeer, ChatMessageContactBubbleContentNode.contactPeer,
  ChatMessageForwardInfoNode.peer, ChatMessageCommentFooterContentNode.replyPeers,
  ChatReportPeerTitlePanelNode.peer, ChatMessageActionUrlAuthController.bot,
  PeerMediaCollectionInterfaceState.peer, ChatMessageCallBubbleContentNode.peopleAvatars,
  ChatLoadingNode.renderedPeer (→ EngineRenderedPeer) — all to engine types

**Wave-71-shadow stored-field migrations** (Postbox Peer/Message → Engine wrapper):
- LegacyCallControllerNode.peer
- CallStatusBarNode.currentPeer

**Dead-code / dead-field removals**:
- CallController.peer, CallControllerNodeV2.account,
  ContactMultiselectionController PeerNameIndex fields,
  preparedChatListNodeViewTransition account: Account param,
  FetchResource.swift entirely (unused function)

**Module-level Postbox import drops**: 30+ files including TelegramRootController,
EditStories, GiftViewScreen, AnimatedStickerUtils, FetchPhotoLibraryImageResource,
PeerInfoGiftsPaneNode, PeerInfoPaneContainerNode, PresentAddMembers,
PeerInfoProfileItems, ChatControllerAdminBanUsers, PresentationData typealiases,
DefaultDayPresentationTheme, ChatListViewTransition, GalleryHiddenMediaManager,
RecentSessionsController, GifContext, AuthorizationSequenceController,
PeerInfoHeaderEditingContentNode, PeerInfoHeaderNode,
PeerAllowedReactionListController, CallControllerNodeV2, and 6 PeerInfo pane files.

**AnyObject restoration**: rule 8 added (never substitute Postbox protocols
with Any/AnyObject) — undid previous AnyObject substitutions in waves 141/143
back to EngineMedia.

Doc maintenance: CLAUDE.md updated to reflect new typealiases and forwarders.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:44:27 +02:00
..
Node Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatContextMenus.swift Various fixes 2026-04-27 04:40:29 +02:00
ChatListAdditionalCategoryItem.swift Glass 2025-12-26 20:29:30 +08:00
ChatListContainerItemNode.swift Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatListController.swift Various improvements 2026-04-28 23:53:26 +02:00
ChatListControllerLeaveChatConfirmation.swift Update API 2026-02-10 12:58:04 +04:00
ChatListControllerNode.swift Various improvements 2026-04-24 03:16:14 +02:00
ChatListControllerStoryStealthMode.swift Stories 2025-11-06 12:53:18 +04:00
ChatListEmptyNode.swift Various improvements 2025-10-17 17:01:25 +04:00
ChatListFilterPresetCategoryItem.swift Glass 2025-12-26 20:29:30 +08:00
ChatListFilterPresetController.swift Merge commit '96b1432434' 2026-04-24 11:24:47 +04:00
ChatListFilterPresetListController.swift Various improvements 2026-04-24 11:24:14 +04:00
ChatListFilterPresetListItem.swift Glass 2025-12-26 20:29:30 +08:00
ChatListFilterPresetListSuggestedItem.swift Glass 2025-12-26 20:29:30 +08:00
ChatListFilterTagSectionHeaderItem.swift Glass 2025-12-26 20:29:30 +08:00
ChatListRecentPeersListItem.swift Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatListSearchContainerNode.swift Various improvements 2026-04-28 00:44:54 +04:00
ChatListSearchListPaneNode.swift Postbox -> TelegramEngine waves 46-93 (squashed) 2026-04-25 20:48:15 +04:00
ChatListSearchMediaNode.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatListSearchMessageSelectionPanelNode.swift Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatListSearchPaneContainerNode.swift Glass 2025-12-06 01:28:06 +08:00
ChatListSelection.swift Refactoring 2023-04-17 20:21:14 +04:00
ChatListShimmerNode.swift Unseen polls 2026-03-27 18:30:01 +08:00
DateSuggestion.swift Grouped music files 2020-10-06 21:57:44 +04:00
ItemListFilterTitleInputItem.swift Glass 2025-12-26 20:29:30 +08:00
TabBarChatListFilterController.swift Various fixes 2023-03-14 23:25:44 +04:00