Skip to content

Fixed: Shopify listing display and Solr parsing mismatch#365

Merged
dt2patel merged 2 commits into
mainfrom
fix-solr
Mar 13, 2026
Merged

Fixed: Shopify listing display and Solr parsing mismatch#365
dt2patel merged 2 commits into
mainfrom
fix-solr

Conversation

@dt2patel
Copy link
Copy Markdown
Contributor

This PR fixes the issue where Shopify listing data and promise dates were not displaying in the product audit view. It improves variant ID lookups, handles shop-specific Solr filters, and adds safety checks for parsing Shopify sync records.

Key changes:

  • Corrected Solr filter format for Shopify variant GIDs.
  • Expanded operation filter to include store-specific shop IDs.
  • Added safety checks for missing metafield data to prevent UI crashes.
  • Implemented fallback for variant identification retrieval.

…variant ID lookup, enhance Solr query for preorder sync, and robustify Solr response parsing.
@gemini-code-assist
Copy link
Copy Markdown

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 addresses an issue where Shopify listing data and promise dates were not correctly displayed in the product audit view. It enhances the application's ability to retrieve and parse Shopify sync records by improving variant ID lookups, handling shop-specific Solr filters, and adding robust safety checks for potentially missing metafield data, thereby preventing UI errors and ensuring accurate data presentation.

Highlights

  • Solr Filter Correction: Corrected the Solr filter format for Shopify variant GIDs to ensure accurate data retrieval.
  • Expanded Operation Filter: Expanded the Solr operation filter to include store-specific shop IDs, allowing for more precise data queries.
  • Metafield Data Safety Checks: Added safety checks for missing metafield data during parsing to prevent UI crashes and improve stability.
  • Variant Identification Fallback: Implemented a fallback mechanism for variant identification retrieval, making the process more robust.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/views/audit-product-details.vue
    • Refactored the 'features' data property from an array to an object to better manage product features.
    • Introduced a 'visibleFeatures' computed property to dynamically filter and display relevant product features in the UI.
    • Implemented a fallback mechanism for Shopify variant ID retrieval, ensuring that product identification is more resilient even when specific shop IDs are not immediately available.
    • Updated the Solr query filter to correctly handle Shopify variant GIDs and to include shop-specific operations, improving data retrieval accuracy.
    • Added null/undefined checks for 'metafieldValueList' and 'contains_error' fields when parsing Solr response data, enhancing the robustness of data processing.
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
Copy Markdown

@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 effectively addresses issues with Shopify listing displays and Solr parsing. The changes, including corrected Solr filter formats, improved variant ID lookups with fallbacks, and added safety checks for parsing Shopify sync records, are well-implemented and enhance the application's robustness. I have a couple of suggestions to further improve type safety and code reuse.

Comment thread src/views/audit-product-details.vue Outdated
Comment on lines +460 to +462
visibleFeatures(): any {
return Object.entries(this.features).filter(([, featureOptions]: any) => featureOptions.length > 1);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For better type safety and code clarity, it's recommended to avoid using any. Based on how features is populated, you can use more specific types for the computed property's return value and its filter callback.

    visibleFeatures(): [string, string[]][] {
      return Object.entries(this.features).filter(([, featureOptions]: [string, string[]]) => featureOptions.length > 1);
    }

Comment thread src/views/audit-product-details.vue Outdated
Comment on lines +1073 to +1079
} else {
// Fallback to searching for any shopify variant ID if specific one is not found
const shopifyIdentification = this.currentVariant.goodIdentifications?.find((id: string) => id.startsWith('ShopifyShopProduct/'));
if (shopifyIdentification) {
shopifyShop.variantProductId = shopifyIdentification.split('/')[2];
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The fallback logic to find a Shopify variant ID is very similar to the existing getProductIdentificationId method. To promote code reuse and ensure consistent handling of edge cases (like splitting the identification string), you could reuse that method here for the fallback.

          } else {
            // Fallback to searching for any shopify variant ID if specific one is not found
            const fallbackVariantProductId = this.getProductIdentificationId(this.currentVariant.goodIdentifications, 'ShopifyShopProduct/');
            if (fallbackVariantProductId) {
              shopifyShop.variantProductId = fallbackVariantProductId;
            }
          }

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fbdf46a28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/views/audit-product-details.vue Outdated
Comment on lines +1075 to +1077
const shopifyIdentification = this.currentVariant.goodIdentifications?.find((id: string) => id.startsWith('ShopifyShopProduct/'));
if (shopifyIdentification) {
shopifyShop.variantProductId = shopifyIdentification.split('/')[2];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Stop reusing another shop’s variant ID as fallback

In prepareShopListings, the new fallback uses the first ShopifyShopProduct/* identification when the current shopId mapping is missing, so a store without its own mapping can end up querying Solr with a different store’s Shopify variant ID. That produces incorrect listing/promise-date data for the wrong shop instead of leaving the shop as unmapped, which directly corrupts the audit view for multi-store variants where one store mapping is absent.

Useful? React with 👍 / 👎.

@dt2patel dt2patel merged commit 8f76e72 into main Mar 13, 2026
2 checks passed
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