Commit graph

76 commits

Author SHA1 Message Date
isaac
1d8931b334 Render markdown rich-text preview in send-message context screen
When the user long-presses Send in the main chat and the composed text passes the
same rich-markdown gate used at send time (richMarkdownAttributeIfNeeded), the
send-options preview bubble renders the message as rich InstantPage content,
crossfading from the raw text as the menu animates in. Plain text and custom chat
contents / edit previews are unchanged.

ChatSendMessageActionUI cannot depend on InstantPageUI (it closes a dependency
cycle via LocationUI -> AttachmentUI -> ... -> ChatTextInputActionButtonsNode), so
the rich view is built in TelegramUI (ChatSendMessageRichTextPreview, wrapping
InstantPageV2View + the outgoing message theme) and injected into the screen via a
new ChatSendMessageContextScreenRichTextPreview protocol, mirroring the existing
media-preview pattern. The main-chat send call site classifies the compose text
and injects the preview; MessageItemView lays it out within the send-button-bounded
bubble envelope and crossfades between the raw text and the rich layout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 15:46:16 +02: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
7919556375 Postbox -> TelegramEngine wave 20: shortLivedResourceCachePathPrefix consumer sweep
22 call sites across 16 consumer modules migrated to the wave-19 facade:
  context.account.postbox.mediaBox.shortLivedResourceCachePathPrefix(resource.id)
  ->
  context.engine.resources.shortLivedResourceCachePathPrefix(id: EngineMediaResource.Id(resource.id))

ItemListStickerPackItem additionally drops the wave-18 `let rawResource` intermediate.

Skipped: MediaEditorComposerEntity.swift:245 (uses local `postbox:` init-param,
not `context.account.postbox`; needs its own wave). No modules become Postbox-free
this wave — each still has other Postbox usage.
2026-04-21 02:27:39 +04:00
Isaac
ad85ef6517 Postbox → TelegramEngine refactor: wave 1
Drop direct `import Postbox` from four leaf consumer submodules, routing
data access through TelegramEngine/TelegramCore. Behavior-preserving.

Consumers migrated:
- ChatInterfaceState
- ChatSendMessageActionUI
- ContactListUI
- DrawingUI

TelegramCore additions (typealiases + one EngineData item):
- EngineMemoryBuffer, EnginePostboxDecoder, EnginePostboxEncoder,
  EngineAdaptedPostboxDecoder (narrow utility aliases for coding support)
- EngineData.Item.Configuration.ContactsSettings

Six planned modules were abandoned in wave 1 with reasons recorded in
the plan: ActionSheetPeerItem, ChatListSearchRecentPeersNode,
DirectMediaImageCache, FetchManagerImpl, GalleryData, ICloudResources.
Each either has a public API that leaks `Postbox`/`Account`/`MediaBox`
(banned umbrella-type aliases) or cascades into out-of-wave modules.

CLAUDE.md now records the wave rules, typealias cheat sheet, and the
wave-selection guidance learned from this pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 23:16:45 +02:00
Isaac
f437e0bd04 Text editor 2026-03-24 01:39:53 +08:00
Isaac
c9e07daeda Temp 2026-03-24 00:26:50 +08:00
Isaac
1a17e97a7c Temp 2026-03-23 23:37:31 +08:00
Isaac
2db08cde89 Glass 2026-01-13 19:21:49 +04:00
Isaac
08fae7b3c3 Update 2025-10-02 00:14:52 +08:00
Isaac
948a99a143 Input field 2025-10-01 21:07:04 +08:00
Isaac
d4a4305f5b Various improvements 2025-09-19 15:36:36 +04:00
Ilya Laktyushin
72c58813a8 Various improvements 2025-08-01 23:25:24 +02:00
Isaac
8d65fb3495 Monoforums 2025-05-27 23:37:35 +08:00
Ilya Laktyushin
b8a4748388 Various fixes 2025-05-18 04:32:32 +04:00
Isaac
383ab9e479 Various improvements 2025-03-07 17:52:50 +01:00
Ilya Laktyushin
8d7f9bf372 Various improvements 2025-02-22 19:17:36 +04:00
Isaac
e18795980e [WIP] Chat folder emoji 2024-12-18 23:34:33 +08:00
Ilya Laktyushin
d2deea0ea2 Various fixes 2024-09-03 15:48:15 +04:00
Ilya Laktyushin
f5092b8d8d Web app improvements 2024-07-02 21:03:22 +04:00
Isaac
8af8de7096 Reaction experiments 2024-06-28 19:36:15 +02:00
Isaac
779b583927 Merge commit '7d5d9ba7ba'
# Conflicts:
#	submodules/TelegramUI/Components/Chat/ChatMessageAttachedContentNode/Sources/ChatMessageAttachedContentNode.swift
2024-06-24 18:20:30 +01:00
Isaac
6807abf42c Various improvements 2024-06-24 18:19:53 +01:00
Ilya Laktyushin
813a913bca Various improvements 2024-06-23 19:05:01 +04:00
Isaac
9a075fa39e Refactoring 2024-06-12 23:04:04 +04:00
Isaac
c9fc721c39 Lottie update 2024-06-07 19:35:33 +04:00
Isaac
6ccc9ed693 Remember message effect 2024-06-04 19:16:56 +04:00
Isaac
d6ebf1b4ff Edit message media preview 2024-05-26 20:42:43 +04:00
Isaac
667aa0349a [WIP] Edit message preview 2024-05-26 18:59:44 +04:00
Isaac
fe788ed9ea Message preview and effect improvements 2024-05-21 00:02:55 +04:00
Isaac
7c0216b907 Effect improvements 2024-05-20 18:51:35 +04:00
Isaac
8b20aea99b Lottie 2024-05-18 11:22:53 +04:00
Isaac
5545bdd978 Improvements 2024-05-17 18:12:37 +04:00
Isaac
378b7e8ed5 Message preview improvements 2024-05-17 17:10:19 +04:00
Isaac
5edecdb686 [WIP] Message preview 2024-05-16 23:04:02 +04:00
Isaac
920de21020 Lottie optimization 2024-05-14 22:34:34 +04:00
Isaac
2cf5bd724a Dynamic progress indicator 2024-05-14 16:45:14 +04:00
Isaac
c6ca23181e Send message menu improvements 2024-05-14 16:33:44 +04:00
Isaac
250b5ff2ad Send message context menu improvements 2024-05-14 14:46:29 +04:00
Isaac
304ce900c1 Audio send message preview 2024-05-14 12:36:13 +04:00
Isaac
3da1b96775 [WIP] Video message send context menu 2024-05-13 23:37:30 +04:00
Isaac
8736981248 Message effects improvements 2024-05-13 20:14:15 +04:00
Isaac
7ef63a81df [WIP] Message effects 2024-05-10 20:57:12 +04:00
Isaac
8d0ad2f890 Add lottiecpp caching 2024-05-08 00:24:20 +04:00
Isaac
c752e2d895 LottieCpp improvements 2024-05-07 20:05:50 +04:00
Isaac
0f12dceca7 Fix layout 2024-05-03 23:17:25 +04:00
Isaac
16faaa4575 [WIP] Send message effects 2024-05-03 22:56:50 +04:00
Isaac
e0c2800e8f [WIP] Message context menu 2024-04-30 23:40:55 +04:00
Isaac
efae3b90a7 Support Xcode 15.3 2024-04-02 19:16:00 +04:00
Ilya Laktyushin
c9bffd66f9 Various fixes 2024-03-04 18:41:22 +04:00
Ali
5ab45be3c7 Implement code highlight colors 2023-11-02 20:19:24 +04:00