Skip to content

fix smarthing productListingPage - #1547

Merged
guitavano merged 1 commit into
mainfrom
tavano/fix-smarthint
Mar 5, 2026
Merged

guitavano merged 1 commit into
mainfrom
tavano/fix-smarthint

Conversation

@guitavano

@guitavano guitavano commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Ensures SmartHint product listing always sets a valid productID, preventing PLP errors when specificationId is missing.

  • Bug Fixes
    • Fallback to product.ProductId when firstAvailable.specificationId is absent in smarthint/utils/transform.ts.

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

Summary by CodeRabbit

  • Bug Fixes

    • Improved robustness for handling missing product specification IDs with fallback values
  • Style

    • Applied minor formatting and indentation adjustments across components

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Tagging Options

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

  • 👍 for Patch 0.139.2 update
  • 🎉 for Minor 0.140.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1680d8ab-94d0-40fc-bfd6-380fc8a53975

📥 Commits

Reviewing files that changed from the base of the PR and between dd69419 and 9afddb4.

📒 Files selected for processing (3)
  • blog/sections/Template.tsx
  • smarthint/utils/transform.ts
  • vtex/middleware.ts

📝 Walkthrough

Walkthrough

This PR includes minor formatting adjustments across three files (spacing in JSX, indentation in middleware) alongside a null-safety enhancement in the product transform utility that adds a fallback mechanism for missing specification IDs.

Changes

Cohort / File(s) Summary
Formatting & Spacing
blog/sections/Template.tsx, vtex/middleware.ts
Minor formatting adjustments: corrected link tag spacing and indentation reformatting in isLoggedIn calculation with trailing comma.
Null-Safety Enhancement
smarthint/utils/transform.ts
Updated productID field assignment to handle missing firstAvailable specificationId using optional chaining with fallback to product.ProductId.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • mcandeia

Poem

🐰 A hop, a skip, through spacing so fine,
With formats aligned and null-checks divine,
The product now graceful when specs disappear,
Small tweaks, big impact—the code's crystal clear!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tavano/fix-smarthint

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 and usage tips.

@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.

No issues found across 3 files

@guitavano
guitavano merged commit ef1edfe into main Mar 5, 2026
5 of 7 checks passed
@guitavano
guitavano deleted the tavano/fix-smarthint branch March 5, 2026 19:57
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.

2 participants