Skip to content

fix(seo): set og:type=product on product detail pages#1636

Open
igoramf wants to merge 2 commits into
mainfrom
fix/og-type-product-v2
Open

fix(seo): set og:type=product on product detail pages#1636
igoramf wants to merge 2 commits into
mainfrom
fix/og-type-product-v2

Conversation

@igoramf

@igoramf igoramf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds "product" to the OGType union in website/components/Seo.tsx
  • SeoPDPV2 loader now explicitly returns type: "product" so PDPs emit the correct Open Graph type instead of inheriting "website" from site config

Root cause

OGType only had "website" | "article". SeoPDPV2 spreads ctx.seo props (which default to type: "website") without overriding the type, so every PDP rendered <meta property="og:type" content="website">.

Test plan

  • Load a PDP with ?__decoFBT=0 and inspect og:type in page source — should be product
  • Home/category pages unaffected (still use SeoCategoryV2 / SeoPLP)

🤖 Generated with Claude Code


Summary by cubic

Fix PDPs emitting og:type=website by defaulting to og:type=product.

Adds product to the OGType union and exposes a type prop in SeoPDPV2 (defaults to product) so sections can override as needed; other pages are unchanged.

Written for commit 9cca3c9. Summary will update on new commits.

Review in cubic

SeoPDPV2 was inheriting og:type from site-level config (usually "website").
Adds "product" to OGType union and explicitly sets type="product" in the
SeoPDPV2 loader so PDPs emit the correct Open Graph type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@igoramf, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34fc0a5a-88fe-4ec3-896a-a175a81a7478

📥 Commits

Reviewing files that changed from the base of the PR and between b562530 and 9cca3c9.

📒 Files selected for processing (2)
  • commerce/sections/Seo/SeoPDPV2.tsx
  • website/components/Seo.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/og-type-product-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.159.2 update
  • 🎉 for Minor 0.160.0 update
  • 🚀 for Major 1.0.0 update

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="website/components/Seo.tsx">

<violation number="1" location="website/components/Seo.tsx:10">
P3: Discord and Slack admin preview components render an empty div when OG type is "product". The preview UI won't show a preview card for PDPs in the admin panel. Add a `type === "product"` branch (or broaden the fallback) in both components so the admin preview still shows content for product pages.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic


export type SEOSection = JSX.Element;
export type OGType = "website" | "article";
export type OGType = "website" | "article" | "product";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Discord and Slack admin preview components render an empty div when OG type is "product". The preview UI won't show a preview card for PDPs in the admin panel. Add a type === "product" branch (or broaden the fallback) in both components so the admin preview still shows content for product pages.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At website/components/Seo.tsx, line 10:

<comment>Discord and Slack admin preview components render an empty div when OG type is "product". The preview UI won't show a preview card for PDPs in the admin panel. Add a `type === "product"` branch (or broaden the fallback) in both components so the admin preview still shows content for product pages.</comment>

<file context>
@@ -7,7 +7,7 @@ export const renderTemplateString = (template: string, value: string) =>
 
 export type SEOSection = JSX.Element;
-export type OGType = "website" | "article";
+export type OGType = "website" | "article" | "product";
 
 export interface Props {
</file context>

Adds "product" to OGType union and exposes type as a configurable prop
in SeoPDPV2 so admins can override per section. Defaults to "product"
since site-level config spreads "website" to all pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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