Skip to content

Feat/og image generation#1996

Merged
seferturan merged 6 commits into
mainfrom
feat/og_image_generation
Mar 31, 2026
Merged

Feat/og image generation#1996
seferturan merged 6 commits into
mainfrom
feat/og_image_generation

Conversation

@seferturan
Copy link
Copy Markdown
Contributor

@seferturan seferturan commented Mar 31, 2026

🎶 Notes 🎶

  • Fixes [Tech Enabler] Image sharing processing #1937
  • Adds share card which can be used to generated og images and such.
    • Quick v0 of the open-graph design; we can tweak as we test.
  • Adds enpoint to test image generation.
  • Testable with:
    • http://localhost:5173/api/shareable-image?variant=open-graph&type=show&slug=game-of-thrones
    • Optionally, debug=true can be added
    • Only available when IS_DEV is true.

👀 Examples 👀

got hailmary hoppers menace sendhelp

Debug example:
debug

@trakt-bot trakt-bot Bot enabled auto-merge (rebase) March 31, 2026 11:46
Comment thread projects/client/src/routes/api/shareable-image/+server.ts Fixed
@seferturan seferturan force-pushed the feat/og_image_generation branch from dfcca26 to 3f6c847 Compare March 31, 2026 11:49
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces functionality to generate dynamic Open Graph images for media content, addressing issue #1937. It adds a new share card UI component and a corresponding API endpoint that leverages the @ethercorps/sveltekit-og library to render and serve these images. Additionally, it includes minor improvements to query execution logic to support the new functionality.

Highlights

  • Open Graph Image Generation: Implemented a new share card component and an API endpoint to dynamically generate Open Graph images for media items.
  • Dependency Updates: Added @ethercorps/sveltekit-og and its associated dependencies to handle image generation and rendering.
  • Query Execution Improvements: Updated defineQuery to expose an execute method, allowing for more flexible manual triggering of queries.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a feature to generate shareable Open Graph images using the @ethercorps/sveltekit-og library, adding a new API endpoint and several Svelte components for the image layout. The review feedback highlights several opportunities to improve code robustness, such as handling potential undefined values in media data and validating fetch responses. Additionally, the feedback points out style guide violations regarding constant naming and the use of the Nil type, and suggests using the project's i18n system for localized formatting while ensuring API error responses do not leak sensitive information.

Comment thread projects/client/src/lib/features/share/_internal/MainCredit.svelte
Comment thread projects/client/src/routes/api/shareable-image/+server.ts
Comment thread projects/client/src/lib/features/query/defineQuery.ts Outdated
Comment thread projects/client/src/lib/features/query/defineQuery.ts Outdated
Comment thread projects/client/src/lib/features/share/ShareCard.svelte
Comment thread projects/client/src/lib/features/share/ShareCard.svelte
Comment thread projects/client/src/lib/features/share/_internal/RatingsList.svelte
Comment thread projects/client/src/routes/api/shareable-image/+server.ts
Comment thread projects/client/src/routes/api/shareable-image/_internal/fetchPosterDataUri.ts Outdated
@seferturan seferturan force-pushed the feat/og_image_generation branch from 3f6c847 to 11f9fa9 Compare March 31, 2026 12:42
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented Mar 31, 2026

DeepSource Code Review

We reviewed changes in 3cd7a2a...4ca93c1 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Mar 31, 2026 3:24p.m. Review ↗
Test coverage Mar 31, 2026 3:24p.m. Review ↗

Code Coverage Summary

Language Line Coverage (Overall)
Aggregate
80.5%
Javascript
80.5%

➟ Additional coverage metrics may have been reported. See full coverage report ↗

@seferturan seferturan requested a review from vladjerca March 31, 2026 12:59
@seferturan seferturan disabled auto-merge March 31, 2026 14:39
@seferturan seferturan marked this pull request as draft March 31, 2026 14:39
@seferturan seferturan force-pushed the feat/og_image_generation branch from 11f9fa9 to 2a7de7d Compare March 31, 2026 15:20
@seferturan seferturan marked this pull request as ready for review March 31, 2026 15:22
@seferturan seferturan force-pushed the feat/og_image_generation branch from 2a7de7d to 4ca93c1 Compare March 31, 2026 15:22
@seferturan seferturan enabled auto-merge (rebase) March 31, 2026 15:22
@seferturan seferturan merged commit ca9513b into main Mar 31, 2026
17 of 19 checks passed
@seferturan seferturan deleted the feat/og_image_generation branch March 31, 2026 20:39
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.

[Tech Enabler] Image sharing processing

3 participants