Commit graph

56 commits

Author SHA1 Message Date
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
55619c54f9 Fix crash 2026-05-28 19:31:09 +02:00
isaac
a9f8b0d067 Make rich messages editable via InstantPage↔markdown round-trip
Reconstruct markdown source from a stored InstantPage to populate the edit
field, then re-classify on save (the inverse of the send path). Adds the
InstantPageToMarkdown converter, edit-field population and save-time
re-classification in ChatControllerLoadDisplayNode, and a shared InstantPage
previewText surfaced through MessageContentKind for reply/pinned/forward
previews. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 23:10:48 +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
Ilya Laktyushin
ed55943a44 Various improvements 2026-03-27 01:13:38 +01:00
Ilya Laktyushin
77cc01f0d9 Various fixes 2026-03-26 13:58:50 +01:00
Ilya Laktyushin
67f45ba06d Various improvements 2026-03-24 06:54:30 +01:00
Ilya Laktyushin
66d08c0e1b Various improvements 2026-03-22 13:44:04 +01:00
Ilya Laktyushin
d7634beb50 Various fixes 2025-06-09 20:46:26 +02:00
Isaac
923587b0da [WIP] Dynamic video streaming 2024-09-18 01:04:29 +08:00
Ilya Laktyushin
3e448e833e Story covers 2024-07-19 17:43:17 +04:00
Ilya Laktyushin
86b58a67b8 Paid media improvements 2024-06-22 00:55:35 +04:00
Ilya Laktyushin
40a4183095 Paid media content 2024-06-18 18:57:32 +04:00
Ilya Laktyushin
59c65198de Various fixes 2024-02-12 17:23:30 -04:00
Ilya Laktyushin
bb23f962b8 Video message recording improvements 2024-01-13 18:05:58 +04:00
Ilya Laktyushin
f02722c954 Various fixes 2024-01-04 17:15:12 +04:00
Ilya Laktyushin
f11c070862 [WIP] View-once audio messages 2023-12-29 04:50:22 +04:00
Ali
af8474aca5 [WIP] Quotes and link previews 2023-10-18 01:11:23 +04:00
Ilya Laktyushin
9f7056670c Various improvements 2023-10-15 17:07:39 +04:00
Ilya Laktyushin
4013fca50e Various fixes 2023-10-12 15:39:47 +04:00
Ali
295ba9541b Localization 2023-07-16 19:32:01 +04:00
Ali
e5d948d90a Stories 2023-06-19 00:36:06 +03:00
Ali
969724de40 [WIP] Stories 2023-05-23 23:53:43 +04:00
Ali
cfe7f43e0d Various improvements 2023-04-14 18:59:33 +04:00
Ilya Laktyushin
bf94ea75e9 Various fixes 2023-02-06 00:55:17 +04:00
Ali
554cd0e6fe Topic improvements + interval ads 2022-10-29 00:26:57 +04:00
Ilya Laktyushin
bca77cd025 Cherry-pick fixes 2022-10-05 17:48:27 +03:00
Ali
93cb743468 Emoji improvements 2022-09-01 03:12:43 +04:00
Ilya Laktyushin
e795194a8f Various fixes 2022-08-11 19:41:41 +03:00
Ali
985c662ada Add missing localization 2022-07-25 00:34:14 +02:00
Ali
ed59ead31e [WIP] Animated emoji 2022-07-08 19:53:20 +02:00
Ali
1ac654e8b2 [Temp] custom emoji layouts 2022-07-08 15:09:55 +02:00
Ali
e93bc2efab Pre-release improvements 2022-04-01 17:25:59 +04:00
Ilya Laktyushin
dc8a9f16a7 Fix message content kind detection 2022-01-29 01:49:22 +03:00
Ilya Laktyushin
bbc082e991 Reimplement video stickers 2022-01-27 13:06:44 +03:00
Ilya Laktyushin
26f6e04fb3 Video Stickers Fixes 2022-01-27 02:15:12 +03:00
Ilya Laktyushin
6724b422fa Various Fixes 2022-01-11 15:44:05 +03:00
Ilya Laktyushin
9c42eebbbd Various Fixes 2022-01-10 23:29:14 +03:00
Ilya Laktyushin
835ce9adae Various Improvements 2021-12-18 02:35:50 +04:00
Ali
b778c66226 Refactoring 2021-09-20 23:07:38 +03: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
aabafc617f Fix invoice text in replies 2021-04-10 12:38:16 +04:00
Ilya Laktyushin
b9e52f27e3 Voice Chat Scheduling 2021-04-07 04:33:05 +03:00
Ali
065150e048 Animation experiment 2021-01-25 23:47:25 +05:00
Ilya Laktyushin
f91cc7f744 Various fixes 2020-12-19 03:16:15 +04:00
Ilya Laktyushin
7741978b7e Video Editing 2020-05-23 13:26:53 +03:00
Ilya Laktyushin
532ccd1031 Replace line breaks with spaces in reply headers 2020-05-11 05:00:04 +04:00
Ilya Laktyushin
a63457d7e7 Add support for generic dice-like messages 2020-04-17 01:34:31 +04:00
Ilya Laktyushin
eedcd225f0 Chart fixes 2020-03-24 18:00:50 +04:00