Skip to content

Viewer: render figure exhibits as inline images #60

Description

@EYH0602

Background

Gap analysis vs the deployed ara-hub viewer (https://www.agenticresearch.sh/ara/AmberLJC/ara-paperbench/artifacts/speedrun/nanogpt-speedrun). Related: #46 (exhibit markdown styling).

Problem

figure > img rendering is an inert CSS stub (crates/ara-viewer/src/detail.rs:602-614, styles pre-skinned at crates/ara-viewer/public/styles.css:1126-1238). Figure-kind exhibits can only ship their content as a markdown body, so figures degrade to data tables — the nanogpt-speedrun artifact literally carries the note "Rendered as its data table -- this ARA carries no raster image for this figure."

The hub base64-inlines figure PNGs and renders them as bordered, padded <figure> blocks with mono captions.

Proposal

  • Extend the exhibit payload so figure exhibits can carry an image reference (relative path resolved by ara serve, or inlined data URI for static export).
  • Render ExhibitKind::Figure exhibits with an image as <figure><img><figcaption> (figcaption = description, see Viewer: render exhibit captions (description) in the result block #55).
  • Fall back to the current markdown-body rendering when no image is present.

Acceptance

  • Figure exhibits with an image render as inline images with captions
  • Figure exhibits without an image fall back to current behaviour
  • Images served correctly by ara serve and resolvable in static/embedded mode
  • Tests for both branches

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions