Commit graph

214 commits

Author SHA1 Message Date
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
Ilya Laktyushin
ec8bd9acdd Various improvements 2026-06-04 01:44:36 +02:00
Ilya Laktyushin
91eb779ae2 Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
isaac
55b2b47797 Various improvements 2026-04-28 00:44:54 +04:00
isaac
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
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
isaac
fa68639b25 Postbox -> TelegramEngine wave 26: resourceRangesStatus + removeCachedResources facades + sweep
Adds two TelegramEngine.Resources facades and migrates 4 Shape-A sites across 3 consumer files.
Also imports RangeSet in TelegramEngineResources.swift to disambiguate the RangeSet type from
Swift stdlib's iOS-18-only type.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 04:18:03 +04:00
Ilya Laktyushin
d88a29b378 Various improvements 2026-04-18 08:41:08 +02:00
Isaac
648430e37d Various improvements 2026-04-03 22:15:42 +08:00
Isaac
16c630b946 Refactoring 2026-04-03 15:50:39 +08:00
Isaac
e8510c1a8a Fix search filter display 2026-03-31 23:05:28 +08:00
Isaac
34477605b1 Various improvements 2026-03-31 20:24:24 +08: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
c3c82f4e9b Fixes 2025-12-29 02:20:50 +08:00
Ilya Laktyushin
2bba31bcdf Alerts 2025-12-22 23:28:04 +04:00
Isaac
3486393f99 Glass 2025-12-20 03:02:08 +08:00
Isaac
0c3530d8a8 Glass 2025-12-10 00:16:36 +08:00
Isaac
1ee7268488 Glass 2025-12-06 01:28:06 +08:00
Isaac
cd436e8210 Glass 2025-12-01 22:13:33 +08:00
Isaac
d4a4305f5b Various improvements 2025-09-19 15:36:36 +04:00
Isaac
a25bedd36b Rating 2025-08-05 17:43:59 +02:00
Isaac
179c1341be Various improvements 2025-08-01 21:29:26 +02:00
Isaac
e315e6da6e Global search 2025-07-27 15:01:53 +02:00
Isaac
46dad2eddc WIP 2025-07-25 15:20:36 +02:00
Ilya Laktyushin
b130511450 [WIP] Gift resale 2025-04-12 02:19:32 +04:00
Ilya Laktyushin
f720277d29 Various improvements 2025-03-23 03:56:44 +04:00
Ilya Laktyushin
2454a7a876 Various improvements 2025-03-18 14:39:58 +04:00
Ilya Laktyushin
2f2a27f0d2 Various improvements [skip ci] 2025-02-12 22:15:02 +04:00
Isaac
931e34e1bd Temp 2024-11-27 17:37:21 +04:00
Ilya Laktyushin
1c96740866 Add more mini app open buttons 2024-11-19 20:45:21 +04:00
Ilya Laktyushin
bd1cbdae5a Various improvements 2024-10-29 13:46:22 +04:00
Ilya Laktyushin
ec9d5fde63 Bot ad improvements 2024-10-29 10:05:00 +04:00
Ilya Laktyushin
89e3ae02a2 Various improvements 2024-10-09 00:05:41 +04:00
Ilya Laktyushin
ab6d94b4eb Codes improvements 2024-09-21 02:24:36 +04:00
Isaac
df31800dcd Bot preview improvements 2024-07-25 14:52:20 +08:00
Isaac
9b49738353 Merge commit 'd8d68722ae' 2024-07-19 20:25:36 +08:00
Isaac
c57dfdedc6 Bot previews 2024-07-19 20:25:14 +08:00
Ilya Laktyushin
3a38e70fda Various fixes 2024-07-18 19:39:49 +04:00
Isaac
d15818649b Recent apps 2024-07-16 13:33:46 +08:00
Ilya Laktyushin
5d2377bcb7 Various improvements 2024-06-15 20:34:07 +04:00
Isaac
8736981248 Message effects improvements 2024-05-13 20:14:15 +04:00
Isaac
16faaa4575 [WIP] Send message effects 2024-05-03 22:56:50 +04:00
Ilya Laktyushin
cf49acb4aa Various fixes 2024-04-29 17:45:32 +04:00
Isaac
fa0929ef95 - reaction count limit API
- my profile stories improvements
- recommended channels
2024-04-05 22:51:46 +04:00
Isaac
d4f7440703 Saved message improvements 2024-01-29 21:23:19 +01:00
Isaac
8479dd4a6e Saved messges improvements 2024-01-29 12:12:41 +01:00
Isaac
eeba8a7db1 Privacy settings 2024-01-12 22:42:18 +04:00
Isaac
46f604c98e Fix navigate to saved messages 2024-01-06 01:09:54 +04:00
Isaac
4b16494e20 [WIP] Saved messages 2023-12-28 00:20:23 +04:00