Feat/cs/jumbomoji#757
Merged
Merged
Conversation
…and TXT implementations
… to preserve original text and inline stickers
There was a problem hiding this comment.
Pull request overview
Refactors BubbleComponent from separate Text/Attachment variants into a unified Run(Vec<AttributedRange>) to faithfully model the underlying NSAttributedString, then leverages this to add inline-sticker (Jumbomoji/Memoji/Genmoji) rendering, GUID-based attachment resolution, and several performance/correctness fixes.
Changes:
- Replace
BubbleComponent::Text/AttachmentwithRun(Vec<AttributedRange>)grouped by__kIMMessagePartAttributeName; each range carries effects, optionalAttachmentMeta, and anemoji_imagehint. - Implement inline-sticker rendering (HTML) with jumbomoji sizing (1/2-3/4+ glyphs → jumbo/medium/normal); preserve text + translation + sticker in translated/edited paths; strip orphaned
\u{FFFC}placeholders from translations. - Add
AttachmentResolver(GUID-first, positional fallback) andAttachment.guidfield to fix multi-attachment ordering; migrate tocrabstep0.4.0 lazy API; add SQLitemmap_size/cache_sizePRAGMAs and bulk blob reads.
Reviewed changes
Copilot reviewed 26 out of 36 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| imessage-database/src/tables/messages/models.rs | Replace Text/Attachment variants with unified Run(Vec<AttributedRange>); new constructors for text/attachment/inline_attachment |
| imessage-database/src/tables/messages/body.rs | Rewrite typedstream parser to build per-range dictionaries and group by part index; legacy parser produces single-range Runs |
| imessage-database/src/tables/messages/message.rs | Update single-URL detection to new shape; bulk-read summary/payload blobs |
| imessage-database/src/tables/attachment.rs | Add guid column/field, is_animated_sticker() helper, and tests |
| imessage-database/src/message_types/translation.rs | Strip \u{FFFC} placeholders from translated text |
| imessage-database/src/message_types/edited.rs | Test updates for new component shape; add Memoji-edited test |
| imessage-database/src/util/typedstream.rs | Adapt helpers to crabstep 0.4 lazy PropertyGroup API |
| imessage-database/src/util/streamtyped.rs | Doc-comment update for new BubbleComponent shape |
| imessage-database/src/tables/table.rs | Add mmap_size / cache_size PRAGMAs on connection open |
| imessage-database/Cargo.toml | Bump crabstep to 0.4.0 |
| imessage-exporter/src/exporters/formatter.rs | Add render_run trait method; widen format_edited signature with attachments + resolver |
| imessage-exporter/src/exporters/shared/part.rs | Add AttachmentResolver and resolve_run; delegate Run rendering to render_run |
| imessage-exporter/src/exporters/shared/attachment.rs | Use is_animated_sticker() and gate the encoding label to the actual transcode modes |
| imessage-exporter/src/exporters/html/mod.rs | Add render_run, interleave_segments, format_sticker_inline; jumbomoji class plumbing; extensive tests |
| imessage-exporter/src/exporters/html/jumbomoji.rs | New module classifying messages as Normal/Medium/Jumbo with emoji counting (ZWJ/flags/keycaps/skin tones) |
| imessage-exporter/src/exporters/html/view_model.rs | Add InlineBubble/InlineSegment/StickerInlineVM/GlyphSize; restructure StickerSuffixVM; mark unused placemark fields |
| imessage-exporter/src/exporters/html/safe.rs | Add into_inner to Html so segments can be concatenated |
| imessage-exporter/src/exporters/html/resources/style.css | Add inline_sticker, bubble.jumbo, bubble.medium rules |
| imessage-exporter/src/exporters/html/templates/* | New sticker_inline.html; simplify sticker_suffix.html; add InlineBubble arm; trim placemark template |
| imessage-exporter/src/exporters/txt/mod.rs | Add render_run for TXT; thread AttachmentResolver; preserve translation in mixed runs |
| imessage-exporter/src/app/runtime.rs | Include guid: None in fake_attachment |
| imessage-exporter/src/app/test_dir.rs | Switch outer doc to block-comment form |
| docs/faq.md | Update perf number (112k → 130k msgs/s) |
| Cargo.lock | Update dependencies including crabstep 0.4.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
BubbleComponent→Run(Vec<AttributedRange>)typedstreammore faithfully__kIMMessagePartAttributeNameemoji_imagehint<img>s, classified by Apple's MIME-independentemoji_imagehint, with jumbo/medium/normal sizing by glyph countGUID-based attachment resolutionAttachmentResolverbinds body placeholders to rows by file-transferGUID(positional fallback for legacy bodies), fixing multi-attachment orderingguidfield toAttachmentstructBasic/Full, video inFull)crabstepmigrationPropertyGroupAPImmap/cache PRAGMAs + bulk streaming blob reads