Repository navigation
fix(messages): show and index the text of rich messages (#178) - #186
Merged
Merged
Conversation
A rich message has an empty text and its content in page blocks, so tg messages printed it as text null and search could not find it. Its blocks are rendered in Telegram's rich Markdown when the message is cached, and read from raw_json for rows cached earlier; the background migration messages_rich_text makes those rows searchable. messageType stays text. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Resolves the conflicts with #176/#177 in CHANGELOG.md (both sections kept) and src/commands/messages/search.ts (success(data, next) from main, the snippet from the rendered item text from #178). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…example Co-Authored-By: Claude Opus 5.5 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
helpers.ts: a message item gets the transcript and the rich text (neoromantic#186). CHANGELOG: both sides' entries kept. Per-message error lines and the docs example carry retryable (neoromantic#177). Co-Authored-By: Claude Fable 5.2 <[email protected]>
3 tasks done
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#178 (neoromantic#186) and neoromantic#179 (neoromantic#188). No conflict. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Lands #178 (rich messages printed as
text: nulland were not found by search) on the currentmain. #178 conflicted with #176/#177. This branch is its headba0c2b9, unchanged, plus a merge ofmain. It is merged with a merge commit, so the original commit and its author stay in history and #178 closes as merged.The merge commit resolves two conflicts:
CHANGELOG.md: keeps both texts (### Addedfrom feat: add next commands to paged reads and an empty chat cache #176/feat(errors): say whether a retry can work, and what to run #177,### Fixedfrom fix(messages): show and index the text of rich messages #178).src/commands/messages/search.ts: keepssuccess(data, next)from main and the snippet built from the rendereditem.textfrom fix(messages): show and index the text of rich messages #178.One docs commit names
messages_rich_textas the last migration in thecache_migrationsexample ofdocs/database-schema.md.Behaviour kept from #178 as proposed:
messageTypestaystext, there is no new flag, and the background migrationmessages_rich_textis included, so rich rows cached earlier become searchable.How I checked it
bun run check: clean.bun run test: 2346 pass, 0 fail.bun run test:e2e: 453 pass, 0 fail.bun run build:dist/tgprints a rich message from the cache without credentials.Migration on a made-up 0.13.1 cache, written by the code of
mainbefore this change. Account 1 had 100,000 messages, 10,000 of them rich. Account 2 had 500 messages, 50 rich.messages getalready prints the rendered text, and search finds 0.tg db migratekilled withkill -9at 12,000/100,000 rows: staterunning, and search finds exactly the 1,200 rows done.raw_jsonis unchanged on every row, and so is every non-empty text, including a message with both a text and arichMessage.integrity-checkpasses.pendingand untouched until it was migrated itself. Neither account's search finds the other's words.All read paths go through
messageItemReader:messages list,get,search,unread,waitandwatch.Not checked against Telegram: the live edit path and the media, map and button blocks against real messages. No sync or API calls changed.
Tests pass locally and use made-up data only
README, docs and affected demos follow the product content standard
Title follows Conventional Commits
🤖 Generated with Claude Code