Skip to content

Conversation

vishalvivekm
Copy link
Contributor

Description

This PR fixes #

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copy link

netlify bot commented Jun 7, 2025

Deploy Preview for mesheryio-preview ready!

Name Link
🔨 Latest commit ccc7282
🔍 Latest deploy log https://app.netlify.com/projects/mesheryio-preview/deploys/68472145894d6b0008d60d5b
😎 Deploy Preview https://deploy-preview-2217--mesheryio-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Hello @vishalvivekm, 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!

Summary of Changes

As gemini-code-assist, I've reviewed this pull request from @vishalvivekm. The primary intent of this PR is to lay the groundwork for supporting 'contributed' or 'custom' models within the site's catalog. This involves configuring the site's static generator (likely Jekyll, based on the file structure) to recognize a new collection for these models and updating existing pages to include them in the displayed lists. Additionally, a template file is introduced to guide the definition of new custom models.

Highlights

  • New Collection Configuration: Configuration files (_config.yml, _config_dev.yml) have been updated to define a new collection named custom-models. This collection is configured to output pages with a permalink structure under /catalog/models/.
  • Include Custom Models in Catalog Views: The Liquid templating logic in _includes/partials/catalog-feature.html and collections/_pages/models.html has been modified to concatenate the new site.custom-models collection with the existing site.models, ensuring that custom models appear alongside standard models in the catalog views.
  • Custom Model Definition Template: A new markdown file (collections/_custom-models/_custom-model-definition-template.md) has been added. This file serves as a template, outlining the required front matter fields and structure for defining individual custom models.
  • Contributors Collection Output Disabled: As a side effect (or possibly related cleanup), the output for the contributors collection has been explicitly disabled in both _config.yml and _config_dev.yml.

Changelog

Click here to see the changelog
  • _config.yml
    • Disabled output for the contributors collection (around line 47).
    • Added configuration for the new custom-models collection, enabling output and setting its permalink (around line 70).
  • _config_dev.yml
    • Disabled output for the contributors collection (around line 46).
    • Added configuration for the new custom-models collection, enabling output and setting its permalink (around line 69).
  • _includes/partials/catalog-feature.html
    • Updated the models variable assignment to include site.custom-models using the concat filter (around line 211).
  • collections/_custom-models/_custom-model-definition-template.md
    • Added a new file providing a markdown template for defining custom models, including front matter for metadata like name, icons, description, components, etc.
  • collections/_pages/models.html
    • Updated the models variable assignment to include site.custom-models using the concat filter (around line 8).
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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 introduces a new Jekyll collection custom-models to allow for contributed models, which is a good step towards extending the catalog. The setup for this new collection in _config.yml, _config_dev.yml, and its integration into catalog-feature.html and models.html appear correct.

However, there are a few areas that need attention:

  1. Context for Changes: The pull request description is minimal ("This PR fixes #") and doesn't link to a specific issue or provide context for all changes, especially the modification to the contributors collection. Please update the PR description with more details.
  2. Contributor Workflow: The "Signed commits" checkbox in the PR description is unchecked. Please ensure all commits are signed off according to the project's contribution guidelines.
  3. Template Usability: The new _custom-model-definition-template.md contains several hardcoded values and APISIX-specific examples that could be generalized for better reusability and to prevent errors.

Detailed comments are provided below.

Summary of Findings

  • Context and Impact of contributors Collection Change: The contributors collection output and its permalink have been removed in _config.yml and _config_dev.yml. Clarification is needed on whether this is an intended change and if its impact on existing site functionality (like contributor pages) has been assessed. (Severity: high)
  • Hardcoded Counts in Model Template: componentsCount and relationshipsCount are hardcoded in _custom-model-definition-template.md. If these values are used for display, they will likely be incorrect for new models unless meticulously manually updated, leading to potential data inaccuracies. These should ideally be dynamically calculated or clearly marked for manual update if dynamic calculation isn't feasible. (Severity: high)
  • APISIX-Specific Placeholders in Generic Model Template: The _custom-model-definition-template.md uses APISIX-specific examples for many fields (icons, URLs, component names, feature lists). This can be confusing and error-prone for users creating models for different integrations. Placeholders should be more generic or very clearly marked as examples requiring replacement. (Severity: medium)
  • Empty or Ambiguous Fields in Model Template: Fields like name, subtitle are empty, and registrant is hardcoded. Adding TODO comments or more generic placeholders would improve the template's usability. (Severity: medium)
  • Missing Newline at EOF in Template: The new file collections/_custom-models/_custom-model-definition-template.md is missing a final newline character. While often tolerated, some tools or linters might flag this. (Severity: low - not commented inline due to review settings).

Merge Readiness

This PR makes good progress on setting up functionality for contributed models. However, before it's ready for merging, I recommend the following:

  1. Provide Context: Please update the PR description to explain all changes, especially the removal of the contributors collection output, and link any relevant issue(s).
  2. Address Template Issues: The _custom-model-definition-template.md should be revised to remove or generalize hardcoded counts and APISIX-specific placeholders to make it more robust and user-friendly.
  3. Sign Commits: Ensure all commits are signed off as per the project's DCO requirements.

Due to the high-severity concerns regarding the contributors collection change and the template's hardcoded values, I suggest these points be addressed. As a reviewer, I am not authorized to approve the pull request; please ensure further review and approval by maintainers after these changes are considered.

vishalvivekm and others added 2 commits June 9, 2025 17:27
Signed-off-by: vishalvivekm <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Vivek Vishal <[email protected]>
<a href="https://github.com/meshery/meshery.io/blob/master/collections/_custom-models/_custom-model-definition-template.md" target="_blank">template</a>
for reference) to the <code>collections/_custom-models</code> directory.
</li>
<li>Add your model tar file to the <code>assets/modelfiles</code> directory.</li>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
<li>Add your model tar file to the <code>assets/modelfiles</code> directory.</li>
<li>Add your model tar file to the <code>assets/modelFiles</code> directory.</li>

Vivek Vishal added 2 commits June 9, 2025 23:15
@vishalvivekm
Copy link
Contributor Author

@M-DEV-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant