Skip to content

fix(vtex): filter unavailable items in PDPDefaultPath#1637

Merged
guitavano merged 1 commit into
mainfrom
fix/pdp-default-path-hide-unavailable
Jul 9, 2026
Merged

fix(vtex): filter unavailable items in PDPDefaultPath#1637
guitavano merged 1 commit into
mainfrom
fix/pdp-default-path-hide-unavailable

Conversation

@guitavano

@guitavano guitavano commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switch PDPDefaultPath from legacy to intelligent search productList
  • Enable hideUnavailableItems: true to prevent out-of-stock products from being returned as default PDP paths

Test plan

  • Verify that PDPDefaultPath returns only available products
  • Confirm product detail pages load correctly when no slug is provided

🤖 Generated with Claude Code


Summary by cubic

Switched PDPDefaultPath to the intelligent search productList and updated parameters (term→query, sort→orders:desc). Enabled hideUnavailableItems so default PDP paths exclude out-of-stock products.

Written for commit 18b04c0. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Updated product listing behavior to use the newer search experience, improving how default product pages load and display results.
    • Search results now respect the configured item count, use a more consistent sort order, and hide unavailable items by default.

Switch from legacy to intelligent search productList and enable
hideUnavailableItems to prevent unavailable products from being
returned as default PDP paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 9, 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

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5ec75132-75b7-4e8c-9220-665a00d73bb9

📥 Commits

Reviewing files that changed from the base of the PR and between b562530 and 18b04c0.

📒 Files selected for processing (1)
  • vtex/loaders/paths/PDPDefaultPath.ts

📝 Walkthrough

Walkthrough

PDPDefaultPath.ts now imports productList from the intelligentSearch module instead of legacy. The loader's request to productList changed from term/sort fields to query, count, sort ("orders:desc"), and hideUnavailableItems: true.

Changes

PDP Default Path Source Switch

Layer / File(s) Summary
Switch import and update request params
vtex/loaders/paths/PDPDefaultPath.ts
Import source changed to intelligent-search productList; request payload updated to use query, count, sort "orders:desc", and hideUnavailableItems: true.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and test plan, but it omits the required Issue Link, Loom Video, and Demonstration Link sections. Add the missing template sections and provide the issue link, Loom video, and demonstration link, or mark them as unavailable if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: filtering unavailable items in PDPDefaultPath.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pdp-default-path-hide-unavailable

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.

@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 1 file

Re-trigger cubic

@guitavano guitavano merged commit 6bcf985 into main Jul 9, 2026
9 checks passed
@guitavano guitavano deleted the fix/pdp-default-path-hide-unavailable branch July 9, 2026 19:19
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