Skip to content

FIX: Converter Mixed Media Types#1719

Open
jbolor21 wants to merge 3 commits into
microsoft:mainfrom
jbolor21:bjagdagdorj/converter_mixed_media_type
Open

FIX: Converter Mixed Media Types#1719
jbolor21 wants to merge 3 commits into
microsoft:mainfrom
jbolor21:bjagdagdorj/converter_mixed_media_type

Conversation

@jbolor21
Copy link
Copy Markdown
Contributor

@jbolor21 jbolor21 commented May 11, 2026

Description

In the converter GUI panel, when we use the converters to change media types (ie add text to image: text -> image or PDFconverter takes text -> binary file output) this PR now shows the converted file as a file rather than text and lets you open the converted file as well!

  • convertersApi.previewConversion now returns converted_value_data_type alongside converted_value, so the frontend knows what kind of artifact came back.
  • PieceConversion gains a convertedDataType field plus utility helpers (isPathDataType, dataTypeToAttachmentKind, buildMediaUrl, basenameFromValue) in converterTypes.ts for consistently turning backend paths into media URLs and display names.

Screenshots:
image

Before fix:
image

Tests and Documentation

Ran existing tests & added new tests for testing the new "open" file button loads and renders a file

@jbolor21 jbolor21 changed the title FIX: Converter FIX: Converter Mixed Media Types May 11, 2026
Comment on lines +178 to +180
{convertedFileChip.iconKind === 'image' && '🖼️'}
{convertedFileChip.iconKind === 'audio' && '🎵'}
{convertedFileChip.iconKind === 'video' && '🎥'}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we not render these? file is different, of course, but image, audio, video at least? Would be nice to be able to play audio/video and see image

Copy link
Copy Markdown
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Do we want to add/update e2e tests for converters?

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.

2 participants