Skip to content

Render image attachments inline in chat transcript (render-only) #29

@aitrace-dev

Description

@aitrace-dev

Context

Child of #21 (multimodal support). This is the first slice: rendering only. Upload UI, WebSocket payload changes, and send-to-model wiring land in later issues.

The chat transcript should render a message's attachments array if present, showing images inline at a sensible max-width. For this issue, seed a test message with a fixture PNG to exercise the render path — no upload UI yet.

Acceptance criteria

  • Shared Message type extended with optional attachments: Array<{ type: 'image', url: string, mimeType: string }>
  • ChatPage renders each image attachment under the message's text, max-width 400px, click to open full-size in a lightbox or new tab
  • Images are loading="lazy"
  • Playwright test: seed a message with a sample image (bundle a small PNG under packages/frontend/tests/fixtures/), verify it renders

Pointers

  • Shared types (wherever Message is defined)
  • packages/frontend/src/pages/ChatPage.tsx
  • packages/frontend/tests/chat.spec.ts
  • packages/frontend/tests/fixtures/ (new)

Out of scope (later issues)

  • Paste/drop upload UI
  • Sending images to the LLM
  • Backend storage & DB schema

Difficulty

~2–3 hours.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions