Commit Graph
91 Commits
Author SHA1 Message Date
isaacisaacClaude Opus 4.7
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
isaacisaacClaude Opus 4.7
d1aa0db537 Postbox -> TelegramEngine waves 46-93 (squashed)
Squash of 63 commits spanning waves 46-93 (plus interspersed docs commits)
of the gradual Postbox->TelegramEngine consumer-side migration.

Scope: 139 files changed, 2123 insertions(+), 452 deletions(-).

## Themes by wave-block

**Waves 46-58 — Peer field migrations + facade additions**
Foundational EnginePeer convenience init additions (PeerReference, RenderedPeer,
SelectivePrivacyPeer). Multiple `peer: Peer` field migrations across PeerInfo,
ChatList, and SettingsUI components.

**Waves 59-73 — peer field cascade + EnginePeer wrap drops**
Series of single- to two-file peer-field migrations; consumer-side wrap
removal (`EnginePeer(peer)` -> direct EnginePeer use); `as? TelegramUser`
cast conversion to `case let .user(...)` enum match. Wave 64: RenderedPeer
convenience init. Wave 68: SelectivePrivacyPeer convenience init.

**Waves 74-83 — controller-Node bridge cleanup + small migrations**
Wave-71 shadow-pattern cleanup at controller->Node bridges. Migrations of
ChatRecentActionsController.peer (74), PeerInfoMember (75), MentionChatInputPanelItem
(76), PassportUI SecureIdAuthController (77), AccountWithInfo + ShareController
(78), peerInputActivitiesPromise (79), InactiveChannel (80), BlockedPeers (81),
openHashtag resolveSignal (82), NotificationExceptionsList (83).

**Waves 84-90 — TelegramEngine.Resources facade migrations**
Per-method Shape-A/B sweeps converting `<ctx>.account.postbox.mediaBox.X(...)`
to `<ctx>.engine.resources.X(...)`. Wave 90 was a single-commit big sweep:
40 fetchedMediaResource sites in 25 files migrated to engine.resources.fetch
facade in one atomic pass with first-pass-clean build.

Methods covered: storeResourceData, completedResourcePath, cancelInteractiveResourceFetch,
resourceRangesStatus, resourceStatus, fetch (fetchedMediaResource).

**Waves 91-92 — additional type migrations**
Wave 91: ItemListWebsiteItem.peer + RecentSessionsController enum-case payload
+ openWebSession callback Peer? -> EnginePeer?.
Wave 92: ChatListController StateHolder.EntryContext status type
MediaResourceStatus -> EngineMediaResource.FetchStatus.

**Wave 93 — speculative `import Postbox` drop sweep**
Drop import from 7 wave-touched files where it became unused; restore in 5
files where bare PeerId/Message/MediaId/StoryId references escaped the
pre-flight regex. Includes one MediaId(...) -> EngineMedia.Id(...) swap in
InAppPurchaseManager to unlock its import drop.

## Build state

Final state at squash: clean Telegram/Telegram build at debug_sim_arm64.

## Persistent-state notes

- Pre-existing WIP unchanged across the squashed range:
  - build-system/bazel-rules/sourcekit-bazel-bsp submodule marker
  - Untracked: build-system/tulsi/, submodules/TgVoip/, third-party/libx264/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 20:48:15 +04:00
isaacisaacClaude Opus 4.7
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
isaacandisaac a7e9375d55 Fix sticker display 2026-04-21 14:00:16 +04:00
Ilya Laktyushin e11c9899e6 Various fixes 2026-03-23 15:03:50 +01:00
Ilya Laktyushin 6aa99e3553 Various improvements 2026-03-22 14:04:33 +01:00
Ilya Laktyushin 94923cc353 Reapply "Update API"
This reverts commit 0411cfc18c.
2026-03-11 18:51:44 +01:00
Ilya Laktyushin 0411cfc18c Revert "Update API"
This reverts commit 6c1376169c.
2026-03-11 18:04:50 +01:00
Ilya Laktyushin 6c1376169c Update API 2026-03-11 14:37:23 +01:00
Ilya Laktyushin 2c4c9a9d9b [WIP] Live photos 2026-02-20 13:28:58 +04:00
Ilya Laktyushin d9d1210c1d Various improvements 2026-02-19 21:53:26 +04:00
IsaacandIsaac 6ad2622b30 Various updates 2026-01-24 00:35:42 +08:00
Ilya Laktyushin 653ee1b299 Update API 2025-12-02 14:28:47 +04:00
Ilya Laktyushin 412e02ef00 Gift auctions 2025-11-12 04:46:02 +04:00
Ilya Laktyushin 4e1b9943a4 Various improvements 2025-08-26 15:44:41 +04:00
IsaacandIsaac b625243040 Various improvements 2025-07-29 15:48:11 +02:00
Ilya Laktyushin dff0a61d19 Various improvements 2025-07-19 12:51:42 +01:00
IsaacandIsaac 636508fc97 Various improvements
(cherry picked from commit 7e240c7064)
2025-07-09 17:47:56 +04:00
IsaacandIsaac 4fdbe44825 Various improvements 2025-05-30 21:08:32 +08:00
Ilya Laktyushin b130511450 [WIP] Gift resale 2025-04-12 02:19:32 +04:00
IsaacandIsaac aaf52d4282 Conference calls 2025-03-30 02:06:50 +04:00
IsaacandIsaac 6faefd876a Merge commit '399933bc5e681018a21941b27081142caed9cb0b' 2025-03-13 00:35:11 +01:00
Ilya Laktyushin 80cd8f7b32 Various improvements 2025-03-11 06:49:43 +04:00
IsaacandIsaac 383ab9e479 Various improvements 2025-03-07 17:52:50 +01:00
Ilya Laktyushin c39fdb4463 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2025-02-22 19:17:46 +04:00
Ilya Laktyushin 8d7f9bf372 Various improvements 2025-02-22 19:17:36 +04:00
IsaacandIsaac da48b145e9 Various improvements 2025-02-21 16:17:15 +01:00
IsaacandIsaac f17ead143a Various improvements 2025-02-18 14:43:23 +01:00
IsaacandIsaac aaee014955 Debugging 2025-02-15 13:04:30 +04:00
IsaacandIsaac c178023779 Fix memory leak 2025-02-13 18:51:54 +04:00
IsaacandIsaac b5b720e4c0 Add kilsswitches 2025-01-29 23:02:11 +04:00
IsaacandIsaac c735e0cdb8 Adjust color 2025-01-28 21:40:02 +04:00
IsaacandIsaac 3728be84cb Video improvements 2025-01-28 20:51:04 +04:00
IsaacandIsaac c21ebb06b5 Finalize timestamp sharing 2025-01-24 21:03:39 +04:00
Ilya Laktyushin bf8c4f1ecd Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2025-01-22 13:37:05 +04:00
Ilya Laktyushin c0bfe87449 Various improvements 2025-01-22 13:24:13 +04:00
IsaacandIsaac 46225ca99b Remove pre-release feature 2025-01-21 22:14:40 +04:00
IsaacandIsaac 40828e9037 [WIP] UI 2025-01-21 21:08:44 +04:00
Ilya Laktyushin 575eb2ca5f Various improvements 2025-01-20 01:25:42 +04:00
Ilya Laktyushin 2bf24b2bd9 Gift web preview 2025-01-07 20:34:57 +04:00
IsaacandIsaac df9e27f4fb [Temp] video v2 2024-12-25 00:18:02 +08:00
IsaacandIsaac 835ea7358b Stars ref 2024-11-29 20:20:26 +04:00
IsaacandIsaac 9bb46cb90b Fix codec handing 2024-11-16 23:30:03 +04:00
IsaacandIsaac 8a73a4b4cd Disable inline HLS autoplay when automatic downloads are disabled 2024-11-15 18:50:53 +04:00
IsaacandIsaac 79c3d87abc Merge commit '40080bbe1fb0aab4a5b21d83fc0d575436176447' 2024-11-14 21:14:42 +04:00
IsaacandIsaac 261fc96d02 Video improvements 2024-11-14 21:14:29 +04:00
Ilya Laktyushin e7f6d60b73 Various improvements 2024-11-12 02:15:21 +04:00
IsaacandIsaac 3797f3af4f Video improvements 2024-11-08 16:26:01 +01:00
IsaacandIsaac 9e32dab3cc Video status improvements 2024-11-01 16:23:17 +01:00
IsaacandIsaac 153fa93a81 Video improvements 2024-10-25 15:59:12 +02:00