Ilya Laktyushin
3e6363abf9
Various improvements
2026-05-28 16:50:05 +02:00
isaac and Claude 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
isaac and Claude Opus 4.7
86d1456552
Postbox -> TelegramEngine waves 107-137 (squashed)
...
31 waves of consumer-side migration from `import Postbox` to TelegramEngine
typealiases. Net: 173 import drops + 39 BUILD-dep drops + 1 new typealias
(`EngineStoryId = StoryId`, wave 113).
Wave shapes used:
- Orphan-import sweeps (107, 108, 128): drop `import Postbox` from files
whose only Postbox-symbol reference was the import line itself, then
resolve build failures. Methodology requires token-level (`grep -oE`)
filtering, not line-level, to avoid masking real Postbox usage on lines
that also contain `Namespaces.X` references.
- Identifier-swap mini-waves (109-127, 129-134, 136-137): rename
Postbox-typealiased identifiers to engine equivalents
(PeerId -> EnginePeer.Id, MessageId -> EngineMessage.Id,
MediaId -> EngineMedia.Id, MessageIndex -> EngineMessage.Index,
StoryId -> EngineStoryId, ItemCollectionId -> EngineItemCollectionId,
PreferencesEntry -> EnginePreferencesEntry,
FetchResourceSourceType/Error -> EngineFetchResourceSourceType/Error,
MemoryBuffer -> EngineMemoryBuffer, MessageTags -> EngineMessage.Tags,
MessageAttribute -> EngineMessage.Attribute,
TempBox -> EngineTempBox).
- Asset-string FP-only orphans (124).
- Typealias addition + drain (113): added `EngineStoryId` typealias to
TelegramCore, then drained 3+11 consumer sites.
Hard blockers identified during these waves (must restore `import Postbox`
when present): MediaResource[A-Za-z]* (any suffix -- the literal
`MediaResource` matches don't catch MediaResourceData/MediaResourceId/etc.),
Postbox/MediaBox/MediaResource raw types, PostboxCoding/PostboxEncoder/
PostboxDecoder, TempBoxFile, ValueBoxKey, PostboxView, combinedView,
HashFunctions, postboxLog, openPostbox, declareEncodable, PeerView,
MessageHistoryView, MessageHistoryThreadData, CachedPeerData, RenderedPeer,
SelectivePrivacyPeer, SimpleDictionary, ItemCollectionInfosView,
ItemCollectionItem, ItemCollectionItemIndex, ItemCollectionViewEntryIndex,
ChatListIndex, ChatListEntrySummaryComponents, CodableEntry,
MessageHistoryThread, MessageHistoryAnchorIndex,
MessageHistoryEntryLocation, PeerStoryStats, PeerNameIndex,
PeerSummaryCounterTags, ChatListTotalUnreadStateCategory/Stats,
arePeersEqual. Protocol-shape blockers: bare `Peer`/`Message`/`Media`
in function signatures, generic args, enum-case payloads, or dict value
types (e.g., `[PeerId: Peer]`, `case messages([Message])`,
`Signal<(Peer?, ...), NoError>`).
`replace_all PeerId -> EnginePeer.Id` is dangerous: mangles compound
names like `failedPeerId`, `ContactListPeerId`, `nextRemoteMediaId`,
`replyToMessageId`. Pre-flight grep `\b[a-z][a-zA-Z]*PeerId\b` and only
replace_all if 0 matches.
Also removes unneeded design/plan docs from a separate (link-highlighting)
feature branch:
- docs/superpowers/plans/2026-05-02-link-highlighting-modern-path-fixes.md
- docs/superpowers/specs/2026-05-02-link-highlighting-modern-path-fixes-design.md
Squashed commits: 6d82c2980d..e6de5d53a3 (59 commits, including
per-wave content commits and per-wave CLAUDE.md bumps).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-03 10:28:50 +02:00
Isaac and Claude Opus 4.7
7b2b74e79b
Postbox -> TelegramEngine wave 6: unused import Postbox batch sweep
...
First build-verified unused-import sweep: speculatively dropped
import Postbox from 782 consumer files (plain ^import Postbox$ lines,
excluding TelegramCore/Postbox/TelegramApi paths), iterated 18 full
project builds with --continueOnError, restored the import on every
file that failed to compile. 183 drops survived; 189 consumer modules
newly Postbox-free.
Bundled: spec + plan + C1 atomic batch drop + C2 CLAUDE.md outcome and
permanent methodology guidance under Wave-selection. The methodology
subsection captures the reusable playbook (--continueOnError is
essential, dependency graphs are deep so expect many iterations,
pattern-based preemptive restores accelerate convergence, and
CLAUDE.md's engine typealias cheat sheet arrows are migration targets
rather than typealiases in TelegramCore).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-19 23:46:13 +02:00
Ilya Laktyushin
ed55943a44
Various improvements
2026-03-27 01:13:38 +01:00
Ilya Laktyushin
dca6b5f145
Various improvements
2026-03-12 13:51:27 +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
b47660b22c
Various fixes
2026-02-06 19:35:09 +04:00
Isaac
45b1306274
Various improvements
2026-02-06 15:18:17 +04:00
Ilya Laktyushin
c5a0ad267c
Various improvements
2026-02-04 16:36:09 +04:00
Ilya Laktyushin
b3aef93435
Various improvements
2026-02-03 21:58:41 +04:00
Ilya Laktyushin
cbe98a3fc6
Various improvements
2026-01-31 07:08:06 +04:00
Ilya Laktyushin
75627b036a
Various improvements
2026-01-30 18:55:05 +04:00
Ilya Laktyushin
142d59cf8f
Various improvements
2026-01-27 22:24:31 +04:00
Ilya Laktyushin
0d12dd29ad
Various improvements
2026-01-25 22:17:49 +04:00
Isaac
ca6fdc1629
Glass
2026-01-25 00:31:18 +08:00
Isaac
2fdec84b46
Merge commit 'db93244583238a00195e49af1504560358738476'
2026-01-16 21:23:35 +08:00
Isaac
6558d2e265
Various improvements
2026-01-16 21:23:32 +08:00
Mikhail Filimonov
db93244583
update api (rarities, crafted)
2026-01-16 16:20:08 +04:00
Isaac
2db08cde89
Glass
2026-01-13 19:21:49 +04:00
Isaac
bae3a1234b
Update
2025-12-30 00:38:32 +08:00
Isaac
4a13c3830a
Glass
2025-12-26 20:29:30 +08:00
Isaac
3486393f99
Glass
2025-12-20 03:02:08 +08:00
Ilya Laktyushin
b04eee8289
Update API [skip ci]
2025-11-27 19:55:24 +04:00
Ilya Laktyushin
a80a706379
Various improvements
2025-09-22 06:42:19 +04:00
Ilya Laktyushin
975430aa85
Various fixes
2025-09-01 00:15:29 +04:00
Ilya Laktyushin
aa244fbcce
Various improvements
2025-07-28 02:08:28 +02:00
Ilya Laktyushin
f3a27124d7
Various improvements
2025-07-27 03:04:03 +02:00
Ilya Laktyushin
6617a0c45f
Update API
2025-07-24 13:15:15 +02:00
Ilya Laktyushin
6d2757eb91
Various fixes
2025-07-09 00:43:23 +02:00
Isaac
c7a2fe5d3e
Update to iOS 13
2025-06-11 16:59:53 +08:00
Ilya Laktyushin
ff29e58d4b
Various improvements
2025-05-24 16:38:39 +02:00
Ilya Laktyushin
cfbee4943d
Gift store animations
2025-05-22 21:19:50 +02:00
Ilya Laktyushin
0b448bf68f
Various fixes
2025-05-13 13:41:41 +04:00
Ilya Laktyushin
a523f70a14
Various fixes
2025-05-07 17:14:29 +04:00
Ilya Laktyushin
641310f4a8
Various fixes
2025-05-07 16:46:41 +04:00
Ilya Laktyushin
064024514c
Various fixes
2025-05-07 16:01:08 +04:00
Ilya Laktyushin
6e00be4796
Various fixes
2025-05-07 15:56:38 +04:00
Ilya Laktyushin
3865e253ff
Various fixes
2025-05-06 02:09:44 +04:00
Ilya Laktyushin
ee38ee55d4
Various fixes
2025-05-05 18:42:51 +04:00
Ilya Laktyushin
c04e8f3c11
Various fixes
2025-05-03 05:54:09 +04:00
Ilya Laktyushin
60aef02fa5
Fix build
2025-05-02 18:50:50 +04:00
Ilya Laktyushin
fe2cc49a55
Various fixes
2025-05-02 18:31:42 +04:00
Ilya Laktyushin
874fac0c63
Various fixes
2025-05-01 20:38:45 +04:00
Ilya Laktyushin
9e0600edfa
Various fixes
2025-04-25 18:13:30 +04:00
Ilya Laktyushin
c4731d8b8d
Various improvements
2025-04-24 21:12:40 +04:00
Ilya Laktyushin
2962851527
Various improvements
2025-04-22 21:06:46 +04:00
Ilya Laktyushin
a8c7b217a4
Various improvements
2025-04-21 17:02:37 +04:00