Skip to content

Working on image stuff, idk man#105

Merged
masonbair merged 1 commit intomainfrom
mason4
Jan 18, 2026
Merged

Working on image stuff, idk man#105
masonbair merged 1 commit intomainfrom
mason4

Conversation

@masonbair
Copy link
Collaborator

@masonbair masonbair commented Jan 18, 2026

Image stuff, yoloooo

Summary by CodeRabbit

  • New Features
    • Added image preview capability to tickets with loading and error states
    • Ticket cards now display an "Contains images" indicator
    • Images can be expanded into a full-size modal view
    • Keyboard and mouse interactions supported for image browsing (Escape to close, click to expand)

✏️ Tip: You can customize this high-level summary in your review settings.

@masonbair masonbair merged commit 79e588b into main Jan 18, 2026
1 of 2 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A new image preview feature is introduced with a reusable Svelte component for displaying images with loading and error states, modal expansion, and keyboard interactions. Supporting utilities detect and extract image URLs from ticket text, while existing ticket components integrate the preview functionality.

Changes

Cohort / File(s) Summary
Image Detection Utility
ticket-frontend/src/lib/utils/imageDetection.ts
New module with three public functions: extractImageUrls() extracts image URLs by pattern matching; hasImageUrls() checks for presence; replaceImageUrls() substitutes URLs with placeholder text. Includes regex patterns for common image extensions and potential image URLs, with deduplication.
Image Preview Component
ticket-frontend/src/lib/components/image-preview.svelte
New component renders image previews with per-image state tracking (loading, error, expanded). Displays loading spinner on fetch, error state with "Open in new tab" link on failure, or clickable image on success. Expanded modal shows full-size image on dark overlay; closes via click-outside, dedicated close button, or Escape key. Includes spin animation for loader.
Ticket Card Integration
ticket-frontend/src/lib/components/ticket-card.svelte
Imports hasImageUrls utility and adds derived containsImages state computed from ticket title and description. Conditionally renders "Contains images" indicator with icon when images detected.
Ticket Detail Integration
ticket-frontend/src/lib/components/ticket-detail.svelte
Imports ImagePreview component and extractImageUrls utility. Adds derived imageUrls state by extracting and concatenating URLs from ticket title and description. Conditionally renders ImagePreview section when imageUrls is non-empty.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 twitch twitch
Images now dance through our app so divine,
With loading states, errors—they all align!
Click to expand and behold with delight,
Modal magic shows images just right!
The preview component hops into the night! 🖼️✨

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant