fix(seo): set og:type=product on product detail pages#1636
Conversation
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>
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Tagging OptionsShould a new tag be published when this PR is merged?
|
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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>
Summary
"product"to theOGTypeunion inwebsite/components/Seo.tsxSeoPDPV2loader now explicitly returnstype: "product"so PDPs emit the correct Open Graph type instead of inheriting"website"from site configRoot cause
OGTypeonly had"website" | "article".SeoPDPV2spreadsctx.seoprops (which default totype: "website") without overriding the type, so every PDP rendered<meta property="og:type" content="website">.Test plan
?__decoFBT=0and inspectog:typein page source — should beproductSeoCategoryV2/SeoPLP)🤖 Generated with Claude Code
Summary by cubic
Fix PDPs emitting
og:type=websiteby defaulting toog:type=product.Adds
productto theOGTypeunion and exposes atypeprop inSeoPDPV2(defaults toproduct) so sections can override as needed; other pages are unchanged.Written for commit 9cca3c9. Summary will update on new commits.