Commit graph

364 commits

Author SHA1 Message Date
Ilya Laktyushin
4b2a826682 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-05-29 10:01:53 +02:00
Ilya Laktyushin
e0f4655cc5 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-05-29 09:24:16 +02:00
isaac
28763bb92d InstantPage blockQuote: nested-blocks payload
Upgrade InstantPageBlock.blockQuote from (text, caption) to
(blocks: [InstantPageBlock], caption). Legacy inbound shapes (API
pageBlockBlockquote, Postbox "t", FlatBuffers text) lift into
[.paragraph(text)]; outbound stays on the legacy wire constructor for
empty/single-paragraph quotes and uses pageBlockBlockquoteBlocks
otherwise. V1/V2 renderers recurse into child blocks with a fixed 10pt
inter-child gap; markdown forward/reverse, entity-expressibility, and
preview text updated. pullQuote is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 01:00:47 +02:00
isaac
55619c54f9 Fix crash 2026-05-28 19:31:09 +02:00
Ilya Laktyushin
3e6363abf9 Various improvements 2026-05-28 16:50:05 +02:00
isaac
81e3be1923 InstantPage list checkboxes (task-list style): parse, serialize, render
Add a first-class `checked: Bool?` to InstantPageListItem (orthogonal to the
ordered-list `num`), replacing the prior sentinel-string-in-num prototype.

- Data model: enum third associated value on .text/.blocks; Postbox + a new
  FlatBuffers `checkState` tri-state field (0=nil,1=unchecked,2=checked,
  backward-compatible); Equatable.
- Transmission: read/write the native API `checkbox`=flags.0 / `checked`=flags.1
  bits on all four PageListItem / PageListOrderedItem constructors, so checkbox
  state survives the server round-trip for sender and recipients.
- Markdown: forward parser routes detected `[ ]`/`[x]` into `checked` (keeping
  the real number for ordered items); reverse converter emits `- [ ]`/`- [x]`
  so editing a rich message round-trips.
- Display: V1 + V2 layout detect via `item.checked`; the V2 renderer draws real
  CheckNode artwork (was a placeholder); preview text shows a checkbox glyph
  instead of leaking the old sentinel.

Spec: docs/superpowers/specs/2026-05-27-instantpage-list-checkbox-design.md
Plan: docs/superpowers/plans/2026-05-27-instantpage-list-checkbox.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 16:44:47 +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
6b6ba070c7 Update API 2026-03-26 09:26:15 +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
Isaac
af6e5f258e Merge commit '90f110a311'
# Conflicts:
#	Telegram/Telegram-iOS/en.lproj/Localizable.strings
#	submodules/ChatPresentationInterfaceState/Sources/ChatPresentationInterfaceState.swift
2026-03-20 18:55:29 +01:00
Ilya Laktyushin
f12fb93a3e [WIP] Polls 2026-03-20 14:52:19 +01:00
Ilya Laktyushin
e7a334364c [WIP] Polls 2026-03-20 12:15:27 +01:00
Ilya Laktyushin
c32f645f5e [WIP] Polls 2026-03-17 16:32:49 +01:00
Ilya Laktyushin
3a311f75bd Update API 2026-03-16 13:37:36 +01:00
Ilya Laktyushin
cbc5a49507 [WIP] Polls 2026-03-13 11:04:33 +01:00
Ilya Laktyushin
b1aa62e9cc Various fixes 2026-03-03 20:26:45 +04:00
Ilya Laktyushin
aec6a54b5d Update localization 2026-02-24 19:12:54 +04:00
Ilya Laktyushin
d9d1210c1d Various improvements 2026-02-19 21:53:26 +04:00
Ilya Laktyushin
9c16af25c0 Update API 2026-02-17 10:25:42 +04:00
Ilya Laktyushin
72ed83c99a Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-02-10 12:59:12 +04:00
Ilya Laktyushin
189d25c32e Update API 2026-02-10 12:58:04 +04:00
Isaac
002df956d2 Bug fixes 2026-02-06 17:14:35 +04:00
Ilya Laktyushin
e81e7c6897 Formatted date support 2026-02-06 14:24:03 +04:00
Isaac
962a9ae83a Various improvements 2026-01-30 22:20:50 +08:00
Ilya Laktyushin
90a4dbe855 Fix stake dice result message 2026-01-30 03:21:18 +04:00
Ilya Laktyushin
142d59cf8f Various improvements 2026-01-27 22:24:31 +04:00
Ilya Laktyushin
0d12dd29ad Various improvements 2026-01-25 22:17:49 +04:00
Ilya Laktyushin
ea9d8db1d3 Update API [skip ci] 2026-01-20 14:54:15 +04:00
Mikhail Filimonov
db93244583 update api (rarities, crafted) 2026-01-16 16:20:08 +04:00
Ilya Laktyushin
d70b31f8bc Fix build 2026-01-08 19:21:29 +04:00
Ilya Laktyushin
54ec998186 Various fixes 2025-12-27 21:50:29 +04:00
Ilya Laktyushin
2edce5ebf2 Alerts 2025-12-22 00:19:11 +04:00
Ilya Laktyushin
28d4e1e171 Various improvements 2025-12-16 20:05:44 +04:00
Ilya Laktyushin
6a6714baef Various fixes 2025-12-11 21:32:44 +04:00
Ilya Laktyushin
5046aab8ff Update API 2025-12-02 12:36:05 +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
412e02ef00 Gift auctions 2025-11-12 04:46:02 +04:00
Ilya Laktyushin
b76c6c9b3c Update API 2025-11-08 23:17:00 +04:00
Ilya Laktyushin
2b2937a2eb Update API 2025-11-04 17:11:50 +04:00
Ilya Laktyushin
6d59a6394a Various fixes 2025-09-28 03:01:43 +04:00
Ilya Laktyushin
4657ac752d Various improvements 2025-09-27 01:27:56 +04:00
Ilya Laktyushin
737f84bb13 Various fixes 2025-09-25 21:47:46 +04:00
Ilya Laktyushin
cb523192d5 Various improvements 2025-09-17 20:58:42 +04:00
Ilya Laktyushin
76e8d79f9f Update API 2025-09-06 13:35:19 +05:00
Ilya Laktyushin
b41ec12024 Various fixes 2025-09-01 02:28:03 +04:00