Repository navigation
Conversation
…unsupported message label in chat list
e128114 to
275f155
Compare
|
Issues: CONFIRMED: InstantPagePreview.swift:69-70: a CONFIRMED: InstantPagePreview.swift:75-83: table cells and button labels (106-113) are joined without a separator, so a table previews as "NameAgeAlice30" and a button row as "YesNo" CONFIRMED: TextUtils.swift:332-335: a rich message with no extractable text (only uncaptioned media, or only unsupported blocks) now returns an empty string, which leaves a blank chat list subtitle, an empty notification and reply panel, and a dangling "You: " prefix in forum rows CONFIRMED: InstantPageRichText.swift:19: the new CONFIRMED: TextUtils.swift:321: the CONFIRMED: PR description: |
|
Thanks for the review. Excluded thinking from top-level and nested previews, added separators between table cells/button labels, and skipped empty cover content before adding newlines. Restored the original text/media guard and non-empty fallback, preserving existing prefixes. Updated the description to include post embeds (including author fallback), collages, and slideshows. The full Debug workspace build passed, and all seven new XCTest preview tests passed against the actual package modules, in addition to the isolated harness. |
|
This pull request is not filled in correctly: the Confirmation section does not state the macOS version. Please complete every section as described in CONTRIBUTING.md and update the PR so it can be reviewed. Issues: CONFIRMED: InstantPageRichText.swift:18-21: this hunk no longer affects any chat-list, notification or reply preview, because the preview now goes through |
|
Removed the InstantPageRichText.swift hunk entirely; the legacy helper now matches master, preserving Instant View block-quote spacing/cover handling and the existing RTL path. Preview extraction remains in markdownPreviewRichText(from:), where the intended cover and empty-content behavior belongs. Updated the regression to check preview and legacy behavior independently, corrected the scope description, and added macOS 27.0 / Telegram 13.1.0 build 283357 to Confirmation. All seven actual MessageTextUtils XCTest cases and the full Debug workspace build pass. |
|
Issues: CONFIRMED: PR description: the title, Reason and Before/After describe only the chat list, but |
|
Expanded the title, Key change, Reason and Before/After scope beyond the chat list. Traced and listed the shared pullText consumers: reaction notifications, pinned-message service text, in-chat search, selected-message copying and channel statistics. The reaction-to-table example is now explicit, and the existing screenshots are labelled as illustrating only the chat-list surface. This follow-up changes documentation only. |
Key change
InstantPagePreview.swift, expanded preview extraction to include untitled table cells, covers, expandable details, button rows, and image/video/audio/document/web-embed/map captions..postEmbedextraction with body → caption → author fallback, plus.collageand.slideshowextraction with child-content → caption fallback. Nested blocks use the same preview extraction rules..thinkingblocks out of previews, including nested thinking, so they cannot consume the preview budget before the answer. Table cells and button labels are separated by spaces, preserving custom emoji entities and UTF-16 ranges.InstantPageRichText.swiftis identical to master, so legacy Instant View block-quote spacing and rich-message RTL detection retain their existing behavior.TextUtils.swift. Rich messages that also contain ordinary text or media continue through the existing author, folder, and media-prefix path.instantPagePreviewTextfeedspullText, changing readable rich-message text in reaction notifications, pinned-message service lines, in-chat search results, Copy Selected Text when copying selected messages, and channel statistics. These consumers retain their own existing prefixes/formatting.Reason
Some supported rich messages store readable content in table cells or nested blocks rather than a top-level title or paragraph. The incomplete shared extraction could produce an unsupported chat-list preview or missing text in other consumers, including an empty quoted snippet in a reaction notification, despite readable content being available.
The fix extracts that content without replacing an unextractable message with a blank subtitle. Thinking-only, uncaptioned-media-only, and unsupported-only rich messages retain the existing fallback when no preview text can be extracted.
Screenshot/video result (before/after)
Before
Chats with rich messages (such as game cards, tables without titles, or bot cards) displayed "Message is not supported" in the dialogs list preview. Other shared-text consumers could receive no readable text; for example a reaction to a table-only message could quote an empty string. The existing captures illustrate the chat-list case:
After
Readable rich-message text is available to the chat list and the shared-text consumers listed above. For example, a table with cells Name / Alice produces the reaction snippet
👍 to your "Name Alice"; pinned service text, in-chat search, selected-message copying and channel statistics also use that extracted content. The original screenshots below demonstrate only the chat-list surface:Confirmation
Verification environment: macOS 27.0 (Apple Silicon), Telegram 13.1.0, build 283357 (Debug).
InstantPageRichText.swiftis byte-identical to upstream and the preview still usesmarkdownPreviewRichText(from:)rather than that legacy helper.ec3521b0; the local build targets macOS 12.0 for Xcode compatibility.This follow-up changes the title and documentation only. The listed shared-text consumers were traced to their actual
pullTextcall sites; their individual presentation is not covered by the chat-list screenshots or the helper tests. The populated workspace uses local Xcode compatibility settings not included in this PR.