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 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
isaac and Claude Opus 4.7
493f3103b3
Postbox -> TelegramEngine waves 37-43 + wave 44 design/plan (squashed)
...
Squashes 20 commits — the implementation and outcome commits of
waves 37 through 43 plus wave 44's spec and implementation-plan
docs — into a single commit. Per-wave lessons remain recorded in
docs/superpowers/postbox-refactor-log.md. The unrelated "Add swift
svg" commit is preserved separately outside this squash.
Wave 37 — peerTokenTitle: peer Peer → EnginePeer (1 file)
Wave 38 — canSendMessagesToPeer: peer Peer → EnginePeer (12 files)
Wave 39 — AccountContext.makePeerInfoController: peer Peer → EnginePeer (52 files)
Wave 40 — makeChatQrCodeScreen + makeChatRecentActionsController bundle (8 files)
Wave 41 — RenderedChannelParticipant.peer: Peer → EnginePeer (28 files)
Wave 42 — PeerInfoScreenData.peer: Peer? → EnginePeer? (17 files)
Wave 43 — PeerInfoScreen 6 helpers: peer Peer? → EnginePeer? (12 files)
Wave 44 — RenderedChannelParticipant.peers design doc + implementation plan
(impl and outcome land in subsequent commits, not part of squash)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-24 23:19:43 +04:00
isaac and Claude Opus 4.7
b20cd3502b
Postbox -> TelegramEngine waves 11-14: stateManager collapse + BUILD-dep sweep
...
Wave 11: ActionSheetPeerItem de-Postboxed. Revisits wave-1 abandonment.
`postbox: Postbox, network: Network` init params collapse to
`stateManager: AccountStateManager`; avatar setPeer call routes via
`item.stateManager.postbox` / `.network`. Module never names Postbox.
Sole caller (ShareController.swift:1146) migrated in place.
Wave 12: HorizontalPeerItem de-Postboxed (same pattern). Ripples the
collapse up into ChatListSearchRecentPeersNode's public init
(`postbox:/network:` -> `stateManager:`). That module still imports
Postbox for PostboxViewKey/UnreadMessageCountsView internals but its
public surface simplifies. 3 external caller sites migrated.
Wave 13: AttachmentTextInputPanelNode minor cleanup. Module was already
Postbox-free at source level (wave 6) but carried a dead BUILD dep and
had 2 raw `peerId?.namespace == Namespaces.Peer.SecretChat` checks.
Both now use existing `PeerId.isSecretChat` extension in TelegramCore.
Wave 14: BUILD-dep sweep mirroring wave 6's source sweep. 98 modules
had `//submodules/Postbox:Postbox` (or `//submodules/Postbox`) BUILD
deps despite no source file importing Postbox since wave 6. Single
iteration, zero restores -- Bazel Swift requires source-level `import`
for symbol resolution, so redundant BUILD deps are pure metadata.
Net: 110 files, +116/-149. Build verified green (debug_sim_arm64).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-20 20:26:58 +02:00
Ilya Laktyushin
ae6d05c49d
Various fixes
2026-04-07 06:36:13 +02:00
Ilya Laktyushin
ceceec2e94
Various fixes
2026-03-28 23:42:30 +01:00
Ilya Laktyushin
d9d1210c1d
Various improvements
2026-02-19 21:53:26 +04:00
Ilya Laktyushin
07bddcd6f4
Various fixes
2026-02-03 17:53:48 +04:00
Ilya Laktyushin
14be0239af
Various improvements
2026-02-03 17:33:31 +04:00
Ilya Laktyushin
bbad57434f
Various fixes
2026-02-02 15:54:43 +04:00
Ilya Laktyushin
0d12dd29ad
Various improvements
2026-01-25 22:17:49 +04:00
Isaac
ca6fdc1629
Glass
2026-01-25 00:31:18 +08:00
Mikhail Filimonov
db93244583
update api (rarities, crafted)
2026-01-16 16:20:08 +04:00
Ilya Laktyushin
c654227b83
Various fixes
2026-01-05 15:14:19 +04:00
Ilya Laktyushin
b04fd532da
Various fixes
2025-12-31 16:51:40 +04:00
Ilya Laktyushin
0f53130216
Various improvements
2025-12-25 01:00:37 +04:00
Ilya Laktyushin
f7f3b92fa7
Various improvements
2025-12-23 22:25:44 +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
4c6b273fe1
Merge commit 'ef5b8537e02f66a33dbdace5d5e30f8d69077f5f'
...
# Conflicts:
# submodules/TelegramUI/Components/LiquidLens/Sources/LiquidLensView.swift
# submodules/TelegramUI/Components/TabBarComponent/Sources/TabBarComponent.swift
2025-12-20 03:05:26 +08:00
Isaac
3486393f99
Glass
2025-12-20 03:02:08 +08:00
Ilya Laktyushin
1a1f08de64
Various improvements
2025-12-17 14:31:54 +04:00
Ilya Laktyushin
28d4e1e171
Various improvements
2025-12-16 20:05:44 +04:00
Isaac
3982aa3f9e
Merge commit '10a429b9440b5b052c0ef08c699fb122b4f962f7' into experimental-3
2025-12-10 00:17:02 +08:00
Isaac
0c3530d8a8
Glass
2025-12-10 00:16:36 +08:00
Ilya Laktyushin
95b074de14
Various fixes
2025-12-08 19:08:32 +04:00
Ilya Laktyushin
03afc1343c
Various fixes
2025-12-08 16:23:31 +04:00
Isaac
1ee7268488
Glass
2025-12-06 01:28:06 +08:00
Ilya Laktyushin
06cb1ece50
Various improvements
2025-12-05 18:41:50 +04:00
Ilya Laktyushin
6db5077642
Various fixes
2025-12-05 02:26:17 +04:00
Ilya Laktyushin
2cb0c7f147
Various improvements
2025-12-04 07:56:44 +04:00
Ilya Laktyushin
4660f67271
Update localization
2025-12-03 22:25:26 +04:00
Ilya Laktyushin
6bc1fe1939
Various improvements
2025-12-01 19:54:58 +04:00
Ilya Laktyushin
b04eee8289
Update API [skip ci]
2025-11-27 19:55:24 +04:00
Ilya Laktyushin
b83250ac63
Fix
2025-11-18 22:08:06 +04:00
Ilya Laktyushin
7463fb9eda
Various fixes
2025-11-18 20:44:26 +04:00
Ilya Laktyushin
183bc34f79
Various fixes
2025-11-18 17:13:27 +04:00
Ilya Laktyushin
cbf23d0df5
Various fixes
2025-11-14 02:08:00 +04:00
Ilya Laktyushin
5e17b321f8
Various improvements
2025-11-13 22:06:24 +04:00
Ilya Laktyushin
e9a3e599a1
Various improvements
2025-11-13 15:16:41 +04:00
Ilya Laktyushin
3886b847ae
Various improvements
2025-11-13 08:27:11 +04:00
Ilya Laktyushin
9527b2d8be
Various improvements
2025-11-13 07:18:15 +04:00
Ilya Laktyushin
ea8dc07b23
Update API
2025-11-10 18:58:38 +04:00
Ilya Laktyushin
8897deff91
Various improvements
2025-11-04 01:04:57 +04:00
Ilya Laktyushin
c014d0b333
Various improvements
2025-10-22 21:12:38 +04:00
Isaac
118d475e16
Merge commit 'ee059515d03920e0e6885023b4fec98cb2ab4b9d'
2025-10-21 18:28:48 +04:00
Isaac
e44bd4d858
Story updates
2025-10-21 18:28:45 +04:00
Ilya Laktyushin
35c9a5d279
Various improvements
2025-10-20 00:46:26 +04:00
Ilya Laktyushin
85092482f3
Various improvements
2025-10-17 17:01:25 +04:00