Skip to content

Feat: video to image mode#235

Open
dalkerman wants to merge 30 commits into
developfrom
feat/video-to-image-mode
Open

Feat: video to image mode#235
dalkerman wants to merge 30 commits into
developfrom
feat/video-to-image-mode

Conversation

@dalkerman

Copy link
Copy Markdown
Collaborator

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

dalkerman added 25 commits July 9, 2026 07:45
…sivity between reference video and YouTube URL in backend DTOs.
…elect compatible models for Video to Image mode
…L handling and automated thumbnail generation.
…mage service DTOs and background processing logic

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This Pull Request introduces a comprehensive "Video to Image" feature, enabling the user to reference videos (including uploaded files or standard YouTube URLs) for image generation models. The frontend changes are robust, leveraging Angular signals cleanly and handling YouTube video rendering in the lightbox effectively. However, there are architectural mismatches in the backend concerning direct YouTube URL consumption by Vertex AI and some parsing brittleness that need to be addressed before merging.

🔍 General Feedback

  • Multimodal Video Reference Pipeline: The implementation of video-to-image mode across both local storage assets and external video URLs is highly cohesive and well-structured.
  • Frontend Quality: The user interface adjustments are modern, visually rich, and fully align with Angular's reactive Signals paradigm.
  • Migration & Schema Cleanliness: The Alembic schema migrations are exceptionally clean, using standard database views with robust JSONB aggregation for performance.

Comment thread backend/src/images/imagen_service.py
Comment thread backend/src/common/media_utils.py Outdated
Comment thread backend/src/images/dto/create_imagen_dto.py
Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This Pull Request successfully introduces the "Video to Image" generation mode for the Google Cloud Creative Studio Platform. The feature includes video-reference support, YouTube link integration, custom modals, reactive UI adjustments, and extensive unit/integration tests. The quality of the implementation is high, though a critical asynchronous runtime hazard and a few duplicate logic/typing discrepancies should be resolved before merging.

🔍 General Feedback

  • Excellent Test Coverage: The inclusion of thorough frontend and backend unit tests for YouTube video extraction utilities and dialog interactions is highly appreciated and ensures long-term regression protection.
  • Signals Adoption: The consistent usage of Angular Signals (computed, signal) for managing reactive state in the flow prompt and video selector components is outstanding and follows project styling rules.
  • Modular Design: The separation of the video references validator and extraction logic into shared packages conforms nicely to the project's hexagonal architectural guidelines.

Comment thread backend/src/images/imagen_service.py
Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts
Comment thread backend/src/images/dto/create_imagen_dto.py
Comment thread backend/src/galleries/gallery_service.py

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This pull request introduces a highly anticipated "Video to Image" mode, allowing users to leverage video references (including local files and external YouTube links) as context for image generation. The overall implementation is very clean, modular, and features high-quality unit/integration tests with exceptional coverage across utility helpers.

🔍 General Feedback

  • Reactivity & Modern Angular: The codebase is excellently updated to leverage modern Angular architecture, specifically utilising Signals for state management and local reactivity.
  • Robust URL Parsing: The YouTube link extraction helper uses a dual-layer approach (URL parsing + regular expression fallback) which is incredibly resilient and well-designed.
  • Database Schema Upgrades: The Alembic migration files are clean and fully compatible, including proper downgrade logic for the updated unified_gallery_view and source_assets table schemas.

Comment thread backend/src/images/imagen_service.py
Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

The Pull Request introduces support for a "Video to Image" generation mode, allowing users to select or enter standard or YouTube videos as multimodal inputs for image generation tasks. The implementation quality is exceptionally high, featuring reactive state management via Angular Signals on the frontend and structured background processing on the backend. This is a solid, feature-rich extension of the platform's multimodal capabilities.

🔍 General Feedback

  • Exceptional UI Polish: The new YouTube URL input dialog is highly polished, integrating automatic clipboard scanning and live thumbnail previews for an excellent user experience.
  • Robust Code and High Test Coverage: Extensive and precise unit tests have been added across both frontend utilities and backend services, promoting excellent maintenance standards.
  • Clear Separation of Concerns: Gallery, source asset, and image services are cleanly extended to handle external references without leaking domain responsibilities.

Comment thread backend/src/source_assets/source_asset_service.py Outdated
Comment thread backend/src/galleries/gallery_service.py Outdated
Comment thread backend/src/common/media_utils.py Outdated
Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This pull request introduces a highly functional and robust "Video to Image" mode, allowing users to leverage YouTube URLs or existing video assets as reference inputs for image generation via Gemini models. The overall implementation quality is exceptionally high, featuring clean state management with Angular Signals, thorough unit tests covering edge cases, and solid database schema migration patterns.

🔍 General Feedback

  • Excellent Use of Angular Signals: The reactivity model in the frontend components (such as YouTubeInputComponent) is highly idiomatic and correctly leverages Angular Signals and computeds for state management.
  • Thorough and Comprehensive Test Suite: Positive highlights include high-quality tests on both the backend (verifying various video references and external URLs) and frontend (verifying clipboard scanning, user input, and component template rendering).
  • Graceful Error Handling: Robust boundary checks, such as index validation for media items and fallback parsing mechanisms for YouTube URLs, showcase excellent attention to detail.
  • Unified DTO Reuse: Moving AssetReferenceDto into a shared base DTO file is a great refactoring choice that prevents duplication between Veo and Imagen.

Comment thread backend/src/images/imagen_service.py
Comment thread backend/src/media_templates/media_templates_service.py
Comment thread backend/src/common/media_utils.py
Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts
…s, and improve security for safe URL sanitization

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This pull request successfully introduces a feature-rich "Video to Image" generation mode, enabling both local video assets and external YouTube URLs to serve as visual reference inputs for Gemini. The overall architectural design, clean database migration files, and comprehensive backend tests demonstrate an exceptional level of engineering quality and attention to detail.

🔍 General Feedback

  • Excellent Component Architecture: The encapsulation of YouTube link extraction, thumbnail rendering, and URL normalization inside specialized utility files and standalone components is very clean and highly maintainable.
  • Reactivity Best Practices: The thorough usage of Angular Signals (signal, computed) in the YouTubeInputComponent completely satisfies the reactivity guidelines and guards against common UI state inconsistencies.
  • Type Safety Improvement: In backend/src/images/imagen_service.py (line 476), the function signature of gemini_generate_image specifies -> types.GeneratedImage | None, but the function returns a tuple of (GeneratedImage, GroundingMetadata) in its actual return paths. Consider updating this type annotation to tuple[types.GeneratedImage | None, dict | None] to ensure complete consistency with static typings and IDE autocompletions.

Comment thread frontend/src/app/common/pipes/safe-url.pipe.ts
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