73 Commits
Author SHA1 Message Date
Ilya Laktyushin 91eb779ae2 Merge commit 'c64653ed37ce9fe2bc74e260e9e960fcf3ab5dc1' 2026-05-14 12:45:26 +02:00
isaacandClaude 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
isaacandClaude Opus 4.7 7ccb382f53 Postbox -> TelegramEngine waves 103-105 (squashed)
Wave 103 (original): ChatRecentActionsControllerNode.peer Peer ->
EnginePeer migration ABANDONED after pre-flight discovered a 75-site
ADD-bridge cascade through chatRecentActionsHistoryPreparedTransition
into Message.peers SimpleDictionary<PeerId, Peer> store sites.
Lessons captured in docs/superpowers/postbox-refactor-log.md "Wave 103
ABANDONED" section + ~/.claude/projects/-Users-isaac-build-telegram
-telegram-ios/memory/feedback_wave71_shadow_risk.md (4-layer pre-flight
checklist for stored-Peer-field migrations).

Wave 103 (retry, 92230b0691): drained 5 accountManager.mediaBox
.storeResourceData Shape-A sites against the wave-94 facade. 2 files /
3 Edit calls (1 single + 2 replace_all) / 1-iter / 29.5s build. Closes
the storeResourceData accountManager-side drain entirely.

Wave 104 (08fc3f721e): drained 3 of 8 accountManager.mediaBox.resourceData
Shape-A sites against the wave-32/wave-94 AccountManagerResources.data
(resource:) facade + 3 consumer-side .complete -> .isComplete renames
(EngineMediaResource.ResourceData field rename). 1 file / 6 Edit calls
/ 1-iter / 11.7s build. 5 of 8 candidates deferred behind Postbox-typed
-function-parameter barriers (fetchCachedScaled*Representation cascade,
combineLatest typed-tuple coupling). Established the "Postbox-typed
-function-parameter barrier registry" pattern.

Wave 105 (0c76724409): DeviceContactInfoSubject enum 3 case Peer?
payloads + 2 callback signatures + 1 computed property migrate to
EnginePeer?. 5 files / 17 edits / 1-iter / 203s build (foundational
AccountContext touch). Net wrap delta -8 (10 drops, 2 ADD bridges, 1
downcast->case-let). First wave-71-shadow-style migration after the
wave-103 abandonment forced a discipline reset; first-pass-clean via
thorough pre-flight inventory (~15 min).

Net session progress: -16 wraps across 4 wave attempts plus durable
scaffolding (feedback memory, barrier registry, 4-layer pre-flight
checklist).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 16:57:55 +04:00
isaacandClaude Opus 4.7 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
isaacandClaude Opus 4.7 9b06909edd Postbox -> TelegramEngine wave 17: ItemListAvatarAndNameInfoItem stateManager: collapse
Applies the wave-11/12/15 collapse pattern to ItemListAvatarAndNameInfoItem.
ItemContext.other payload changes from (accountPeerId:, postbox: Postbox,
network: Network) to (accountPeerId:, stateManager: AccountStateManager).
Internal AvatarNode.setPeer forward rewires through stateManager.postbox /
.network. Module drops import Postbox (source) and //submodules/Postbox:Postbox
(BUILD). Sole external caller — DeviceContactInfoController.swift:413 at the
Share-Extension boundary — migrated atomically.

Handle choice is stateManager: (not engine:) because the sole caller fires
specifically when the context is not a ShareControllerAppAccountContext;
ShareControllerAccountContext protocol exposes stateManager: AccountStateManager
but not engine: TelegramEngine, and no full TelegramEngine is constructible in
the Share Extension (no Account). Per feedback_postbox_refactor_handle.md and
the wave-15 precedent.

Pre-flight public-Postbox-type inventory grep (per CLAUDE.md's Wave-selection
guidance) returned only Postbox itself — no hidden leaks like wave 16's
EngineMessageHistoryThread / PeerStoryStats surprises.

Module fully Postbox-free after this wave. Running tally updated in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 21:46:02 +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
Ilya Laktyushin ee059515d0 Fix build 2025-10-20 23:15:12 +04:00
Ilya Laktyushin 0915a42e64 Various improvements 2025-10-16 05:30:06 +04:00
Ilya Laktyushin 4f42e41180 Update API [skip ci] 2025-02-21 17:23:25 +04:00
Ilya Laktyushin d167aa4b0e Update API [skip ci] 2025-02-18 10:09:58 +04:00
Ilya Laktyushin 6e850130fd Update API [skip ci] 2024-12-26 07:27:14 +04:00
Ilya Laktyushin dce651616e Update API [skip ci] 2024-12-18 21:40:23 +04:00
Isaac a4b4bb5a82 [WIP] Bot previews 2024-07-16 19:12:26 +08:00
Ilya Laktyushin 097eacdc34 Various improvements 2024-05-25 02:29:19 +04:00
Isaac 378b7e8ed5 Message preview improvements 2024-05-17 17:10:19 +04:00
Ilya Laktyushin 6de753b14a Phone numbers improvements 2024-05-16 00:50:11 +04:00
Isaac 8446fd3ab1 Business fixes 2024-02-28 19:22:43 +04:00
Isaac 66b3d8b874 [WIP] Colored profiles 2023-11-22 01:05:47 +04:00
Ali 99047a4de4 Context menu pagination 2023-10-24 12:59:28 +04:00
Ilya Laktyushin 137c3d9101 Update API 2023-10-16 13:20:46 +04:00
Ali af19d3f4b5 [WIP] Stories 2023-06-06 23:23:48 +04:00
Ali 95947fdb99 Refactoring [skip ci] 2023-04-20 18:43:29 +04:00
Ali 6a548e11a6 Refactoring [skip ci] 2023-04-19 23:47:38 +04:00
Ilya Laktyushin 05a3fa5bad Chat wallpaper improvements 2023-04-05 16:07:16 +04:00
Ilya Laktyushin 4509384a6c Avatar gallery in shared contact 2022-12-19 19:20:06 +04:00
Ali 93a7f7ece8 [WIP] Topics 2022-10-23 18:03:26 +04:00
Ilya Laktyushin 9f0dc8c1d8 Update API [skip ci] 2022-10-03 16:45:43 +03:00
Ali a14cd136c3 Bump min iOS version to 11.0 2022-09-17 01:08:04 +04:00
Ali feb899920c [WIP ]Emoji statuses 2022-08-09 22:58:03 +04:00
Ali e8d124c812 Refactoring 2022-05-28 18:26:23 +04:00
Ali a9c595a640 Another feed experiment 2022-03-18 22:55:06 +04:00
Ilya Laktyushin ec8702ed07 Attachment menu improvements 2022-02-26 17:48:25 +04:00
Ilya Laktyushin 3ddf3518c5 Attach menu improvements 2022-02-22 18:02:14 +03:00
Ali 00b6826303 Refactoring [skip ci] 2021-09-24 22:56:48 +03:00
Ali 49279a33f0 Refactoring 2021-09-23 19:57:25 +03:00
Ali 6e5c503338 Refactoring 2021-09-20 14:51:46 +03:00
Ilya Laktyushin cb93fdbc08 Merge branches 'master' and 'master' of gitlab.com:peter-iakovlev/telegram-ios 2021-09-04 00:40:15 +03:00
Ilya Laktyushin 79ecba19b0 Chat-specific theme improvements 2021-09-04 00:39:56 +03:00
Ali d6446a284b Merge branch 'master' into experimental-2 2021-08-05 01:44:20 +02:00
Ali 31bc746984 Fix more warnings 2021-08-05 01:42:59 +02:00
Ali 7c8ad70014 Merge branch 'master' into experimental-2 2021-07-21 22:04:58 +02:00
Ali 1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali 7bed1728bb Refactor string generation 2021-07-20 11:57:50 +02:00
Ali ee8ec6ed30 Merge branch 'master' into features/64-bit 2021-07-07 02:08:56 +04:00
Ali 9134bae908 Refactoring 2021-07-07 01:59:12 +04:00
Ali a23971c0ef Initial 64-bit id support 2021-06-28 20:02:50 +04:00
Ali 0c64f1a52e Fix contact with empty name presentation 2021-04-18 20:58:35 +04:00
Ali 4dae31e340 Initial peer id refactoring 2021-03-24 19:35:52 +04:00
Ilya Laktyushin 498dd0bbec Various Improvements 2021-03-20 16:13:57 +05:00