Skip to content

✨ Replace WebChat v2 With v3 on Main Branch#100

Merged
cristiantela merged 209 commits into
mainfrom
v3-main
May 7, 2026
Merged

✨ Replace WebChat v2 With v3 on Main Branch#100
cristiantela merged 209 commits into
mainfrom
v3-main

Conversation

@cristiantela
Copy link
Copy Markdown
Collaborator

Description

Type of Change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Tests
  • Other

Motivation and Context

Version 2 of the WebChat widget has been deprecated. This pull request promotes the v3-main branch as the new baseline for main. The v2 codebase will remain available and maintainable under the v2-main branch for any critical hotfixes that may be required.

Summary of Changes

The key changes introduced by v3 include:

UI Redesign

  • Fully redesigned InputBox with updated styles and draft-persistence across unmounts
  • Redesigned Launcher, Widget, Chat, Header, and MessagesList components
  • New ChatPresentation component for the initial chat state
  • Redesigned ThinkingIndicator and updated TypingIndicator styles
  • Removed WaveformVisualizer component; simplified VoiceModeButton
  • Updated ConversationStarters and QuickReplies visuals
  • New icon added: rounded-x (default launcher icon)
  • Updated SCSS design tokens and variables

New Features

  • position parameter added, enabling the widget to be anchored to the bottom-left corner
  • Input draft text preserved in context so it survives InputBox unmounts
  • Suggested questions new behavior: starters are removed on first user interaction even if chat is closed
  • VTEX IO MinicartBridge utility for syncing cart state via setOrderForm
  • addProductToCart integration for VTEX storefronts
  • New VTEX sticky header CSS selectors to prevent the header from overlapping the widget
  • Header z-index override injected on widget mount as a fallback

Bug Fixes & Compatibility

  • Replaced URL.canParse with a try/catch block for broader browser compatibility
  • Fixed automatic textarea height adjustment
  • Fixed ESLint errors across multiple files

cristiantela and others added 10 commits May 6, 2026 11:30
Handle messages of type "file" that arrive with a media_url and
optional caption instead of text. MessageDocument now defensively
reads metadata, falls back to inferring mimeType from the URL
extension, and displays caption when filename is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Cover label fallback chain, mimeType inference from URL extension,
window.open gating by ALLOWED_DOCUMENT_TYPES, direction styling,
and MessageImage anchor (open in new tab) behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
✨ Handle `file` Message Type with mimeType Fallback and Image Open-in-New-Tab
…onent

Remove the count/max display logic from Badge, turning it into a
minimal dot indicator. Move absolute positioning from Launcher into
Badge itself so placement is self-contained.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename the Tooltip component to Notification and move it to
src/components/Notification/. Clicking the notification content now
opens the webchat via onOpen, and long messages are clamped to three
lines. The close button is prevented from shrinking on wide content.
Adds full unit test coverage for all new behaviour.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cristiantela cristiantela merged commit c6b9876 into main May 7, 2026
2 checks passed
@cristiantela cristiantela deleted the v3-main branch May 7, 2026 20:17
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.

3 participants