@gymmymac/bob-widget 3.2.4 → 3.2.13
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 +69 -0
- package/dist/__tests__/v325BugFixes.test.d.ts +9 -0
- package/dist/components/mobile/ContainedMobileBobLayout.d.ts +2 -0
- package/dist/components/mobile/MobileBobLayout.d.ts +2 -0
- package/dist/components/mobile/MobileProductColumn.d.ts +2 -0
- package/dist/hooks/useBobChat.d.ts +3 -1
- package/dist/index.js +32 -32
- package/dist/index.mjs +4206 -4028
- package/dist/utils/rearBrakeFilter.d.ts +9 -0
- package/package.json +1 -1
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.13] - 2026-03-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- 🛒 **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
|
|
12
|
+
- 📜 **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
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [v3.2.12] - 2026-03-09
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- 🛡️ **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
|
|
20
|
+
- 📜 **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
|
|
21
|
+
- 📦 **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
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## [v3.2.11] - 2026-03-09
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- ⚡ **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
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [v3.2.10] - 2026-03-09
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- 🎯 **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)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## [v3.2.9] - 2026-03-09
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- 📜 **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
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [v3.2.8] - 2026-03-09
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- 🔇 **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
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## [v3.2.7] - 2026-03-09
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- 🛒 **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
|
|
57
|
+
- 📜 **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
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## [v3.2.6] - 2026-03-09
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
- 📜 **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
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## [v3.2.5] - 2026-03-09
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
- 🔇 **Bug #1 — Quick-Reply Speech Stop**: Quick-reply/suggestion buttons now call `onInterrupt()` to stop all active speech before triggering `onNavigate`, preventing jarring audio overlap during navigation
|
|
72
|
+
- 🎛️ **Bug #2 — Imperative Stop Handle**: `BobStandaloneHandle.stopSpeech()` / `.interrupt()` now calls `stopAllAudio` (TTS + canned clips + searching audio) instead of only cancelling TTS — host apps can now fully silence Bob via ref
|
|
73
|
+
- 🎤 **Bug #3 — PTT Interrupt During Canned Audio**: Composite `isSpeaking` state now tracks both TTS and audio controller playback, so the PTT button correctly detects the `speaking` state during pre-recorded clips and interrupts immediately on tap
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
8
77
|
## [v3.2.4] - 2026-03-09
|
|
9
78
|
|
|
10
79
|
### Fixed
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v3.2.5 Bug Fix Regression Tests
|
|
3
|
+
*
|
|
4
|
+
* Covers three critical CARFIX production bugs:
|
|
5
|
+
* Bug #1 — Quick-reply buttons must call onInterrupt before onQuickReply (stop speech before navigating)
|
|
6
|
+
* Bug #2 — Imperative handle must call stopAllAudio (TTS + canned + searching), not just stopSpeech
|
|
7
|
+
* Bug #3 — Composite isSpeaking must be true when EITHER TTS or audio controller is playing
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -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>>;
|