Telegram-iOS/submodules/TelegramUI/Components/Chat
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
..
AccessoryPanelNode
ChatAgeRestrictionAlertController Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatAvatarNavigationNode Various fixes 2026-04-23 01:26:13 +02:00
ChatBotInfoItem Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatButtonKeyboardInputNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatChannelSubscriberInputPanelNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatContextResultPeekContent Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatEmptyNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatHistoryEntry Various improvements 2026-04-22 00:32:34 +04:00
ChatHistorySearchContainerNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatInlineSearchResultsListComponent Various improvements 2026-04-03 22:15:42 +08:00
ChatInputAccessoryPanel
ChatInputAutocompletePanel
ChatInputContextPanelNode
ChatInputMessageAccessoryPanel Various fixes 2026-04-27 03:07:38 +02:00
ChatInputPanelNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatInputTextNode Various improvements 2026-02-11 22:04:54 +04:00
ChatInstantVideoMessageDurationNode
ChatLoadingNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMediaInputStickerGridItem
ChatMessageActionBubbleContentNode
ChatMessageActionButtonsNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageAnimatedStickerItemNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageAttachedContentButtonNode
ChatMessageAttachedContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageBirthdateSuggestionContentNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatMessageBubbleContentNode Rich bubble: scrollToAnchor + getAnchorRect 2026-05-02 00:36:34 +02:00
ChatMessageBubbleItemNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageCallBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageCommentFooterContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageContactBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageDateAndStatusNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageDeliveryFailedNode
ChatMessageDisableCopyProtectionBubbleContentNode Update localization 2026-02-24 19:33:42 +04:00
ChatMessageEventLogPreviousDescriptionContentNode
ChatMessageEventLogPreviousLinkContentNode
ChatMessageEventLogPreviousMessageContentNode
ChatMessageFactCheckBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageFileBubbleContentNode Improve animations 2026-04-30 12:56:55 +04:00
ChatMessageForwardInfoNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageGameBubbleContentNode
ChatMessageGiftBubbleContentNode Improve animations 2026-04-30 12:56:55 +04:00
ChatMessageGiftOfferBubbleContentNode
ChatMessageGiveawayBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageInstantVideoBubbleContentNode Improve animations 2026-04-30 12:56:55 +04:00
ChatMessageInstantVideoItemNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageInteractiveFileNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageInteractiveInstantVideoNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageInteractiveMediaNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageInvoiceBubbleContentNode
ChatMessageItem
ChatMessageItemCommon Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageItemImpl Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatMessageItemView Visual improvements 2026-05-02 00:36:33 +02:00
ChatMessageJoinedChannelBubbleContentNode Postbox -> TelegramEngine waves 46-93 (squashed) 2026-04-25 20:48:15 +04:00
ChatMessageMapBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageMediaBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageNotificationItem Postbox -> TelegramEngine wave 6: unused import Postbox batch sweep 2026-04-19 23:46:13 +02:00
ChatMessagePaymentAlertController Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatMessagePollBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageProfilePhotoSuggestionContentNode
ChatMessageReactionsFooterContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageReplyInfoNode Various fixes 2026-04-14 03:33:34 +02:00
ChatMessageRestrictedBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageRichDataBubbleContentNode Refactoring 2026-05-03 10:31:22 +02:00
ChatMessageSelectionInputPanelNode Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatMessageSelectionNode
ChatMessageShareButton Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageStarsMediaInfoNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageStickerItemNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageStoryMentionContentNode
ChatMessageSuggestedPostInfoNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatMessageSwipeToReplyNode
ChatMessageTextBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageThreadInfoNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageTodoBubbleContentNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageTransitionNode
ChatMessageUnlockMediaNode Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
ChatMessageUnsupportedBubbleContentNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatMessageWallpaperBubbleContentNode
ChatMessageWebpageBubbleContentNode Improve animations 2026-04-30 12:56:55 +04:00
ChatNavigationButton
ChatNewThreadInfoItem Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatOverscrollControl Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatPanelsComponent Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatQrCodeScreen Postbox -> TelegramEngine waves 46-93 (squashed) 2026-04-25 20:48:15 +04:00
ChatRankInfoScreen Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatRecentActionsController Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatRecordingPreviewInputPanelNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatRecordingViewOnceButtonNode Glass 2026-01-25 00:31:18 +08:00
ChatSearchNavigationContentNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatSendAsContextMenu Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatSendAudioMessageContextPreview Rich bubble: scrollToAnchor + getAnchorRect 2026-05-02 00:36:34 +02:00
ChatSendStarsScreen Postbox -> TelegramEngine waves 37-43 + wave 44 design/plan (squashed) 2026-04-24 23:19:43 +04:00
ChatShareMessageTagView Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ChatSideTopicsPanel Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatSwipeToReplyRecognizer
ChatTextInputActionButtonsNode Various improvements 2026-04-28 16:58:04 +04:00
ChatTextInputAudioRecordingCancelIndicator
ChatTextInputAudioRecordingTimeNode
ChatTextInputPanelNode Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
ChatTextInputSlowmodePlaceholderNode
ChatUserInfoItem Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
EditableTokenListNode Glass 2026-01-25 00:31:18 +08:00
FactCheckAlertController Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ForwardAccessoryPanelNode Alerts 2025-12-22 23:28:04 +04:00
InstantVideoRadialStatusNode
ManagedDiceAnimationNode Postbox -> TelegramEngine waves 27-36 2026-04-24 11:24:13 +04:00
MergedAvatarsNode Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
MessageHaptics
MessageInlineBlockBackgroundView Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
MessageQuoteComponent
PollBubbleTimerNode [WIP] Polls 2026-03-17 11:12:58 +01:00
QuickShareScreen Improve quick share toast 2026-04-30 12:39:54 +02:00
ReplyAccessoryPanelNode Postbox -> TelegramEngine waves 107-137 (squashed) 2026-05-03 10:28:50 +02:00
SavedTagNameAlertController Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
ShimmeringLinkNode Various improvements 2026-02-19 21:53:26 +04:00
SuggestPostAccessoryPanelNode Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep 2026-04-20 20:26:58 +02:00
TopMessageReactions Various improvements 2026-04-28 14:31:17 +02:00