@gymmymac/bob-widget 3.2.5 → 3.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,75 @@ All notable changes to the `@gymmymac/bob-widget` package will be documented in
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v3.2.14] - 2026-03-09
9
+
10
+ ### Fixed
11
+
12
+ - **onAddToCart payload now includes vehicle_id and bundle metadata** — Both manual product clicks and bundle tier adds now populate `vehicle_id` from the identified vehicle, fixing silent cart drops on CARFIX integration.
13
+ - **Bundle tier adds now carry full metadata** — `MobileProductColumn` and `ServicePackageDetailView` attach `_bundleMeta` (is_bundle_item, bundle_discount_percentage, service_package_name, service_package_id, quality_tier) to every product in a tier add, which `Bob.tsx` spreads into the `CartItem` payload.
14
+ - **Unified add-to-cart handler** — Extracted duplicated inline handlers into a single `handleAddToCart` callback in `Bob.tsx`, eliminating inconsistency between mobile and inline variants.
15
+ - **CartItem type extended** — Added `is_bundle_item`, `bundle_discount_percentage`, `service_package_name`, `service_package_id`, and `quality_tier` fields to match the CARFIX contract.
16
+
17
+ ## [v3.2.13] - 2026-03-09
18
+
19
+ ### Fixed
20
+ - 🛒 **ProductTile Add-to-Cart Button**: Wired `onAddToCart` callback through `ResponsiveProductCard` to `ProductTile` — the green "+" button on partslot product tiles now correctly fires the add-to-cart callback
21
+ - 📜 **Eager Shelf Category Registration**: Service package titles and partslot categories are now populated in `shelfCategoriesRef` during SSE stream processing (on `service_packages_found` / `parts_found` events) instead of waiting for a post-render `useEffect` — fixes auto-scroll failing because `shelfCategories` was empty at match time
22
+
23
+ ---
24
+
25
+ ## [v3.2.12] - 2026-03-09
26
+
27
+ ### Fixed
28
+ - 🛡️ **Anti-Hallucination on Follow-Up Bypass**: The v3.2.11 follow-up bypass skipped [SHELF DATA] injection, causing the LLM to hallucinate brands/products. The bypass path now re-fetches service packages from the API (~1-2s) and injects real tier/price data so Bob only discusses actual inventory
29
+ - 📜 **Service Package Scroll Anchors**: Service package cards now register in `groupRefs` alongside product categories — when Bob mentions "Front Brake Service", the shelf scrolls to that package card instead of doing nothing
30
+ - 📦 **Client Shelf Context**: `useBobChat` now sends a compact `shelfContext` field (comma-separated category names from the shelf) with every request, providing a fallback data source on the bypass path
31
+
32
+ ---
33
+
34
+ ## [v3.2.11] - 2026-03-09
35
+
36
+ ### Fixed
37
+ - ⚡ **Follow-Up Latency**: Extended `canBypassToolLoop` to skip the 3-round-trip tool-calling loop on follow-up requests when vehicle context is already confirmed — reduces "tell me about brake pads" responses from ~25-35s to ~5-8s by eliminating redundant LLM calls for data the client already has on the shelf
38
+
39
+ ---
40
+
41
+ ## [v3.2.10] - 2026-03-09
42
+
43
+ ### Fixed
44
+ - 🎯 **Shelf Category Scoring**: Replaced naive substring matching with word-scoring algorithm — categories are now ranked by how many of their words appear in Bob's response, with only full matches considered. "BRAKE PADS FRONT" (3/3 words) now correctly wins over "BRAKE FLUID" (1/2 words)
45
+
46
+ ---
47
+
48
+ ## [v3.2.9] - 2026-03-09
49
+
50
+ ### Fixed
51
+ - 📜 **Post-Stream Shelf Scroll**: When Bob discusses a specific part type in follow-up responses, the shelf now scrolls to that category — matches against actual shelf content (not hardcoded keywords) with server `highlight_category` events taking priority
52
+
53
+ ---
54
+
55
+ ## [v3.2.8] - 2026-03-09
56
+
57
+ ### Fixed
58
+ - 🔇 **Removed Optimistic Searching Audio**: Removed the `parts_searching.mp3` canned audio trigger that played at inappropriate times during follow-up conversations — aligns with V2.0 architecture decision to disable canned audio triggers
59
+
60
+ ---
61
+
62
+ ## [v3.2.7] - 2026-03-09
63
+
64
+ ### Fixed
65
+ - 🛒 **Follow-Up Products Merge**: New products requested mid-conversation are now **merged** into the existing shelf instead of replacing it — existing items are preserved and deduplicated by SKU
66
+ - 📜 **Auto-Scroll to New Categories**: When follow-up parts introduce a new category not already on the shelf, the shelf automatically scrolls to that section with a 300ms smooth animation
67
+
68
+ ---
69
+
70
+ ## [v3.2.6] - 2026-03-09
71
+
72
+ ### Fixed
73
+ - 📜 **Shelf Auto-Scroll on Load**: Removed legacy `PART_TYPE_KEYWORDS` scan that fired `onHighlightPart` after every assistant message — generic words like "brakes" in Bob's greeting were scrolling the shelf to the bottom. Highlighting now only triggers from explicit server-side `highlight_category` SSE events
74
+
75
+ ---
76
+
8
77
  ## [v3.2.5] - 2026-03-09
9
78
 
10
79
  ### Fixed
@@ -26,6 +26,8 @@ interface ContainedMobileBobLayoutProps {
26
26
  servicePackages: ServicePackage[];
27
27
  highlightedPartType?: string | null;
28
28
  highlightedProduct?: HighlightedProduct | null;
29
+ scrollToCategory?: string | null;
30
+ onScrollToCategoryComplete?: () => void;
29
31
  onProductClick?: (product: Product) => void;
30
32
  onPackageSelect?: (pkg: ServicePackage) => void;
31
33
  isResearching?: boolean;
@@ -26,6 +26,8 @@ interface MobileBobLayoutProps {
26
26
  servicePackages: ServicePackage[];
27
27
  highlightedPartType?: string | null;
28
28
  highlightedProduct?: HighlightedProduct | null;
29
+ scrollToCategory?: string | null;
30
+ onScrollToCategoryComplete?: () => void;
29
31
  onProductClick?: (product: Product) => void;
30
32
  onPackageSelect?: (pkg: ServicePackage) => void;
31
33
  isResearching?: boolean;
@@ -21,6 +21,8 @@ interface MobileProductColumnProps {
21
21
  servicePackages: ServicePackage[];
22
22
  highlightedPartType?: string | null;
23
23
  highlightedProduct?: HighlightedProduct | null;
24
+ scrollToCategory?: string | null;
25
+ onScrollToCategoryComplete?: () => void;
24
26
  onProductClick?: (product: Product) => void;
25
27
  onPackageSelect?: (pkg: ServicePackage) => void;
26
28
  isResearching?: boolean;
@@ -22,8 +22,10 @@ interface UseBobChatProps {
22
22
  onAutoFetchComplete?: () => void;
23
23
  /** When backend requires user to pick a vehicle variant, provide UI-ready cards for the shelf */
24
24
  onVariantSelectionRequired?: (variants: VariantCard[], make: string, model: string) => void;
25
+ /** Ref containing current shelf category names for post-stream scroll matching */
26
+ shelfCategoriesRef?: React.RefObject<Set<string>>;
25
27
  }
26
- export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired }: UseBobChatProps) => {
28
+ export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired, shelfCategoriesRef }: UseBobChatProps) => {
27
29
  messages: Message[];
28
30
  input: string;
29
31
  setInput: import('react').Dispatch<import('react').SetStateAction<string>>;