Commit graph

33 commits

Author SHA1 Message Date
isaac
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
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
16c630b946 Refactoring 2026-04-03 15:50:39 +08:00
Isaac
b9b38e5fbf Various improvements 2025-10-11 00:56:21 +08:00
Isaac
aaf52d4282 Conference calls 2025-03-30 02:06:50 +04:00
Isaac
3e74304640 [WIP] Conference calls 2025-02-06 21:12:05 +04:00
Isaac
efae3b90a7 Support Xcode 15.3 2024-04-02 19:16:00 +04:00
Isaac
ca426d0f0b Fragment info 2024-03-08 18:43:18 +04:00
Ilya Laktyushin
980a2c47bc Various fixes 2023-02-20 04:30:51 +04:00
Ilya Laktyushin
3d5218b3f6 Various improvements 2022-10-19 00:23:15 +03:00
Ali
5b6e5a7509 [Temp] New input pane 2022-06-19 21:24:54 +01:00
Ali
e8d124c812 Refactoring 2022-05-28 18:26:23 +04:00
Ali
1e16f0a4cc Video streaming improvements 2022-02-28 18:00:26 +04:00
Ali
baec592ca1 Streaming improvements 2022-02-24 01:13:10 +04:00
Ilya Laktyushin
7508fc7290 Various Improvements 2021-10-18 17:50:15 +04:00
Ali
6e5c503338 Refactoring 2021-09-20 14:51:46 +03:00
Ali
648a74003e Refactoring 2021-08-01 18:12:53 +02:00
Ali
1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali
d4572a9248 Refactoring 2021-07-18 01:03:43 +02:00
Ilya Laktyushin
981367c33c Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2021-05-15 16:03:43 +04:00
Ilya Laktyushin
4a89a49d10 Video Chat Improvements 2021-05-15 16:03:32 +04:00
Ali
918b069431 UI bug fixes 2021-05-15 01:20:26 +04:00
Ilya Laktyushin
53da3e1e46 Voice Chat Fixes 2021-04-08 00:29:24 +03:00
Ilya Laktyushin
b9e52f27e3 Voice Chat Scheduling 2021-04-07 04:33:05 +03:00
Ilya Laktyushin
ad8e481d5f Various Fixes 2021-03-22 15:02:13 +05:00
Ilya Laktyushin
666b076867 Various Improvements 2021-03-15 16:14:52 +04:00
Ilya Laktyushin
58f5910af3 Add reconnection with invite hash if voice chat is already opened in listener mode 2021-03-14 19:42:07 +04:00
Ilya Laktyushin
e93d279cc0 Voice Chat Fixes 2021-03-13 16:50:20 +04:00
Ilya Laktyushin
67ac8b10c3 Voice Chat fixes 2021-03-13 03:14:31 +04:00
Ilya Laktyushin
47409b6156 Voice Chat Fixes 2021-03-12 21:34:24 +04:00
Ilya Laktyushin
34f4daf07d Voice Chat Fixes 2021-03-12 20:44:43 +04:00
Ilya Laktyushin
81407fe60b Voice Chat Improvements 2021-03-12 18:51:37 +04:00
Ilya Laktyushin
e2a6a70ea2 Add voice chat invite links support 2021-03-11 16:29:42 +04:00