Skip to content

Feat/cs/jumbomoji#757

Merged
ReagentX merged 28 commits into
developfrom
feat/cs/perf++
May 30, 2026
Merged

Feat/cs/jumbomoji#757
ReagentX merged 28 commits into
developfrom
feat/cs/perf++

Conversation

@ReagentX

Copy link
Copy Markdown
Owner
  • Refactor BubbleComponentRun(Vec<AttributedRange>)
    • Models the parsed typedstream more faithfully
      • Attribute runs are grouped by __kIMMessagePartAttributeName
      • Each range carries its effects, optional inline attachment, and the emoji_image hint
  • Inline stickers (Jumbomoji)
    • Resolves Support Jumbomoji #755 and Support inline stickers as emoji images #756
    • Memoji/genmoji/custom stickers render inline as glyph-sized <img>s, classified by Apple's MIME-independent emoji_image hint, with jumbo/medium/normal sizing by glyph count
    • In edited & translated messages:
      • Translated messages preserve text + translation + sticker
      • Orphaned attachment placeholders stripped from the translation
      • TXT surfaces translations for sticker-bearing runs
  • GUID-based attachment resolution
    • AttachmentResolver binds body placeholders to rows by file-transfer GUID (positional fallback for legacy bodies), fixing multi-attachment ordering
    • Add guid field to Attachment struct
  • Attachment-handling fixes
    • The "encoding" label is gated to the modes that actually transcode (image stickers in Basic/Full, video in Full)
    • A missing/dangling inline attachment now renders a placeholder instead of silently vanishing.
  • crabstep migration
  • Performance enhancements
    • SQLite read-path mmap/cache PRAGMAs + bulk streaming blob reads
  • Tests & fixtures
    • Adds parse and render coverage for every inline-sticker shape:
      • Memoji/Genmoji/custom
      • Animated (block) vs static
      • Multi-inline ordering
      • Edited
      • Translated

@ReagentX ReagentX self-assigned this May 29, 2026
@ReagentX ReagentX added bug Something isn't working crate: database Related to the database crate crate: cli Related to the CLI crate labels May 29, 2026
@ReagentX ReagentX added exporter Related to exporter processes txt Related to TXT Export html Related to HTML Export new feature Requires creating a new feature enhancement Requires updating an existing feature compatibility Related to file conversions labels May 29, 2026
@ReagentX ReagentX changed the title Feat/cs/perf++ Feat/cs/jumbomoji May 29, 2026
@ReagentX ReagentX moved this to In Progress in 4.2: Stream Orchid May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/Attachment with Run(Vec<AttributedRange>) grouped by __kIMMessagePartAttributeName; each range carries effects, optional AttachmentMeta, and an emoji_image hint.
  • 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) and Attachment.guid field to fix multi-attachment ordering; migrate to crabstep 0.4.0 lazy API; add SQLite mmap_size/cache_size PRAGMAs 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.

@ReagentX
ReagentX merged commit f27ec38 into develop May 30, 2026
2 checks passed
@ReagentX
ReagentX deleted the feat/cs/perf++ branch May 30, 2026 00:11
@ReagentX ReagentX moved this from In Progress to Done in 4.2: Stream Orchid May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Related to file conversions crate: cli Related to the CLI crate crate: database Related to the database crate enhancement Requires updating an existing feature exporter Related to exporter processes html Related to HTML Export new feature Requires creating a new feature txt Related to TXT Export

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Support Jumbomoji

2 participants