Skip to content

feat: HTML file cards should render inline in chat like the Markdown preview #247

Description

@JKGeovision

Hello,

HTML files displayed in chat only appear as a "click to open" card, while Markdown files render directly inline, so viewing a generated report requires an extra tap and a full-screen context switch.

Current behavior

  • .md file cards render their content directly in the chat message.
  • .html file cards only open a separate full-screen preview view (iframe + toolbar) when tapped.

Desired behavior

  • Render the HTML document inline in the chat card: height-capped (e.g. 300–400 px), internally scrollable, and rendered in a sandboxed iframe pointing at the existing /api/workspace/files/serve/<path> endpoint.
  • The existing full-screen preview view stays available as a secondary action (e.g. an "expand" affordance on the inline card).
  • Include a cache-busting parameter in the inline iframe URL so the preview always reflects the current file.

Acceptance criteria:

  • .html file cards render the document inline (height-capped, scrollable) without an extra tap.
  • Tapping the inline card (or an explicit expand button) opens the existing full-screen preview.
  • The inline iframe uses a cache-busting URL parameter.
  • Behavior is verified for a self-contained HTML file.

Thanks for considering this. It would make HTML artifacts (reports, dashboards, generated documents) as glanceable as Markdown, especially on mobile.

Best regards,
Joshua Krimmer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions