Commit graph

161 commits

Author SHA1 Message Date
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
isaac
493f3103b3 Postbox -> TelegramEngine waves 37-43 + wave 44 design/plan (squashed)
Squashes 20 commits — the implementation and outcome commits of
waves 37 through 43 plus wave 44's spec and implementation-plan
docs — into a single commit. Per-wave lessons remain recorded in
docs/superpowers/postbox-refactor-log.md. The unrelated "Add swift
svg" commit is preserved separately outside this squash.

Wave 37 — peerTokenTitle: peer Peer → EnginePeer (1 file)
Wave 38 — canSendMessagesToPeer: peer Peer → EnginePeer (12 files)
Wave 39 — AccountContext.makePeerInfoController: peer Peer → EnginePeer (52 files)
Wave 40 — makeChatQrCodeScreen + makeChatRecentActionsController bundle (8 files)
Wave 41 — RenderedChannelParticipant.peer: Peer → EnginePeer (28 files)
Wave 42 — PeerInfoScreenData.peer: Peer? → EnginePeer? (17 files)
Wave 43 — PeerInfoScreen 6 helpers: peer Peer? → EnginePeer? (12 files)
Wave 44 — RenderedChannelParticipant.peers design doc + implementation plan
         (impl and outcome land in subsequent commits, not part of squash)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 23:19:43 +04:00
Isaac
9a4327116d Refactor 2026-03-10 00:38:36 +01:00
Isaac
1bb139ff32 Various improvements 2026-02-03 20:17:44 +08:00
Ilya Laktyushin
0d12dd29ad Various improvements 2026-01-25 22:17:49 +04:00
Isaac
2db08cde89 Glass 2026-01-13 19:21:49 +04:00
Isaac
05b667797d Glass 2025-12-28 22:39:34 +08:00
Isaac
4a13c3830a Glass 2025-12-26 20:29:30 +08:00
Isaac
3486393f99 Glass 2025-12-20 03:02:08 +08:00
Isaac
a63c90aa00 Glass 2025-12-12 23:58:00 +08:00
Isaac
1ee7268488 Glass 2025-12-06 01:28:06 +08:00
Isaac
0055396d4d Update 2025-11-26 23:05:30 +08:00
Isaac
5e26b246bd [WIP] Tab bar and search 2025-11-22 03:17:19 +08:00
Ilya Laktyushin
0915a42e64 Various improvements 2025-10-16 05:30:06 +04:00
Isaac
d3a3ea008d Glass 2025-09-18 14:15:51 +04:00
Isaac
edd33a0103 Update localization 2025-07-29 20:54:12 +02:00
Isaac
636508fc97 Various improvements
(cherry picked from commit 7e240c7064)
2025-07-09 17:47:56 +04:00
Isaac
c5f2953e90 Various improvements 2025-07-01 15:49:15 +02:00
Isaac
d486f529a3 Various improvements 2025-06-06 20:20:42 +08:00
Ilya Laktyushin
ee38ee55d4 Various fixes 2025-05-05 18:42:51 +04:00
Isaac
4bbea1f0d0 Conference improvements 2025-04-18 17:56:24 +04:00
Isaac
d49d2271cf Conference improvements 2025-04-17 23:56:32 +04:00
Isaac
c7269fa310 Conference updates 2025-04-15 17:49:31 +04:00
Isaac
dcde323740 Conference 2025-04-11 17:16:36 +04:00
Isaac
22b4c30774 Conference updates 2025-04-11 14:41:49 +04:00
Isaac
84ad1344c7 Confrence updates 2025-04-10 19:56:53 +04:00
Isaac
700a71f393 Update localization 2025-04-09 18:21:11 +04:00
Isaac
cd30285d87 Conference updates 2025-04-09 17:16:30 +04:00
Isaac
a2234e9271 Conference updates 2025-04-08 20:17:13 +04:00
Isaac
2ab4af656b Conference calls 2025-04-08 16:35:41 +04:00
Isaac
cb83bc1b67 Conference calls 2025-04-08 15:58:03 +04:00
Isaac
c78095e2d3 Conference updates 2025-04-08 14:38:46 +04:00
Isaac
51a657c41c Conference updates 2025-04-07 18:13:22 +04:00
Isaac
a2c624c3b3 Conference improvements 2025-04-03 19:33:12 +04:00
Isaac
1a31d83699 Conference calls 2025-04-03 00:37:42 +04:00
Isaac
5076c948d8 Remove conference debug setting 2025-04-02 18:17:48 +04:00
Isaac
2393424bde Conference calls 2025-04-01 17:18:08 +04:00
Isaac
dd471503ba Merge commit '7d8920db82'
# Conflicts:
#	submodules/CallListUI/Sources/CallListController.swift
2025-03-30 02:07:46 +04:00
Isaac
aaf52d4282 Conference calls 2025-03-30 02:06:50 +04:00
Ilya Laktyushin
5956d5142f Various improvements 2025-03-21 18:41:49 +04:00
Isaac
17dd059f13 [WIP] Conference 2025-03-19 18:55:24 +01:00
Isaac
3e74304640 [WIP] Conference calls 2025-02-06 21:12:05 +04:00
Ilya Laktyushin
5f81995c63 Various fixes 2024-10-11 21:51:06 +04:00
Isaac
378b7e8ed5 Message preview improvements 2024-05-17 17:10:19 +04:00
Isaac
16faaa4575 [WIP] Send message effects 2024-05-03 22:56:50 +04:00
Ilya Laktyushin
914dbc46f6 Recent actions improvements 2024-04-23 12:01:28 +04:00
Isaac
e451881c79 Fix calls title tabs 2023-11-27 18:14:04 +04:00
Ali
d892e030e0 Debugging 2023-09-25 19:47:44 +04:00
Ali
4330dc14d2 [WIP] Disposable debugging 2023-09-16 11:45:30 +02:00
Ali
77a5857a25 Sharing refactoring 2023-08-15 23:57:04 +04:00