Skip to content

chore: Rename Webchat to Shopping Assistant and implement new component - #3247

Merged
eduardoformiga merged 1 commit into
devfrom
chore/change-webchat-name-to-shopping-assistant
Mar 26, 2026
Merged

eduardoformiga merged 1 commit into
devfrom
chore/change-webchat-name-to-shopping-assistant

Conversation

@eduardoformiga

@eduardoformiga eduardoformiga commented Mar 26, 2026 •

Copy link
Copy Markdown
Member
  • Updated sections.json to reflect the name change from "Webchat" to "ShoppingAssistant" with updated descriptions.
  • Replaced useWebchatScript with useShoppingAssistant in ThirdPartyScripts.
  • Introduced a new useShoppingAssistant hook to manage script injection for the Shopping Assistant.
  • Created a new Shopping Assistant component with corresponding styles and structure.
  • Removed the old Webchat component and its references.

This change enhances the user experience by providing a dedicated Shopping Assistant feature.

What's the purpose of this pull request?

How it works?

How to test it?

Starters Deploy Preview

References

Checklist

You may erase this after checking them all 😉

PR Title and Commit Messages

  • PR title and commit messages follow the Conventional Commits specification
    • Available prefixes: feat, fix, chore, docs, style, refactor, ci and test

PR Description

  • Added a label according to the PR goal - breaking change, bug, contributing, performance, documentation..

Dependencies

  • Committed the pnpm-lock.yaml file when there were changes to the packages

Documentation

  • PR description
  • For documentation changes, ping @Mariana-Caetano to review and update (Or submit a doc request)

Summary by CodeRabbit

  • Documentation
    • Renamed CMS section from "Webchat" to "Shopping Assistant."
    • Updated section title and description with new setup instructions pointing to the Agentic CX Dashboard.

- Updated sections.json to reflect the name change from "Webchat" to "ShoppingAssistant" with updated descriptions.
- Replaced `useWebchatScript` with `useShoppingAssistant` in ThirdPartyScripts.
- Introduced a new `useShoppingAssistant` hook to manage script injection for the Shopping Assistant.
- Created a new Shopping Assistant component with corresponding styles and structure.
- Removed the old Webchat component and its references.

This change enhances the user experience by providing a dedicated Shopping Assistant feature.
@eduardoformiga
eduardoformiga requested a review from a team as a code owner March 26, 2026 23:04
@eduardoformiga
eduardoformiga requested review from emersonlaurentino and lemagnetic and removed request for a team March 26, 2026 23:04
@coderabbitai

coderabbitai Bot commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

This PR renames the Webchat feature to ShoppingAssistant across the codebase, including section configuration metadata, hook exports, component registrations, and file structure. The old Webchat component is removed and replaced with a new ShoppingAssistant component that maintains the same functionality.

Changes

Cohort / File(s) Summary
Section Configuration
packages/core/cms/faststore/sections.json
Updated section identifier from "Webchat" to "ShoppingAssistant" with revised title and description pointing to Agentic CX Dashboard for setup.
Hook Exports & Implementation
packages/core/src/components/ThirdPartyScripts/index.ts, packages/core/src/components/ThirdPartyScripts/useShoppingAssistant.tsx
Renamed exported hook from useWebchatScript to useShoppingAssistant and updated constant name from WEBCHAT_SCRIPT_URL to SHOPPING_ASSISTANT_SCRIPT_URL.
Component Registry
packages/core/src/components/cms/global/Components.ts
Updated dynamic component mapping by removing Webchat entry and adding ShoppingAssistant, with corresponding lazy-load path and webpack chunk name updates.
New ShoppingAssistant Component
packages/core/src/components/sections/ShoppingAssistant/ShoppingAssistant.tsx, packages/core/src/components/sections/ShoppingAssistant/index.ts
Added new ShoppingAssistant component with identical structure to replaced Webchat—creates ref, invokes hook, renders hidden container element with proper styling and accessibility attributes.
Removed Webchat Component
packages/core/src/components/sections/Webchat/Webchat.tsx, packages/core/src/components/sections/Webchat/index.ts
Deleted old Webchat component and its re-export entry point.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • vtex/faststore#3242: Directly related—renames Webchat component and hook to ShoppingAssistant across the same files and functions.

Suggested reviewers

  • renatomaurovtex
  • lemagnetic
  • ommeirelles

Poem

🛍️ Webchat fades to memory's shore,
Shopping Assistant takes the floor,
Hooks renamed, components aligned,
Agentic futures, carefully designed! 🤖

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: renaming Webchat to Shopping Assistant and implementing the new component structure across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ 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 chore/change-webchat-name-to-shopping-assistant

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.

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/core/src/components/ThirdPartyScripts/useShoppingAssistant.tsx (1)

14-29: Consider adding async or defer to the script for better loading performance.

The script is injected without async or defer, which means it could block HTML parsing. Unless the Shopping Assistant script requires synchronous loading for initialization, adding script.async = true would improve page load performance.

💡 Optional performance improvement
     const script = document.createElement('script')
     script.src = SHOPPING_ASSISTANT_SCRIPT_URL
+    script.async = true
     const container = containerRef?.current
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/components/ThirdPartyScripts/useShoppingAssistant.tsx`
around lines 14 - 29, The injected Shopping Assistant script in
useShoppingAssistant (creating `script` with `SHOPPING_ASSISTANT_SCRIPT_URL` and
attaching to `containerRef`) is missing async/defer; set `script.async = true`
(or `script.defer = true` if the script must execute after parsing) before
appending to `containerRef.current` or `document.head` to avoid blocking HTML
parsing, keeping the same cleanup that calls `script.remove()` in the returned
effect cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/core/src/components/ThirdPartyScripts/useShoppingAssistant.tsx`:
- Around line 14-29: The injected Shopping Assistant script in
useShoppingAssistant (creating `script` with `SHOPPING_ASSISTANT_SCRIPT_URL` and
attaching to `containerRef`) is missing async/defer; set `script.async = true`
(or `script.defer = true` if the script must execute after parsing) before
appending to `containerRef.current` or `document.head` to avoid blocking HTML
parsing, keeping the same cleanup that calls `script.remove()` in the returned
effect cleanup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d3e7735f-c05b-431a-b828-5e0d384a606b

📥 Commits

Reviewing files that changed from the base of the PR and between 937b0d8 and c6ffb69.

📒 Files selected for processing (9)
  • packages/core/cms/faststore/sections.json
  • packages/core/src/components/ThirdPartyScripts/index.ts
  • packages/core/src/components/ThirdPartyScripts/useShoppingAssistant.tsx
  • packages/core/src/components/cms/global/Components.ts
  • packages/core/src/components/sections/ShoppingAssistant/ShoppingAssistant.tsx
  • packages/core/src/components/sections/ShoppingAssistant/index.ts
  • packages/core/src/components/sections/ShoppingAssistant/section.module.scss
  • packages/core/src/components/sections/Webchat/Webchat.tsx
  • packages/core/src/components/sections/Webchat/index.ts
💤 Files with no reviewable changes (2)
  • packages/core/src/components/sections/Webchat/index.ts
  • packages/core/src/components/sections/Webchat/Webchat.tsx

@eduardoformiga
eduardoformiga merged commit 952d20b into dev Mar 26, 2026
3 checks passed
@eduardoformiga
eduardoformiga deleted the chore/change-webchat-name-to-shopping-assistant branch March 26, 2026 23:18
eduardoformiga added a commit that referenced this pull request Apr 14, 2026
…nt (#3247)

- Updated sections.json to reflect the name change from "Webchat" to
"ShoppingAssistant" with updated descriptions.
- Replaced `useWebchatScript` with `useShoppingAssistant` in
ThirdPartyScripts.
- Introduced a new `useShoppingAssistant` hook to manage script
injection for the Shopping Assistant.
- Created a new Shopping Assistant component with corresponding styles
and structure.
- Removed the old Webchat component and its references.

This change enhances the user experience by providing a dedicated
Shopping Assistant feature.

<!--- Considering the context, what is the problem we'll solve? Where in
VTEX's big picture our issue fits in? Write a tweet about the context
and the problem itself. --->

<!--- Tell us the role of the new feature, or component, in its context.
Provide details about what you have implemented and screenshots if
applicable. --->

<!--- Describe the steps with bullet points. Is there any external link
that can be used to better test it or an example? --->

<!--- Add a link to a deploy preview from `starter.store` with this
branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

<!--- Spread the knowledge: is there any content you used to create this
PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning
people important to this PR may be good for the documentation and
reviewing process --->

<em>You may erase this after checking them all 😉</em>

**PR Title and Commit Messages**

- [ ] PR title and commit messages follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`,
`refactor`, `ci` and `test`

**PR Description**

- [ ] Added a label according to the PR goal - `breaking change`, `bug`,
`contributing`, `performance`, `documentation`..

**Dependencies**

- [ ] Committed the `pnpm-lock.yaml` file when there were changes to the
packages

**Documentation**

- [ ] PR description
- [ ] For documentation changes, ping `@Mariana-Caetano` to review and
update (Or submit a doc request)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Documentation**
  * Renamed CMS section from "Webchat" to "Shopping Assistant."
* Updated section title and description with new setup instructions
pointing to the Agentic CX Dashboard.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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