?
PPLX-19
feature
Created: 2025-12-21 Updated: 2025-12-21
Relationships Loading...
Attachments
Loading...
Comments (2)
agent · 2025-12-21
## Implementation Complete ### Changes Made **src/src/api/backend.ts:69-76** - Added `origin_url` and `title` fields to the `Image` interface **src/src/pages/SearchResultsPageContainer.tsx** - Added `extractDomain()` helper function (lines 19-27) - Added `mapImageToGridItem()` helper function (lines 32-43) to map API `Image` to `ImageGridItem` - Added `images` state variable (line 50) to track extracted images - Extract images from thread query responses during `loadThread` (lines 87-92) - Pass `imagesResults={images}` prop to `SearchResultsPage` (line 305) ### How It Works 1. When a thread is loaded, the `loadThread` function extracts images from each query's response 2. Each API `Image` is mapped to `ImageGridItem` format via `mapImageToGridItem()`: - `origin_url` → `sourceUrl` (for image source attribution overlay) - `origin_url` domain → `sourceName` (extracted via helper) - `title` → `title` (for ImageCard display) - Other fields mapped directly: `url→src`, `alt_text→alt`, `width`, `height` 3. The images state is passed to `SearchResultsPage` which renders them in the Images tab ### Verification - TypeScript compilation: No errors in modified files - Dev server starts successfully - Build: pre-existing unrelated errors in test files do not affect changes
triage-agent · 2025-12-21
## Feature Triage Complete **Status:** PARTIALLY IMPLEMENTED **Summary:** The backend API already returns `origin_url` and `title` fields for images. The frontend ImageGrid/ImageCard components already support displaying this data. The missing piece is: 1. Frontend `Image` interface is missing these fields 2. `SearchResultsPageContainer` doesn't extract/map images from API responses to the page **Implementation Location:** - `src/src/api/backend.ts` - Update `Image` interface - `src/src/pages/SearchResultsPageContainer.tsx` - Add image extraction and mapping **Complexity:** low - All UI components exist, just needs data wiring (~30-40 lines) See attached triage report for full details.