Skip to content

Fix(VTEX): Remove unwanted leading slash#1529

Merged
guitavano merged 2 commits intodeco-cx:mainfrom
vitoUwu:fix/vtex-facets-to-path
Feb 11, 2026
Merged

Fix(VTEX): Remove unwanted leading slash#1529
guitavano merged 2 commits intodeco-cx:mainfrom
vitoUwu:fix/vtex-facets-to-path

Conversation

@vitoUwu
Copy link
Contributor

@vitoUwu vitoUwu commented Feb 11, 2026

What is this Contribution About?

Please provide a brief description of the changes or enhancements you are proposing in this pull request.

Issue Link

Please link to the relevant issue that this pull request addresses:

Loom Video

Record a quick screencast describing your changes to help the team understand and review your contribution. This will greatly assist in the review process.

Demonstration Link

Provide a link to a branch or environment where this pull request can be tested and seen in action.


Summary by cubic

Removed the unwanted leading slash in VTEX facet path generation and now skip empty facet keys in toPath to avoid malformed URLs.

Written for commit 339c93f. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor
    • Improved search path formatting: facets without keys are now rendered using just their value, while keyed facets keep key/value pairs—resulting in more consistent and readable search paths across the application.

@github-actions
Copy link
Contributor

Tagging Options

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

  • 👍 for Patch 0.134.3 update
  • 🎉 for Minor 0.135.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Updated toPath in intelligent search utilities to handle facets with missing keys: when a facet has a key it emits key/value, otherwise it emits only value, preserving path structure while changing string construction.

Changes

Cohort / File(s) Summary
Intelligent search util
vtex/utils/intelligentSearch.ts
Modified toPath to emit key/value when key is present, otherwise emit only value for facets with missing keys. (Lines changed: +1/-1)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇
I nibbled at facets, both tidy and loose,
If keys were there, I paired them like juice.
Missing a key? I shouted "No fray!"
Just the value I left on the way.
Hop, hop — paths now mind their own cues.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description contains required template sections with headers, but most placeholder fields (issue link, Loom video, demonstration link) remain unfilled. However, an auto-generated summary provides concrete detail about the change. Complete the template by filling in the issue link, providing a Loom video screencast, and adding a demonstration link to facilitate review.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix(VTEX): Remove unwanted leading slash' directly matches the main change—fixing facet path generation by skipping empty keys to remove unwanted leading slashes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

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

@guitavano guitavano merged commit af5a216 into deco-cx:main Feb 11, 2026
4 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.

2 participants