Skip to content

Keep image content theme parse-only#252

Closed
leehack wants to merge 1 commit into
spec/mrtr-sampling-request-shapefrom
spec/image-content-theme-parse-only
Closed

Keep image content theme parse-only#252
leehack wants to merge 1 commit into
spec/mrtr-sampling-request-shapefrom
spec/image-content-theme-parse-only

Conversation

@leehack

@leehack leehack commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • stop serializing legacy ImageContent.theme on normal image content blocks
  • keep parsing legacy theme values so old icon-shaped payloads remain readable
  • leave spec-compliant McpIcon.theme behavior unchanged for advertised icons

Spec context

Both current MCP 2025-11-25 and the draft schema define ImageContent with _meta, annotations, data, mimeType, and type; neither schema includes theme on image content blocks. The theme field belongs on Icon/McpIcon metadata, so this makes the content serializer spec-shaped without breaking legacy parsing.

Part of #177.

Tests

  • dart format lib/src/types/content.dart test/types_test.dart
  • dart test test/types_test.dart test/mcp_2025_11_25_test.dart test/mcp_2026_07_28_test.dart
  • git diff --check
  • dart analyze
  • dart test

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.48%. Comparing base (9bcb972) to head (6357227).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           spec/mrtr-sampling-request-shape     #252      +/-   ##
====================================================================
- Coverage                             88.48%   88.48%   -0.01%     
====================================================================
  Files                                    47       47              
  Lines                                  9354     9353       -1     
====================================================================
- Hits                                   8277     8276       -1     
  Misses                                 1077     1077              
Flag Coverage Δ
unittests 88.48% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack

leehack commented Jun 1, 2026

Copy link
Copy Markdown
Owner Author

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #271 (type/schema validation); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 2026
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