Skip to content

feat(map): render MMS images inline in conversation (tincan-orn95)#57

Merged
quad341 merged 2 commits into
mainfrom
feature/tincan-orn95
Jun 6, 2026
Merged

feat(map): render MMS images inline in conversation (tincan-orn95)#57
quad341 merged 2 commits into
mainfrom
feature/tincan-orn95

Conversation

@quad341
Copy link
Copy Markdown
Owner

@quad341 quad341 commented Jun 6, 2026

Summary

  • Fetches full MIME body for MMS messages via Attachment:True in BlueZ Message1.Get
  • Parses multipart MIME in new _parse_mms_content(): extracts text body and base64-encodes image attachments as [{mime_type, data}]
  • Passes attachments as a JSON string through the D-Bus sv dict chain (dbus_service.py → GUI)
  • Renders each image inline in the conversation bubble (QLabel + QPixmap, max 300 px wide) beneath the message text
  • Treats non-empty attachments as sufficient for display (no BODY_UNAVAILABLE placeholder when image-only MMS)

Tests

  • 26-case MIME parsing suite added in tests/tincand/test_parse_mms_content.py (tincan-cq4l6)
  • Full suite: 1116 passed, 1 warning

Test plan

  • Send an MMS with an image from an iPhone; verify image renders inline in conversation view
  • Send a text-only SMS/MMS; verify no regression in text display
  • Send a multi-part MMS with text + image; verify both text body and image appear
  • Verify image-only MMS (no text body) shows image without "message unavailable" placeholder
  • Run pytest — all 1116 tests pass

🤖 Generated with Claude Code

Jim Wordelman and others added 2 commits June 5, 2026 20:24
…4l6)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fetch full MIME body for MMS messages via Attachment:True in Message1.Get
- Parse multipart MIME in _parse_mms_content: extract text/plain body and
  base64-encode image/* attachments as a list of {mime_type, data} dicts
- Serialize attachments as JSON string through D-Bus sv dict and dbus_service
- ThreadView: decode attachments on MessageData, render each image in a
  QLabel beneath the text bubble (max 300px wide, SmoothTransformation)
- GUI: parse attachments JSON in _on_message_received, _cache_msg_to_data,
  _msg_dict_to_data; treat non-empty attachments as sufficient for display

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@quad341 quad341 merged commit c803a2e into main Jun 6, 2026
1 check passed
@quad341 quad341 deleted the feature/tincan-orn95 branch June 6, 2026 03:34
@quad341
Copy link
Copy Markdown
Owner Author

quad341 commented Jun 6, 2026

Reviewer finding: request-changes

1 blocker — fix is 2 lines / ruff --fix

F1 [BLOCKER] Ruff violations in tests/tincand/test_parse_mms_content.py

tests/tincand/test_parse_mms_content.py:30:1: I001 Import block is un-sorted or un-formatted
tests/tincand/test_parse_mms_content.py:38:8: F401 `pytest` imported but unused

(Confirmed against pyproject.toml select = ["E", "F", "W", "I"])

Fix: remove import pytest (line 38); run ruff check --fix tests/tincand/test_parse_mms_content.py for the sort. The builder mail said "Ruff clean" but ruff was not run against the test file before submission.


All other dimensions pass: 1204 tests green, security clean, _parse_mms_content logic correct, D-Bus JSON path guarded, spec met.

Re-submit after the lint fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant