Commit graph

74 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
Ilya Laktyushin
f41630083a Various improvements 2026-04-24 03:16:14 +02:00
Isaac
8edaa79eda Merge commit '23c4d94748' 2026-04-19 23:54:22 +02:00
Isaac
4ae15b42a7 Postbox -> TelegramEngine wave 3: MediaBox fetch/status/data facades + SaveToCameraRoll
Adds three thin forwarding methods on TelegramEngine.Resources
(fetch, status, data) over MediaBox, then migrates SaveToCameraRoll's
three public functions to use them, drops import Postbox from the
module (source + Bazel dep), and updates all 23 call sites across 14
caller files atomically.

Bundled: spec + fix + plan + C1 facades + C2 SaveToCameraRoll rewrite
+ BUILD dep drop + CLAUDE.md outcome.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:45:34 +02:00
Ilya Laktyushin
d88a29b378 Various improvements 2026-04-18 08:41:08 +02:00
Ilya Laktyushin
9fe004a7ec Various improvements 2026-02-25 02:08:33 +04: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
Isaac
a23deded22 Cleanup 2025-06-28 19:48:34 +02:00
Ilya Laktyushin
de6f737bc1 Various fixes 2024-11-29 03:26:24 +04:00
Ilya Laktyushin
04b25d7152 Various improvements 2024-10-22 14:09:47 +04:00
Ilya Laktyushin
3fe6f7a069 Various improvements 2024-10-19 20:24:02 +04:00
Ilya Laktyushin
89e3ae02a2 Various improvements 2024-10-09 00:05:41 +04:00
Ilya Laktyushin
2b6a8e202e Various fixes 2024-04-30 12:58:20 +04:00
Isaac
8446fd3ab1 Business fixes 2024-02-28 19:22:43 +04:00
Ilya Laktyushin
b9dc5d99cd Camera improvements 2023-05-01 15:51:23 +04:00
Ilya Laktyushin
da421229fd Camera improvements 2023-04-25 18:38:09 +04:00
Ilya Laktyushin
c339bc8701 Chat wallpaper fixes 2023-04-14 00:36:03 +04:00
Ilya Laktyushin
4e72188755 Chat wallpaper improvements 2023-04-12 19:17:42 +04:00
Ilya Laktyushin
62470a424f Chat wallpaper improvements 2023-04-11 22:25:41 +04:00
Ilya Laktyushin
9937826307 Various fixes 2022-12-23 10:11:08 +04:00
Ali
614c74b0b0 [WIP] Modern cache 2022-12-17 00:17:31 +04:00
Ilya Laktyushin
ab9bb767c2 Various fixes 2022-11-27 16:17:22 +04:00
Ilya Laktyushin
1b2379fe8c New media pasteboard screen 2022-10-25 19:58:51 +03:00
Ilya Laktyushin
2efbb9170f Attachment Menu Improvements 2022-02-15 21:48:46 +03:00
Ilya Laktyushin
95b6b44d0a Attachment menu improvements 2022-02-15 16:01:20 +03:00
Ilya Laktyushin
4309eb36af Various Fixes 2021-11-23 15:12:25 +04:00
Ilya Laktyushin
be6adb3b06 Merge branch 'caption-markdown' 2021-11-18 15:06:04 +04:00
Ali
e4dc869359 Fix media editing crash 2021-10-26 00:36:23 +04:00
Ilya Laktyushin
4a12dcbb22 Initial invite requests implementation 2021-10-06 00:03:40 +04:00
Ilya Laktyushin
b575edfc1d Various Improvements 2021-09-29 08:04:11 +03:00
Ilya Laktyushin
48b6f1bfde Improved caption formatting 2021-09-25 17:19:54 +03:00
Ali
6e5c503338 Refactoring 2021-09-20 14:51:46 +03:00
Ilya Laktyushin
79ecba19b0 Chat-specific theme improvements 2021-09-04 00:39:56 +03:00
Ilya Laktyushin
d423f90681 Implemented chat-specific themes 2021-08-22 18:30:49 +03:00
Ilya Laktyushin
2e989d1369 Various Improvements 2021-08-07 22:55:08 +03:00
Ali
31bc746984 Fix more warnings 2021-08-05 01:42:59 +02:00
Ali
1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali
a5f4d23489 UI combo update 2021-05-07 18:10:31 +04:00
Ali
c07f1f4631 WIP 2021-04-27 18:38:00 +04:00
Ilya Laktyushin
2c404a8b5c Add bio editing and photo setup in voice chats 2021-03-27 10:23:35 +05:00
Ilya Laktyushin
fa125d0192 Various Improvements 2021-01-17 10:18:10 +03:00
Ilya Laktyushin
d91ec1bac7 Various UI fixes 2020-12-15 07:03:26 +04:00
Ilya Laktyushin
f306171529 Various improvements 2020-11-04 21:12:12 +04:00
Ali
9b90e94ab8 Comment updates 2020-09-24 23:23:28 +04:00
Ilya Laktyushin
d584c0317d Allow silent posting in secret chats from media pickers 2020-08-25 14:25:37 +03:00
Ilya Laktyushin
b7ef9fdb3f Various video call UI improvements 2020-08-09 19:54:50 +03:00
Ilya Laktyushin
a182f8094f Video editor fixes 2020-05-28 03:00:28 +03:00
Ilya Laktyushin
ef5756702c Video editor fixes 2020-05-27 22:31:54 +03:00