isaac and Claude Opus 4.8
0050cc7a08
Rich-message media in gallery/shared-media/preview pipelines via Message.effectiveMedia
...
Add Message/EngineMessage.effectiveMedia (= message.media when non-empty, else
richText.instantPage.allMedia()) and route the media-consuming sites through it
so a rich message's instant-page media participates in the same pipelines as
normal message.media: shared-media grids/file-rows, search media grid, gallery
open + item nodes + footer, the peer audio/voice playlist, secret-media preview,
resource-by-id resolution, recent downloads, downloaded-media store, delete-time
resource cleanup, cache-usage stats, the in-chat download manager, and the
context-menu / share actions (Save to Camera Roll, copy image, save audio/music
to files). For normal messages effectiveMedia == message.media, so each swap is
behavior-preserving; rich messages render their own bubble via
ChatMessageRichDataBubbleContentNode (not the text/file bubbles), so those paths
are deliberately untouched, as are the forward path (the attribute travels with
the forward) and the markdown-based rich-edit path. First-media scope for now.
See docs/instantpage-richtext.md for the full architecture + invariants.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-04 23:46:56 +02:00
Ilya Laktyushin
3e6363abf9
Various improvements
2026-05-28 16:50:05 +02:00
Ilya Laktyushin
91eb779ae2
Merge commit 'c64653ed37ce9fe2bc74e260e9e960fcf3ab5dc1'
2026-05-14 12:45:26 +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
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
Ilya Laktyushin
f41630083a
Various improvements
2026-04-24 03:16:14 +02:00
Isaac
16c630b946
Refactoring
2026-04-03 15:50:39 +08:00
Isaac
e9f62db2c3
Fix selection
2026-03-25 01:13:19 +08:00
Ilya Laktyushin
8098f24f4e
Various improvements
2026-03-22 16:41:22 +01:00
Ilya Laktyushin
b64d4a23fe
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2026-03-16 13:42:14 +01:00
Ilya Laktyushin
3a311f75bd
Update API
2026-03-16 13:37:36 +01:00
Isaac
f38fa578c6
Fixes
2026-03-13 16:02:19 +01:00
Ilya Laktyushin
dca6b5f145
Various improvements
2026-03-12 13:51:27 +01:00
Ilya Laktyushin
189d25c32e
Update API
2026-02-10 12:58:04 +04:00
Ilya Laktyushin
96bb624b2d
Merge branch 'formatted-date-api'
2026-02-06 14:25:09 +04:00
Isaac
58aab15546
Various improvements
2026-01-30 22:39:20 +08:00
Isaac
962a9ae83a
Various improvements
2026-01-30 22:20:50 +08:00
Isaac
87e914d1d2
Merge commit '90a4dbe855d4d2542a292713ebf919f5846f7705'
2026-01-30 18:50:28 +08:00
Isaac
9c4e390f0d
Various improvements
2026-01-30 18:50:18 +08:00
Ilya Laktyushin
422e3e4e24
Various improvements
2026-01-29 21:37:06 +04:00
Ilya Laktyushin
0d12dd29ad
Various improvements
2026-01-25 22:17:49 +04: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
9cfcc5d8ba
UI improvements
2026-01-06 22:54:01 +08:00
Isaac
3a1d85784e
Various improvements
2026-01-06 21:20:16 +08:00
Isaac
a9cf09a673
Fix gift pane
2026-01-04 10:40:01 +08:00
Isaac
cb7d6f8593
Fix gift pane
2026-01-03 01:05:13 +08:00
Isaac
1c91b37b6f
Merge commit 'eba3c17f696d87f390157334c7caef8dc0d8dafb'
2025-12-30 14:04:36 +08:00
Isaac
8a406c86a5
Update color
2025-12-30 13:58:23 +08:00
Ilya Laktyushin
fdc66446ce
Various improvements
2025-12-29 22:42:58 +04:00
Isaac
c3c82f4e9b
Fixes
2025-12-29 02:20:50 +08:00
Isaac
d2456c2a6b
Merge commit '2e95fa0a0876fdada36155341c15dc349b1bcbd2'
2025-12-28 22:39:38 +08:00
Isaac
05b667797d
Glass
2025-12-28 22:39:34 +08:00
Ilya Laktyushin
54ec998186
Various fixes
2025-12-27 21:50:29 +04:00
Isaac
9d6518a738
Temp fixes
2025-12-27 16:34:51 +08:00
Isaac
f4f3ed1d54
Adjust colors
2025-12-26 22:27:03 +08:00
Ilya Laktyushin
57cdc60862
Cocoon info
2025-12-23 23:54:51 +04:00
Ilya Laktyushin
2bba31bcdf
Alerts
2025-12-22 23:28:04 +04:00
Ilya Laktyushin
59f2f7389a
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2025-12-22 00:48:28 +04:00
Ilya Laktyushin
2edce5ebf2
Alerts
2025-12-22 00:19:11 +04:00
Isaac
3486393f99
Glass
2025-12-20 03:02:08 +08:00
Ilya Laktyushin
0915a42e64
Various improvements
2025-10-16 05:30:06 +04:00
Ilya Laktyushin
6d59a6394a
Various fixes
2025-09-28 03:01:43 +04:00
Ilya Laktyushin
deb549bd95
Hosted gifts
2025-09-26 03:16:01 +04:00
Ilya Laktyushin
a80a706379
Various improvements
2025-09-22 06:42:19 +04:00
Ilya Laktyushin
cb523192d5
Various improvements
2025-09-17 20:58:42 +04:00
Ilya Laktyushin
141e7c1f49
Gift original details removal
2025-09-07 06:49:28 +05:00
Ilya Laktyushin
3c61b4a1e4
Various fixes
2025-09-03 21:44:56 +05:00
Ilya Laktyushin
3f9820f2ef
Various fixes
2025-09-03 21:37:47 +05:00