Skip to content

Conversation

@Aias
Copy link
Owner

@Aias Aias commented Jan 5, 2026

Summary

  • Add generateAltText service using OpenAI vision API (gpt-5.2) to automatically generate alt text for images
  • Add media.generateAltText tRPC endpoint for batch processing
  • Add rcr media generate-alt <id...> [--force] CLI command

The service processes images in batches of 5, validates format/accessibility, uses record context (title, type, URL) in prompts, and invalidates parent record embeddings when alt text changes.

Test plan

  • Test CLI: rcr media generate-alt <id> on a single image
  • Test batch processing with multiple IDs
  • Verify --force regenerates existing alt text
  • Confirm skipping works for non-images and already-processed items

Aias added 4 commits January 5, 2026 11:53
- Introduced a new TRPC endpoint to generate alt text for media using OpenAI vision.
- Added CLI command `media generate-alt` to facilitate alt text generation from the command line.
- Implemented a service to handle alt text generation, including image accessibility checks and prompt construction.
- Updated media router and CLI command structure to support the new functionality.
…n for images

- Added aria-label attributes to video components in MediaGrid, Home, RecordLink, and SearchResultItem for improved accessibility.
- Implemented functionality to generate alt text for images during media creation, including error handling for the alt text generation process.
- Updated CLI commands and service integrations to support alt text generation, allowing for batch processing of images without descriptions.
…on process

- Modified aria-label attributes for video components in MediaGrid, RecordLink, and SearchResultItem to improve accessibility.
- Refined alt text generation logic to include dry run options and debug output for better error tracking and processing insights.
- Updated CLI commands to support new alt text sync options, allowing for more flexible image processing during media synchronization.
- Added a new timestamp field `altTextGeneratedAt` to the media schema for tracking when alt text is generated.
- Improved the alt text generation service by implementing concurrency control and timeout handling for image accessibility checks.
- Updated the `callVisionApi` function to support abort signals, allowing for better management of long-running requests.
- Refined the `generateAltTextForMedia` function to include the new timestamp field and handle dry runs more effectively.
- Introduced progress logging during batch processing of media items to provide better insights into the generation process.
@Aias Aias merged commit 1bccdeb into main Jan 5, 2026
2 checks passed
@Aias Aias deleted the alt-text branch January 5, 2026 18:04
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.

2 participants