Commit graph

78 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
8408e0ae19 Postbox -> TelegramEngine waves 27-36
Consumer-sweep, facade-addition, and Peer→EnginePeer migrations:

- Wave 27: preferencesView consumer sweep
- Wave 28: resourceData consumer sweep
- Wave 29: resourceStatus consumer sweep
- Wave 30: _asStatus() bridge cleanup
- Wave 31: unused-import sweep re-run
- Wave 32: resourceStatus residue sweep
- Wave 33: loadedPeerWithId consumer sweep
- Wave 34: FoundPeer.peer Peer -> EnginePeer
- Wave 35: SendAsPeer.peer Peer -> EnginePeer
- Wave 36: ContactListPeer.peer Peer -> EnginePeer

Also includes per-wave specs, implementation plans, outcome logs, and
a CLAUDE.md wave-counter update.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 11:24:13 +04:00
isaac
7919556375 Postbox -> TelegramEngine wave 20: shortLivedResourceCachePathPrefix consumer sweep
22 call sites across 16 consumer modules migrated to the wave-19 facade:
  context.account.postbox.mediaBox.shortLivedResourceCachePathPrefix(resource.id)
  ->
  context.engine.resources.shortLivedResourceCachePathPrefix(id: EngineMediaResource.Id(resource.id))

ItemListStickerPackItem additionally drops the wave-18 `let rawResource` intermediate.

Skipped: MediaEditorComposerEntity.swift:245 (uses local `postbox:` init-param,
not `context.account.postbox`; needs its own wave). No modules become Postbox-free
this wave — each still has other Postbox usage.
2026-04-21 02:27:39 +04:00
Ilya Laktyushin
b1a190f87a [WIP] Polls 2026-03-16 18:07:12 +01:00
Isaac
962a9ae83a Various improvements 2026-01-30 22:20:50 +08:00
Ilya Laktyushin
2edce5ebf2 Alerts 2025-12-22 00:19:11 +04:00
Ilya Laktyushin
28d4e1e171 Various improvements 2025-12-16 20:05:44 +04:00
Isaac
06936fa06c Text input updates 2025-10-03 18:47:47 +08:00
Isaac
7ed1261193 Various improvements 2025-09-23 21:59:54 +08:00
Isaac
1d06c3f058 Bot forums v2 2025-09-05 15:25:50 +02:00
Isaac
b625243040 Various improvements 2025-07-29 15:48:11 +02:00
Ilya Laktyushin
b4832ff856 Update API 2025-07-14 12:50:11 +01:00
Isaac
3ed857bfc3 Various improvements 2025-06-29 18:15:50 +02:00
Isaac
f79a244bf2 Various improvements 2025-06-27 17:36:37 +02:00
Isaac
3e40713aad Various improvements 2025-06-26 20:29:23 +02:00
Isaac
183db2a8e4 Fix action button layout 2025-06-24 15:28:44 +02:00
Isaac
119db20d25 Various improvements 2025-06-24 15:06:05 +02:00
Isaac
df3e2db84c Suggested posts 2025-06-20 15:37:26 +02:00
Isaac
55c7b6551f [WIP] Suggested posts 2025-06-17 17:07:56 +04:00
Isaac
7b72c1a034 Monoforums 2025-05-29 00:23:43 +08:00
Isaac
2a3e3ad4ba Monoforums 2025-05-24 00:05:48 +08:00
Isaac
77e21b4047 Monoforums 2025-05-23 18:04:36 +08:00
Isaac
f1d0f694f5 [WIP] Monoforums 2025-05-21 00:23:48 +08:00
Isaac
f90402102b [WIP] Monoforums 2025-05-14 00:50:46 +08:00
Isaac
0e119dd6f1 [WIP] Monoforums 2025-05-08 20:56:55 +01:00
Ilya Laktyushin
c5168b8905 Various improvements 2025-04-03 17:06:20 +04:00
Ilya Laktyushin
80cd8f7b32 Various improvements 2025-03-11 06:49:43 +04:00
Isaac
6c4070eb52 Serialization update 2025-02-14 19:11:58 +04:00
Ilya Laktyushin
fdb4b80e27 Various improvements 2024-12-06 09:31:49 +04:00
Isaac
fab8c09a37 Video chat improvements 2024-10-01 21:26:30 +08:00
Isaac
923587b0da [WIP] Dynamic video streaming 2024-09-18 01:04:29 +08:00
Isaac
d8d7264772 Various improvements 2024-08-14 23:52:04 +08:00
Isaac
da45de818a Stars reactions improvements 2024-08-13 21:14:59 +08:00
Isaac
d820ad65e1 Stars reactions 2024-08-02 21:15:11 +08:00
Isaac
29917a97ac Warp experiment 2024-07-25 13:59:21 +08:00
Isaac
42a6f6e8bc Bot previews 2024-07-24 01:56:34 +08:00
Isaac
8af8de7096 Reaction experiments 2024-06-28 19:36:15 +02:00
Isaac
1b1846dc63 Draw effects on top of the keyboard 2024-06-11 17:54:13 +04:00
Isaac
53fe1718e9 Various improvements 2024-06-07 16:07:36 +04:00
Isaac
8a1d228fba Fix animations 2024-06-02 16:07:00 +04:00
Ilya Laktyushin
464eb8625f Hashtag search improvements 2024-05-22 14:04:37 +04:00
Isaac
ea1598e4a6 Merge commit 'a9468d0dc2' 2024-05-21 00:02:58 +04:00
Isaac
fe788ed9ea Message preview and effect improvements 2024-05-21 00:02:55 +04:00
Ilya Laktyushin
43faf7619d Fact check fixes 2024-05-20 20:00:50 +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
Ilya Laktyushin
cb7560a34e [WIP] Birthdays 2024-03-22 12:08:27 +04:00
Isaac
6ed9cef40a [WIP] Quick replies 2024-02-23 15:26:33 +04:00
Isaac
46881c65ca [WIP] Business 2024-02-16 22:52:01 +04:00
Ilya Laktyushin
cce393a28a Merge commit 'b909d1bea0' 2024-02-06 17:33:38 +04:00