Commit graph

429 commits

Author SHA1 Message Date
83f209e44a chore: bump version to 1.2 2026-06-30 15:01:22 +03:00
PAVEL IVANOV
f6bb33d193 chore: prepare wintergram 1.1 release 2026-06-15 21:46:25 -07:00
isaac
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
isaac
bd8886b0f0 Merge commit '4b2a826682' 2026-05-29 15:47:41 +02:00
isaac
471d11df16 Copy rich messages as markdown (whole message + partial selection)
Rich messages (RichTextMessageAttribute, text == "") are copyable as
markdown two ways: the context-menu Copy action copies the whole
message, and a text selection inside the rich-data bubble copies just
the selected range. Both reconstruct markdown mirroring the edit
round-trip (markdownStringFromInstantPage).

Implements the full RichText entity case set
(mention/hashtag/cashtag/bot-command/bank-card/auto url/email/phone) with
tap interaction, the InstantPage -> markdown inverse converter and edit
round-trip, markdown-context stamping during V2 layout
(InstantPageMarkdownBlockContext: heading level, list/code/table/quote
depth), partial-selection markdown emission
(InstantPageMultiTextAdapter.markdownForRange), and numerous converter
edge-case fixes (tables, links, fenced code, blockquote line coalescing,
compact nested >> markers).

CLAUDE.md documents the feature; the spec/plan scratch docs generated
during development are not committed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:52:47 +02:00
Ilya Laktyushin
3e6363abf9 Various improvements 2026-05-28 16:50:05 +02:00
Ilya Laktyushin
91eb779ae2 Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
isaac
4107263747 Postbox refactor waves 358-426
Squashed range bf01b4c..a66739c (70 commits) covering 69 waves of the
Postbox -> TelegramEngine consumer migration plus a few BUILD-dep
followups.

Notable additions to TelegramCore in this range:
- Engine typealiases: EngineRawPeerPresence, EngineRawValueBoxKey,
  EngineSimpleDictionary, EngineRawPeerView, EngineRawPostboxViewKey,
  EngineRawPreferencesView, EngineRawMessageHistoryView (+ entry/attrs/
  read-state), EngineMessageIdNamespaces, EngineHistoryViewInputAnchor,
  EngineRawUnreadMessageCountsItem, EngineRawMessageHistorySavedMessages
  IndexView, EngineRawChatInterfaceStateView, EngineRawOrderedItemList
  View, EngineRawMessageHistoryThreadIndexView, EngineRawCombinedRead
  StateView, EngineRawMessageHistoryThreadInfoView, EngineRawBasicPeer
  View, EngineRawCachedPeerDataView, EngineMessageHistoryThreadData,
  EngineViewUpdateType, EngineInitialMessageHistoryData,
  EnginePeerGroupId, EngineChatLocationInput, EngineHistoryViewInputTag.
- Engine data items: Peer.CachedData, ItemCollections.InstalledPackInfos,
  ItemCollections.InstalledPackIds.
- Engine facade: TelegramEngine.ItemCollections.allItems(namespace:).
- Free function: engineAreMediaArraysEqual forwarder.

Net effect: 65+ consumer modules drop "import Postbox"; 131 files
changed (+1386 / -1493). Build green at HEAD.
2026-05-07 07:36:30 +02:00
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
Ilya Laktyushin
5d7edcf36f Various fixes 2026-04-29 04:35:17 +02:00
Ilya Laktyushin
73d25e7be3 Various improvements 2026-04-28 14:31:17 +02:00
isaac
1b85d8ccb0 Postbox -> TelegramEngine wave 106 (pivot: engine data() incremental facade + 1-site drain)
Original wave 106 pure import-drop sweep abandoned: 576 candidate files
all genuinely reference Postbox-tier tokens; wave 93's pattern exhausted
at file granularity (no single-file orphans remain).

Pivot: extend engine.resources.data(resource:) facade with
`incremental: Bool = false` parameter (wires to ResourceDataRequestOption).
Drain the 1 live consumer site (ChatInterfaceStateContextMenus:1327)
plus consumer-side `data.complete` -> `data.isComplete` rename.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 22:49:53 +04:00
Ilya Laktyushin
6b78a35695 Various fixes 2026-04-25 19:53:39 +02:00
isaac
f5cb1391aa Merge commit '96b1432434' 2026-04-24 11:24:47 +04: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
Ilya Laktyushin
dbd40fe7d3 Various improvements 2026-04-22 23:03:51 +02:00
isaac
524c29cbe3 Various improvements 2026-04-22 00:32:34 +04: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
0df319742a Update API 2026-04-16 01:18:22 +02:00
Ilya Laktyushin
efb1110987 Fix build 2026-04-16 00:20:06 +02:00
Ilya Laktyushin
8f1e024aef Various fixes 2026-04-15 23:12:53 +02:00
Isaac
d575824ab4 Various improvements 2026-04-10 14:30:23 +02:00
Ilya Laktyushin
cbc5a49507 [WIP] Polls 2026-03-13 11:04:33 +01:00
Ilya Laktyushin
dca6b5f145 Various improvements 2026-03-12 13:51:27 +01:00
Ilya Laktyushin
e3c84fce71 Various fixes 2026-02-27 14:34:18 +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
Ilya Laktyushin
15ca7254fb Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-01-27 22:24:42 +04:00
Ilya Laktyushin
142d59cf8f Various improvements 2026-01-27 22:24:31 +04:00
Isaac
ba1068a5ea Fix delete context item 2026-01-27 21:50:59 +08:00
Isaac
bc6b472960 Temp glass UI 2026-01-20 22:30:38 +08:00
Isaac
0638c08b75 Merge commit '823cd9993f' 2026-01-20 21:35:12 +08:00
Isaac
4f04dc0bb7 Glass 2026-01-20 21:35:04 +08:00
Ilya Laktyushin
ea9d8db1d3 Update API [skip ci] 2026-01-20 14:54:15 +04:00
Isaac
76c3cb47c3 Merge branch 'temp-12' 2026-01-11 21:02:28 +04:00
Isaac
0f5a019f04 Glass updates 2026-01-11 21:01:45 +04:00
Ilya Laktyushin
d70b31f8bc Fix build 2026-01-08 19:21:29 +04:00
Ilya Laktyushin
7cd159bda4 Various fixes 2025-12-30 23:41:35 +04:00
Ilya Laktyushin
2edce5ebf2 Alerts 2025-12-22 00:19:11 +04:00
Ilya Laktyushin
b04eee8289 Update API [skip ci] 2025-11-27 19:55:24 +04:00
Ilya Laktyushin
c014d0b333 Various improvements 2025-10-22 21:12:38 +04:00
Ilya Laktyushin
737f84bb13 Various fixes 2025-09-25 21:47:46 +04:00
Ilya Laktyushin
76e8d79f9f Update API 2025-09-06 13:35:19 +05:00
Ilya Laktyushin
a3f9ba1fe0 Update API [skip ci] 2025-08-08 11:03:43 +04:00
Ilya Laktyushin
b4832ff856 Update API 2025-07-14 12:50:11 +01:00
Isaac
adbc7bad61 Various improvements 2025-07-01 14:57:33 +02:00
Isaac
3ed857bfc3 Various improvements 2025-06-29 18:15:50 +02:00
Isaac
10c28d982e Various improvements 2025-06-27 12:45:19 +02:00
Ilya Laktyushin
3b46e1d3d0 Various fixes 2025-06-26 14:09:26 +02:00
Isaac
484c350538 Various improvements 2025-06-24 17:27:17 +02:00