Skip to content

3d: Attachment UI in event detail page #247

Description

@ajianaz

Parent: #233 · Blocked by: #246

Scope

Add "Attachments" section to the event detail page. Show uploaded files (screenshots, logs, minidumps) with inline preview where possible.

UI Components

Attachments Section (below event breadcrumbs/tags)

  • Attachment list: card grid showing each attachment

    • File icon (by content_type: image 🖼️, text 📄, binary 📦)
    • Filename (truncated if long)
    • Size (human-readable: 2.4 MB)
    • Download button
    • Delete button (admin only)
  • Inline preview:

    • Images (image/*): thumbnail with click-to-expand modal
    • Text (text/*): collapsible code block with syntax highlight
    • Other: download-only (no preview)
  • Empty state: hidden when no attachments (don't show empty section)

Attachment Modal (click image thumbnail)

  • Full-size image display
  • Zoom controls (fit/actual)
  • Download button
  • Close button

API Calls

  • GET /api/events/:id/attachments — fetch on page load
  • GET /api/attachments/:id/download — image preview / download link
  • DELETE /api/attachments/:id — delete with confirmation dialog

Tasks

  • Create AttachmentList.svelte component
  • Create AttachmentPreview.svelte component (image modal)
  • Create AttachmentCard.svelte component (single attachment)
  • Wire fetch + render in event detail +page.svelte
  • Image thumbnail with lazy loading
  • Text file inline preview (max 100 lines, with "show more")
  • Delete with confirmation + optimistic UI update
  • Empty state (no section shown when 0 attachments)
  • Responsive: grid cols adapt to viewport (1→2→3→4)
  • Loading skeleton while fetching

Effort: ~2 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestscope:dashboardSvelteKit dashboard UItype:envelopeSentry envelope item type expansion

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions