Commit graph

70 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
2ac8a490b0 Postbox -> TelegramEngine waves 94-102 (squashed)
Adds AccountManagerResources facade in TelegramCore mirroring
TelegramEngine.Resources, drains the entire accountManager-side
mediaBox refactor across consumer modules, and validates the
Shape-C/D handle-migration pattern (account: Account ->
engine: TelegramEngine) on three classes.

Wave 94 (AccountManagerResources facade + 8 sites): new
AccountManagerResources class in TelegramCore with
storeResourceData, completedResourcePath (resource + id overloads),
status (with approximateSynchronousValue), moveResourceData,
fetch. Migrate EditThemeController (5 storeResourceData + 2
completedResourcePath) and WebBrowserSettingsController (1
storeResourceData).

Wave 95 (10 sites): WallpaperUtils.swift sweep, 5 distinct
storeResourceData patterns, replace_all on the two repeated ones.

Wave 96 (7 sites): theme controller triple — TPC (1 store + 2
moveResourceData), TPCN (1 status + 1 fetch + closure type
MediaResourceStatus -> EngineMediaResource.FetchStatus + rename
account local to engine), TAC (1 completedResourcePath + 1 store).

Wave 97 (9 sites): WallpaperGalleryController.swift, 4
completedResourcePath + 5 storeResourceData via replace_all.

Wave 98 (2 files): WallpaperGallery status-type cascade
Promise<MediaResourceStatus> -> Promise<EngineMediaResource.FetchStatus>
across WallpaperGalleryItem.swift + WallpaperGalleryController.swift.
Drops cosmetic `_asStatus()` unwrap.

Wave 99 (2 facade extensions + 7 sites): adds
AccountManagerResources.data() and approximateSynchronousValue
to engine.resources.status(). Migrates OpenResolvedUrl (data +
storeResourceData with .complete -> .isComplete cascade),
SettingsThemeWallpaperNode (paired engine + accountManager
status), WallpaperUploadManager, OpenChatMessage,
LiveChatReactionStreamView.

Wave 100 (Shape-C/D, free function): legacyWebSearchItem
account: Account -> engine: TelegramEngine. 4 files.

Wave 101 (Shape-C/D, small class): VerticalListContextResults
ChatInputPanelItem stored field migration. 2 files. Drops
`|> map(EngineMediaResource.FetchStatus.init)` redundancy.

Wave 102 (Shape-C/D, medium class with weak-context retention):
SharedMediaPlayer account: Account -> engine: TelegramEngine.
Engine field is intentionally a strong handle since the class
stores context as `weak var`. 2 files.

After this squash the accountManager-side mediaBox refactor is
essentially complete; only Postbox-protocol-blocked
cachedResourceRepresentation triple remains as the foundational
deferred item.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:46:44 +04:00
isaac
4879d89a92 Postbox -> TelegramEngine wave 22: storeResourceData facade + consumer sweep
Same shape as wave 21. Adds TelegramEngine.Resources.storeResourceData(id:, data:, synchronous:)
and sweeps 46 context.account.postbox.mediaBox.storeResourceData sites across 17 files.

The range-store overload and accountManager.mediaBox sites are explicitly out of scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 03:51:11 +04:00
Isaac
16c630b946 Refactoring 2026-04-03 15:50:39 +08:00
Isaac
0055396d4d Update 2025-11-26 23:05:30 +08:00
Isaac
40828e9037 [WIP] UI 2025-01-21 21:08:44 +04:00
Ilya Laktyushin
ff09220634 Recent Actions improvements 2024-04-17 21:04:14 +04:00
Ilya Laktyushin
8ac9121c5e Stories improvements 2023-06-27 20:53:24 +02:00
Ilya Laktyushin
4b6f32fc17 Chat wallpaper improvements 2023-04-10 18:54:40 +04:00
Ilya Laktyushin
641d4b9ca0 Various Fixes 2021-10-28 20:49:51 +04:00
Ilya Laktyushin
f5a9ee101a Fix theme setup from grid 2021-10-18 18:04:55 +04:00
Ilya Laktyushin
7508fc7290 Various Improvements 2021-10-18 17:50:15 +04:00
Ali
1141e09c1b Refactoring 2021-09-07 13:09:06 +04:00
Ali
ac08707f6b Improved streaming 2021-08-17 21:21:45 +02:00
Ali
0a9be38425 Fix more warnings 2021-08-05 12:37:57 +02:00
Ali
1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali
918b069431 UI bug fixes 2021-05-15 01:20:26 +04:00
Ali
60d959bff8 Refactoring 2021-04-18 03:10:18 +04:00
Ilya Laktyushin
d59f695e6f Search filters improvements 2020-09-21 20:54:32 +03:00
Ali
c8d87f8998 Poll and sticker improvements 2020-04-16 01:44:57 +04:00
Ilya Laktyushin
bae930ec20 Various UI improvements 2020-01-08 00:17:55 +03:00
Ilya Laktyushin
5d5636885a Theme fixes 2019-12-28 11:45:59 +03:00
Ilya Laktyushin
56f5299cc9 Theme fixes 2019-12-28 02:30:49 +03:00
Ilya Laktyushin
7aa978e827 Theme fixes 2019-12-27 18:19:28 +03:00
Ilya Laktyushin
533257976b Theme fixes 2019-12-27 01:38:30 +03:00
Ilya Laktyushin
240d93c157 Theme fixes 2019-12-26 22:10:16 +03:00
Ilya Laktyushin
f13301f7d0 Theme file reference invalidation 2019-12-25 13:16:21 +03:00
Ilya Laktyushin
e27d764dae Update themes 2019-12-24 23:03:40 +03:00
Ilya Laktyushin
efacf13a9e Update themes 2019-12-23 15:13:21 +03:00
Ilya Laktyushin
8c525b16a4 Theme preview fixes 2019-12-18 23:36:08 +04:00
Ilya Laktyushin
fa3303be90 Theming improvements 2019-12-18 09:43:40 +04:00
Ilya Laktyushin
e19439a33e Various theme improvements 2019-12-14 03:32:42 +04:00
Ilya Laktyushin
97fc8311e5 Theme editing fixes 2019-12-09 17:06:50 +04:00
Ilya Laktyushin
60df3014fa Improve theme color customization 2019-12-06 19:38:01 +04:00
Ali
b35f84e794 Merge commit 'bab231a71f' 2019-11-19 23:30:10 +04:00
Ali
eaa8bcb08e Support Dynamic Type 2019-11-19 23:28:36 +04:00
Ilya Laktyushin
2b4ade57fb Various theme colors fixes 2019-11-19 05:25:56 +04:00
Ilya Laktyushin
98a72955f5 Finalize theme color selection UI 2019-11-17 22:23:26 +04:00
Ilya Laktyushin
78a09a38b3 Add support for gradient wallpapers
Implement new colors selection UI
2019-11-16 08:31:47 +04:00
Peter
10692a323e Refactor SyncCore 2019-10-21 16:58:00 +04:00
Peter
5fed1fbeb1 Temp 2019-10-07 17:03:41 +04:00
Ilya Laktyushin
c73cfb3a3a Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2019-09-14 02:05:19 +03:00
Peter
538e3dbe70 Upgraded navigation 2019-09-14 00:13:50 +04:00
Ilya Laktyushin
9e7107ef4e Merge commit 'c2f53ea3a4' 2019-09-11 10:59:57 +03:00
Ilya Laktyushin
5ade4ad7ec Various UI improvements 2019-09-11 10:25:15 +03:00
Ilya Laktyushin
610f3ffbe7 Fixed typo 2019-09-09 11:33:53 +03:00
Peter
c5693f06b3 Context menu improvements 2019-09-06 23:24:53 +04:00
Peter
c6c09e6c92 Merge commit 'e99a9e8d99' into buck-test 2019-09-05 02:51:35 +04:00
Ilya Laktyushin
c73a96845e UI Fixes 2019-09-03 23:50:17 +03:00
Ilya Laktyushin
0f15c05c1a Fix build 2019-09-03 23:20:20 +03:00