Skip to content

Conversation

@Ziedelth
Copy link
Contributor

@Ziedelth Ziedelth commented Jan 5, 2026

No description provided.

@Ziedelth Ziedelth linked an issue Jan 5, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Ziedelth, 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 integrates JSON-LD structured data into the search results template, specifically for TV series. The primary goal is to enhance the discoverability and presentation of TV series content on search engines by providing detailed, schema-compliant metadata. This change leverages existing data structures to automatically populate the structured data, ensuring consistency and reducing manual effort.

Highlights

  • Structured Data Implementation: Introduced JSON-LD structured data for TV series within the search results page.
  • SEO Enhancement: Improved search engine optimization by providing rich, machine-readable information about TV series, potentially leading to better search result displays.
  • Dynamic Data Generation: The structured data is dynamically generated using existing anime object properties, ensuring up-to-date and relevant information for each TV series entry.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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
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 adds structured data (JSON-LD) for TV series on the search results page. The implementation correctly adds a script tag with application/ld+json for each search result. However, the logic to generate the JSON-LD object is implemented in client-side JavaScript, which duplicates existing server-side logic found in src/main/resources/templates/site/seo/json-ld.ftl. This creates a maintainability concern, as any changes to the JSON-LD structure would need to be made in two different places. My review includes a suggestion to refactor this by centralizing the JSON-LD generation logic in the backend to ensure a single source of truth.

@Ziedelth Ziedelth force-pushed the 1219-json-ld-anime-search branch from 40afde4 to f3e4d1e Compare January 5, 2026 13:23
@Ziedelth
Copy link
Contributor Author

Ziedelth commented Jan 5, 2026

/gemini review

Copy link
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 refactors the JSON-LD generation by moving the logic from Freemarker templates to a dedicated Kotlin JsonLdBuilder service. This is a great improvement for maintainability and separation of concerns. The implementation is well-done, using data classes to model the schema and Gson for serialization. I've found one issue where the list of platforms in the generated JSON-LD is not filtered correctly, leading to a discrepancy with the UI. A fix is suggested in the detailed comment. Otherwise, the changes look good.

)
seasons = seasons,
platformIds = platforms.filter { showAllPlatforms || it.platform.isStreaming }.toTreeSet(),
).also { dto -> dto.jsonLd = jsonLdBuilder.build(dto, seasons, platforms) }
Copy link
Contributor

Choose a reason for hiding this comment

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

high

There is a bug here. The JsonLdBuilder.build method is called with the original, unfiltered platforms set. However, the AnimeDto's platformIds property is assigned a filtered set of platforms on the previous line. This causes a discrepancy where the generated JSON-LD for search engines includes all platforms (even non-streaming ones when they should be hidden), while the UI shows a filtered list. The JSON-LD should be consistent with the displayed data.

You can fix this by passing the filtered platformIds from the DTO to the builder, which is available within the also block.

Suggested change
).also { dto -> dto.jsonLd = jsonLdBuilder.build(dto, seasons, platforms) }
).also { dto -> dto.jsonLd = jsonLdBuilder.build(dto, seasons, dto.platformIds ?: emptySet()) }

@Ziedelth Ziedelth force-pushed the 1219-json-ld-anime-search branch from f3e4d1e to a430859 Compare January 5, 2026 13:29
@Ziedelth Ziedelth merged commit 5480c4c into master Jan 5, 2026
7 checks passed
@Ziedelth Ziedelth deleted the 1219-json-ld-anime-search branch January 5, 2026 13:49
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.

JSON LD Anime search

2 participants