isaac
35711ec6ad
Localize rich-text message preview labels; split audio into voice/music
...
Thread PresentationStrings through RichText/InstantPageBlock/InstantPage
previewText(), replacing the hardcoded //TODO:localize placeholders
("Photo", "Fx", "Table", "Map", ...) with localized keys and reusing the
existing Message.Photo/Video/Location strings. Add RichTextPreview.Formula
("[formula]"), RichTextPreview.Table ("[table]"), and RichTextPreview.Music
("Music").
The .audio block previously rendered the wrong label (Message.Audio is
"Voice Message"). Thread InstantPage.media down so the block can resolve
media[id] as TelegramMediaFile and split: isVoice -> "Voice Message",
otherwise -> "Music", mirroring MessageContentKind's voice/music handling.
Update both previewText() call sites (MessageContentKind, ChatListItemStrings)
to pass strings, and complete the InstantPageListItem migration that was
left on the old signature.
Also remove the dead streaming-status ("Thinking...") rendering block from
ChatMessageTextBubbleContentNode (guarded by an always-false `!"".isEmpty`)
along with the now-orphaned streamingTextFrame layout machinery it fed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 00:18:24 +02:00
isaac
e8de87dc7b
InstantPage V2: render server-sent thinking blocks
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 18:47:03 +02:00
isaac
562de27c30
InstantPage V2: AI streaming animation for rich-data bubbles
...
Spec, plan, and full implementation of the AI-message streaming
animation in ChatMessageRichDataBubbleContentNode. Extracts
TextRevealController into a shared StreamingTextReveal submodule;
precomputes per-character rects in V2 layout (RTL-safe, glyph-ink
bounds); splits InstantPageV2TextView into render container + render
view with a reveal mask layer; implements mask + snippet pop-in
reveal; adds a per-text-view reveal cost map + applyReveal extension;
switches reveal cost to a width-based unit; sizes / clips the bubble
to the revealed prefix during streaming; aligns the Thinking… header
with TextBubble; floors table cell reveal cost at cell frame width;
includes layout closing pad in revealedContentSize; documents the
non-obvious invariants in CLAUDE.md.
2026-05-20 00:34:07 +08:00
isaac
cea2846249
Reveal pacing: switch to predicted-arrival algorithm
...
Adds the V2 reveal-pacing simulator and switches the live pacing
controller from the EWMA inter-arrival approach to a predicted-arrival
algorithm.
2026-05-20 00:32:08 +08:00
isaac
9e3c16cde5
Live typing draft reveal pacing
...
Smooth-pace reveal of incoming live typing drafts. Adds the design
doc, implementation plan, the EWMA inter-arrival → velocity-smoothed
cursor core, handling for text shrink / item loss, and debug logs.
2026-05-20 00:30:39 +08:00
isaac
05f1f19ab0
Context controller portal-view transition
2026-05-05 20:26:25 +02:00
isaac
4de5eeccd2
Various improvements
2026-05-05 16:53:47 +02:00
isaac
69bfc65da7
Postbox refactor waves 138–276: 168-commit squash
...
Consolidates 137 wave commits + 31 supporting commits (CLAUDE.md bump,
typealias additions, AnyObject→EngineMedia restoration) into one squashed
commit. Migrates dozens of consumer-side public APIs, struct fields,
protocol methods, and enum payloads from Postbox protocols/structs to
TelegramEngine engine wrappers and typealiases. Drops `import Postbox`
from many files. Adds new TelegramCore typealiases and one
TelegramEngineUnauthorized facade.
Notable changes by category:
**TelegramCore typealias additions** (rule 2 — narrow utility typealiases):
- EngineChatListIndex, EngineTempBoxFile, EngineItemCollectionItemIndex,
EngineItemCollectionViewEntryIndex, EngineValueBoxEncryptionParameters,
EngineMessageAndThreadId, EnginePeerStoryStats, EngineMessageHistoryAnchorIndex,
EngineChatListTotalUnreadStateCategory, EngineChatListTotalUnreadStateStats,
EnginePeerSummaryCounterTags, EngineChatListTotalUnreadState,
EngineItemCacheEntryId, EngineHashFunctions,
EngineCachedMediaResourceRepresentationResult,
EngineMediaResourceDataFetchResult, EngineMediaResourceDataFetchError,
EngineMediaResourceStatus, EngineCachedPeerData
**TelegramCore engine extensions/forwarders**:
- EngineMessage.engineMedia, EngineMessage.enginePeers,
EngineMessage.adAttribute, EngineMessage.effectivelyIncoming
- engineFileSize forwarder
- TelegramEngine.Resources.clearCachedMediaResources(mediaResourceIds: Set<EngineMediaResource.Id>)
- TelegramEngine.Resources.fetchStatus(id:resourceSize:)
- TelegramEngineUnauthorized.UnauthorizedResources facade with storeResourceData
**Public API/struct migrations to engine types**:
- ChatAvailableMessageActions.banAuthor/banAuthors → EnginePeer?/[EnginePeer]
- WebSessionsContextState.peers → [EnginePeer.Id: EnginePeer]
- CacheUsageStats.peers → [EnginePeer.Id: EnginePeer]
- PeerCommand.peer → EnginePeer
- PeerInfoControllerMode.calls(messages:) → [EngineMessage]
- CallControllerNodeProtocol.updatePeer → EnginePeer params
- ChatHistoryListNode.messageInCurrentHistoryView (and 4 variants) → EngineMessage?
- ChatHistorySearchContainerNode.messageForGallery → EngineMessage?
- PeerInfoPaneNode.findLoadedMessage / ensureMessageIsVisible /
transitionNodeForGallery → engine-typed
- GalleryHiddenMediaTarget.getTransitionInfo /
GalleryHiddenMediaManager.findTarget → engine-typed
- ChatPanelInterfaceInteraction.presentReactionDeletionOptions /
presentBan*MessageOptions → EnginePeer
- DrawingMessageRenderer.messages → [EngineMessage]
- ChatVideoGalleryItemScrubberView.setFetchStatusSignal →
EngineMediaResource.FetchStatus
- ChannelDiscussionGroupActionSheetItem.peer, VoiceChatPeerEntry.peer,
VoiceChatFullscreenParticipantItem.peer, MediaStreamComponent.chatPeer,
MediaStreamVideoComponent.callPeer, ChatMessageContactBubbleContentNode.contactPeer,
ChatMessageForwardInfoNode.peer, ChatMessageCommentFooterContentNode.replyPeers,
ChatReportPeerTitlePanelNode.peer, ChatMessageActionUrlAuthController.bot,
PeerMediaCollectionInterfaceState.peer, ChatMessageCallBubbleContentNode.peopleAvatars,
ChatLoadingNode.renderedPeer (→ EngineRenderedPeer) — all to engine types
**Wave-71-shadow stored-field migrations** (Postbox Peer/Message → Engine wrapper):
- LegacyCallControllerNode.peer
- CallStatusBarNode.currentPeer
**Dead-code / dead-field removals**:
- CallController.peer, CallControllerNodeV2.account,
ContactMultiselectionController PeerNameIndex fields,
preparedChatListNodeViewTransition account: Account param,
FetchResource.swift entirely (unused function)
**Module-level Postbox import drops**: 30+ files including TelegramRootController,
EditStories, GiftViewScreen, AnimatedStickerUtils, FetchPhotoLibraryImageResource,
PeerInfoGiftsPaneNode, PeerInfoPaneContainerNode, PresentAddMembers,
PeerInfoProfileItems, ChatControllerAdminBanUsers, PresentationData typealiases,
DefaultDayPresentationTheme, ChatListViewTransition, GalleryHiddenMediaManager,
RecentSessionsController, GifContext, AuthorizationSequenceController,
PeerInfoHeaderEditingContentNode, PeerInfoHeaderNode,
PeerAllowedReactionListController, CallControllerNodeV2, and 6 PeerInfo pane files.
**AnyObject restoration**: rule 8 added (never substitute Postbox protocols
with Any/AnyObject) — undid previous AnyObject substitutions in waves 141/143
back to EngineMedia.
Doc maintenance: CLAUDE.md updated to reflect new typealiases and forwarders.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:44:27 +02:00
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
fdb2f369ec
Rich bubble: scrollToAnchor + getAnchorRect
...
Adds a base getAnchorRect on ChatMessageBubbleContentNode, the rich-bubble
override (including titleHeight in details recursion), bubble-item
forwarding to content nodes, ChatControllerInteraction.scrollToMessageIdWithAnchor,
and a scrollToAnchor that lands the anchor at the top of the content area /
its line. Threads anchor/scroll params through ChatController and related
call sites.
2026-05-02 00:36:34 +02:00
isaac
7ef7f16727
Improve animations
2026-04-30 12:56:55 +04:00
isaac
027ac77ad7
Various improvements
2026-04-28 16:58:04 +04:00
isaac
68a95f53f2
Various improvements
2026-04-24 23:21:05 +04:00
isaac
3716f59e7d
Cleanup
2026-04-20 18:55:27 +02:00
Isaac
8edaa79eda
Merge commit ' 23c4d94748'
2026-04-19 23:54:22 +02:00
Isaac
684796144c
TextProcessing: style create/edit/delete, AI previews, and integration
...
Wires up TextProcessingScreen to the edit/delete AI text style facades,
renders AI text style webpage previews in chat bubbles, and exposes a
shared makeEmojiStatusSelectionController on SharedAccountContext so
the screen can present the emoji picker when assigning a style emoji.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:45:18 +02:00
Ilya Laktyushin
1fa0c7991c
Various fixes
2026-04-17 11:06:56 +02:00
Isaac
976c2de599
Temp
2026-04-14 15:33:19 +02:00
Isaac
41d6f727e0
Various improvements
2026-04-10 17:21:36 +02:00
Isaac
648430e37d
Various improvements
2026-04-03 22:15:42 +08:00
Isaac
93bf472472
Text selection
2026-03-24 22:51:44 +08:00
Ilya Laktyushin
dca6b5f145
Various improvements
2026-03-12 13:51:27 +01:00
Ilya Laktyushin
d9d1210c1d
Various improvements
2026-02-19 21:53:26 +04:00
Isaac
26cc304ca0
Fix bg
2026-02-17 10:19:02 +04:00
Ilya Laktyushin
189d25c32e
Update API
2026-02-10 12:58:04 +04:00
Ilya Laktyushin
e81e7c6897
Formatted date support
2026-02-06 14:24:03 +04:00
Ilya Laktyushin
bceed091d8
Fix
2026-01-05 15:49:24 +04:00
Ilya Laktyushin
c654227b83
Various fixes
2026-01-05 15:14:19 +04:00
Ilya Laktyushin
fdc66446ce
Various improvements
2025-12-29 22:42:58 +04:00
Ilya Laktyushin
966182bd2f
Various improvements
2025-12-29 10:05:51 +04:00
Ilya Laktyushin
2edce5ebf2
Alerts
2025-12-22 00:19:11 +04:00
Isaac
7acf2b0b41
Forum improvements
2025-11-11 20:05:29 +08:00
Isaac
06936fa06c
Text input updates
2025-10-03 18:47:47 +08:00
Ilya Laktyushin
a0e96582dd
Update API [skip ci]
2025-09-19 12:20:21 +04:00
Isaac
ee749050f0
Bot forums
2025-08-19 17:24:33 +02:00
Isaac
b625243040
Various improvements
2025-07-29 15:48:11 +02:00
Ilya Laktyushin
9bb46769a3
Various fixes
2025-07-16 17:22:42 +01:00
Ilya Laktyushin
cae2388f95
Various improvements
2025-06-25 12:00:37 +02:00
Ilya Laktyushin
f59abe1689
Various improvements
2025-06-10 22:11:07 +02:00
Isaac
f90402102b
[WIP] Monoforums
2025-05-14 00:50:46 +08:00
Ilya Laktyushin
80cd8f7b32
Various improvements
2025-03-11 06:49:43 +04:00
Isaac
6c4070eb52
Serialization update
2025-02-14 19:11:58 +04:00
Ilya Laktyushin
ab6d94b4eb
Codes improvements
2024-09-21 02:24:36 +04:00
Ilya Laktyushin
941d45ccb8
Various fixes
2024-09-12 15:21:37 +04:00
Ilya Laktyushin
d2deea0ea2
Various fixes
2024-09-03 15:48:15 +04:00
Isaac
bdfe639f3e
Various improvements
2024-08-20 18:16:59 +08:00
Isaac
ea476138b1
Update localization
2024-08-12 11:59:51 +04:00
Isaac
8af8de7096
Reaction experiments
2024-06-28 19:36:15 +02:00
Ilya Laktyushin
a2348148ff
Various improvements
2024-06-18 01:06:31 +04:00
Ilya Laktyushin
5d2377bcb7
Various improvements
2024-06-15 20:34:07 +04:00