guideai-app 0.4.1 → 0.4.2-2

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.
Files changed (41) hide show
  1. package/API_DATA_CONTRACTS.md +516 -0
  2. package/API_SESSIONID_TESTING.md +215 -0
  3. package/PII_HASHING_EPIC.md +886 -0
  4. package/PII_HASHING_STORIES_SUMMARY.md +275 -0
  5. package/README.md +69 -254
  6. package/SESSION_ID_VERIFICATION.md +122 -0
  7. package/VISIT_COUNT_TESTING.md +453 -0
  8. package/dist/GuideAI.js +1 -1
  9. package/dist/GuideAI.js.LICENSE.txt +20 -0
  10. package/dist/GuideAI.js.map +1 -1
  11. package/dist/components/TranscriptBox.d.ts +4 -0
  12. package/dist/index.d.ts +3 -0
  13. package/dist/metric/index.d.ts +0 -2
  14. package/dist/metric/metadata-tracker.d.ts +1 -2
  15. package/dist/styles/GuideAI.styles.d.ts +1 -1
  16. package/dist/types/GuideAI.types.d.ts +3 -1
  17. package/dist/types/metadata.types.d.ts +2 -0
  18. package/dist/utils/api.d.ts +5 -0
  19. package/dist/utils/constants.d.ts +0 -2
  20. package/dist/utils/elementInteractions.d.ts +92 -0
  21. package/dist/utils/gemini.d.ts +3 -0
  22. package/dist/utils/goToAElmLink.d.ts +1 -0
  23. package/dist/utils/highlightThenClick.d.ts +1 -0
  24. package/dist/utils/hoverThenClick.d.ts +1 -0
  25. package/dist/utils/logger.d.ts +1 -5
  26. package/dist/utils/session.d.ts +23 -0
  27. package/dist/utils/ui.d.ts +1 -1
  28. package/dist/visualContext/VisualContextScheduler.d.ts +43 -0
  29. package/dist/visualContext/VisualContextStore.d.ts +11 -0
  30. package/dist/visualContext/debug-overlay.d.ts +10 -0
  31. package/dist/visualContext/defaultProvider.d.ts +15 -0
  32. package/dist/visualContext/index.d.ts +5 -0
  33. package/dist/visualContext/types.d.ts +45 -0
  34. package/index.d.ts +5 -1
  35. package/jest.config.js +26 -0
  36. package/jest.setup.js +21 -0
  37. package/metadata-tracking-example.md +11 -11
  38. package/package.json +14 -3
  39. package/dist/metric/event-listner.d.ts +0 -141
  40. package/dist/utils/highlightAndClick.d.ts +0 -3
  41. package/dist/utils/hoverAndClick.d.ts +0 -4
@@ -0,0 +1,122 @@
1
+ # Session ID Implementation Verification Guide
2
+
3
+ ## Overview
4
+ This guide helps you verify that the session ID tracking implementation is working correctly.
5
+
6
+ ## What Was Implemented
7
+
8
+ ### 1. Session Utility (`src/utils/session.ts`)
9
+ - ✅ `getSessionId()` - Gets or creates session ID
10
+ - ✅ `clearSessionId()` - Clears session ID (for testing)
11
+ - ✅ `peekSessionId()` - Views session ID without creating one
12
+ - ✅ Standard UUID v4 format
13
+ - ✅ Stored in `sessionStorage['guideai_session_id']`
14
+
15
+ ### 2. UserMetadataTracker Updates
16
+ - ✅ Session ID initialized in `init()` method
17
+ - ✅ Session ID stored in metadata object
18
+ - ✅ Session ID included in all metadata updates
19
+
20
+ ### 3. Exports
21
+ - ✅ Session utility functions exported from main index
22
+ - ✅ Available for external debugging and testing
23
+
24
+ ## Manual Verification Steps
25
+
26
+ ### Step 1: Check Session Storage
27
+ 1. Open your test site in a browser
28
+ 2. Open DevTools → Application → Session Storage
29
+ 3. Look for `guideai_session_id`
30
+ 4. Verify it contains a UUID (e.g., `550e8400-e29b-41d4-a716-446655440000`)
31
+
32
+ ### Step 2: Verify Persistence
33
+ 1. Navigate between different pages on your site
34
+ 2. Check that `guideai_session_id` remains the same
35
+ 3. Refresh the page - session ID should persist
36
+
37
+ ### Step 3: Verify New Session Creation
38
+ 1. Open a new tab to the same site
39
+ 2. Check Session Storage - should have a different `guideai_session_id`
40
+ 3. Close and reopen a tab - should generate a new `guideai_session_id`
41
+
42
+ ### Step 4: Verify Metadata Tracking
43
+ Open the browser console and check logs:
44
+
45
+ ```javascript
46
+ // UserMetadataTracker should log:
47
+ // "Session ID initialized" with { sessionId: "..." }
48
+
49
+ // metadata object should include sessionId
50
+ ```
51
+
52
+ ### Step 6: Programmatic Testing
53
+ You can test session functions directly in the console:
54
+
55
+ ```javascript
56
+ // Get current session ID
57
+ const { getSessionId, peekSessionId, clearSessionId } = window.GuideAI || {};
58
+
59
+ // View current session ID (if GuideAI exports are available)
60
+ console.log('Current session:', peekSessionId());
61
+
62
+ // Or directly from sessionStorage
63
+ console.log('Session ID:', sessionStorage.getItem('guideai_session_id'));
64
+ ```
65
+
66
+ ## Expected Behavior
67
+
68
+ ### Session Lifecycle
69
+ - **New Tab**: New session ID generated
70
+ - **Page Navigation**: Session ID persists
71
+ - **Page Refresh**: Session ID persists
72
+ - **Tab Close**: Session ID cleared automatically
73
+ - **Browser Restart**: New session IDs for all tabs
74
+
75
+ ### Data Inclusion
76
+ - **UserMetadataTracker**: Metadata should include `sessionId` field
77
+ - **API Calls**: Session ID should be sent to backend with metadata updates
78
+
79
+ ## Testing in Your Application
80
+
81
+ Add this code to your test application to verify session tracking:
82
+
83
+ ```typescript
84
+ import GuideAI, { getSessionId } from 'guideai-package';
85
+
86
+ // In your component
87
+ useEffect(() => {
88
+ // Log session ID on mount
89
+ console.log('Current GuideAI Session:', getSessionId());
90
+
91
+ // Check sessionStorage directly
92
+ console.log('Session Storage:', sessionStorage.getItem('guideai_session_id'));
93
+ }, []);
94
+ ```
95
+
96
+ ## Common Issues & Solutions
97
+
98
+ ### Issue: Session ID not appearing
99
+ **Solution**: Ensure GuideAI component has mounted and initialized
100
+
101
+ ### Issue: Session ID changes on page refresh
102
+ **Solution**: Verify you're using `sessionStorage` not `localStorage`
103
+
104
+ ### Issue: Same session ID across tabs
105
+ **Solution**: This is expected behavior - each tab should have its own session ID
106
+
107
+ ## Phase 2 Features (Not Yet Implemented)
108
+
109
+ These features are planned for future releases:
110
+ - ❌ `session_start` metadata event
111
+ - ❌ `session_end` metadata event
112
+ - ❌ Session duration tracking
113
+ - ❌ Session-level analytics
114
+
115
+ ## Notes
116
+
117
+ - Session ID uses browser's `crypto.randomUUID()` when available
118
+ - Fallback UUID generation for older browsers
119
+ - Global session key (not per-organization)
120
+ - `conversationStartTime` remains for backward compatibility
121
+ - Session utility handles SSR/non-browser environments gracefully
122
+
@@ -0,0 +1,453 @@
1
+ # Visit Count Testing - Manual Test Checklist
2
+
3
+ This document contains manual testing procedures for scenarios that cannot be fully automated in unit/integration tests.
4
+
5
+ ## Prerequisites
6
+
7
+ Before testing, ensure you have:
8
+ - [ ] Built the GuideAI package (`npm run build`)
9
+ - [ ] Access to the test site
10
+ - [ ] Multiple browsers installed (Chrome, Firefox, Safari, Edge)
11
+ - [ ] Mobile device or browser DevTools mobile emulation
12
+ - [ ] Browser DevTools open to inspect localStorage
13
+
14
+ ## Understanding Visit Count Behavior
15
+
16
+ **Expected Behavior:**
17
+ - `visitCount` starts at `1` on first visit
18
+ - `visitCount` increments when user returns after **30+ minutes**
19
+ - `visitCount` persists in `localStorage` (survives browser close/reopen)
20
+ - `sessionId` is stored in `sessionStorage` (cleared on browser/tab close)
21
+
22
+ **When visitCount resets to 1 (treated as first-time user):**
23
+ 1. ✅ Switching browsers (Chrome → Firefox)
24
+ 2. ✅ Using incognito/private browsing mode
25
+ 3. ✅ Switching devices (Desktop → Mobile)
26
+ 4. ✅ Clearing browser data
27
+
28
+ ---
29
+
30
+ ## Test Suite 1: Cross-Browser Testing
31
+
32
+ ### Test 1.1: Chrome to Firefox Switch
33
+
34
+ **Purpose:** Verify that switching browsers treats user as first-time user.
35
+
36
+ **Steps:**
37
+ 1. Open Chrome browser
38
+ 2. Navigate to test site
39
+ 3. Open DevTools → Console
40
+ 4. Check visitCount: `localStorage.getItem('guideai_user_metadata')`
41
+ - **Expected:** `visitCount: 1`
42
+ 5. Note the sessionId
43
+ 6. Close Chrome
44
+ 7. Open Firefox browser
45
+ 8. Navigate to same test site
46
+ 9. Check visitCount in Firefox DevTools
47
+ - **Expected:** `visitCount: 1` (treated as new user)
48
+ - **Expected:** Different sessionId
49
+
50
+ **Result:** ☐ PASS ☐ FAIL
51
+
52
+ **Notes:**
53
+ ```
54
+ Chrome visitCount: ___
55
+ Firefox visitCount: ___
56
+ ```
57
+
58
+ ---
59
+
60
+ ### Test 1.2: Chrome to Safari Switch
61
+
62
+ **Purpose:** Verify cross-browser isolation.
63
+
64
+ **Steps:**
65
+ 1. Open Chrome, visit test site
66
+ 2. Manually increment visitCount (login or wait 31+ min and reload)
67
+ 3. Verify visitCount is now `2` or higher in Chrome
68
+ 4. Open Safari, visit test site
69
+ 5. Check visitCount in Safari
70
+ - **Expected:** `visitCount: 1` (Safari has its own localStorage)
71
+
72
+ **Result:** ☐ PASS ☐ FAIL
73
+
74
+ **Notes:**
75
+ ```
76
+ Chrome visitCount: ___
77
+ Safari visitCount: ___
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Test Suite 2: Incognito/Private Mode
83
+
84
+ ### Test 2.1: Regular to Incognito Switch
85
+
86
+ **Purpose:** Verify incognito mode always treats user as first-time user.
87
+
88
+ **Steps:**
89
+ 1. Open Chrome in regular mode
90
+ 2. Visit test site
91
+ 3. Check visitCount
92
+ - **Expected:** `visitCount: 1`
93
+ 4. Manually increment visitCount to `3`:
94
+ ```javascript
95
+ window.GuideAI.metadata.trackVisitManually()
96
+ window.GuideAI.metadata.trackVisitManually()
97
+ ```
98
+ 5. Verify visitCount is now `3`
99
+ 6. Open Chrome in Incognito mode (Cmd/Ctrl + Shift + N)
100
+ 7. Visit same test site
101
+ 8. Check visitCount in incognito
102
+ - **Expected:** `visitCount: 1`
103
+
104
+ **Result:** ☐ PASS ☐ FAIL
105
+
106
+ ---
107
+
108
+ ### Test 2.2: Multiple Incognito Sessions
109
+
110
+ **Purpose:** Verify each incognito window is isolated.
111
+
112
+ **Steps:**
113
+ 1. Open Incognito Window 1
114
+ 2. Visit test site, verify visitCount = 1
115
+ 3. Increment visitCount to 2
116
+ 4. Close Incognito Window 1
117
+ 5. Open new Incognito Window 2
118
+ 6. Visit test site
119
+ 7. Check visitCount
120
+ - **Expected:** `visitCount: 1` (fresh incognito = fresh storage)
121
+
122
+ **Result:** ☐ PASS ☐ FAIL
123
+
124
+ ---
125
+
126
+ ## Test Suite 3: Mobile and Desktop
127
+
128
+ ### Test 3.1: Desktop to Mobile Device Switch
129
+
130
+ **Purpose:** Verify different devices have separate visitCount.
131
+
132
+ **Steps:**
133
+ 1. On Desktop Chrome, visit test site
134
+ 2. Increment visitCount to `3`
135
+ 3. Note the visitCount and firstVisit timestamp
136
+ 4. On Mobile device (actual phone), visit same test site
137
+ 5. Check visitCount on mobile
138
+ - **Expected:** `visitCount: 1` (different device = different localStorage)
139
+ 6. On Mobile, increment visitCount to `2`
140
+ 7. Return to Desktop, refresh page
141
+ 8. Check visitCount on desktop
142
+ - **Expected:** Still `3` (unchanged by mobile activity)
143
+
144
+ **Result:** ☐ PASS ☐ FAIL
145
+
146
+ **Notes:**
147
+ ```
148
+ Desktop visitCount: ___
149
+ Mobile visitCount: ___
150
+ ```
151
+
152
+ ---
153
+
154
+ ### Test 3.2: Desktop to Mobile Browser Emulation
155
+
156
+ **Purpose:** Verify behavior using DevTools mobile emulation.
157
+
158
+ **Steps:**
159
+ 1. Open Chrome DevTools → Device Toolbar (Cmd/Ctrl + Shift + M)
160
+ 2. Select iPhone or Android device
161
+ 3. Visit test site
162
+ 4. Check visitCount
163
+ - **Expected:** Reads from same localStorage as desktop (should be same count)
164
+ - **Note:** DevTools emulation does NOT create separate storage
165
+
166
+ **Result:** ☐ PASS ☐ FAIL
167
+
168
+ **Important:** This test demonstrates that DevTools emulation ≠ real mobile device testing.
169
+
170
+ ---
171
+
172
+ ## Test Suite 4: Clearing Browser Data
173
+
174
+ ### Test 4.1: Clear All Browsing Data
175
+
176
+ **Purpose:** Verify clearing data resets visitCount.
177
+
178
+ **Steps:**
179
+ 1. Visit test site, increment visitCount to `5`
180
+ 2. Go to Chrome Settings → Privacy → Clear browsing data
181
+ 3. Select "All time" and check "Cookies and other site data" + "Cached images and files"
182
+ 4. Click "Clear data"
183
+ 5. Revisit test site
184
+ 6. Check visitCount
185
+ - **Expected:** `visitCount: 1` (treated as first-time user)
186
+ - **Expected:** New firstVisit timestamp
187
+
188
+ **Result:** ☐ PASS ☐ FAIL
189
+
190
+ ---
191
+
192
+ ### Test 4.2: Clear Only Cookies (Keep Cache)
193
+
194
+ **Purpose:** Verify visitCount is tied to localStorage (cookies).
195
+
196
+ **Steps:**
197
+ 1. Visit test site, visitCount = 1
198
+ 2. Clear only "Cookies and other site data" (NOT cache)
199
+ 3. Revisit test site
200
+ 4. Check visitCount
201
+ - **Expected:** `visitCount: 1` (localStorage cleared with cookies)
202
+
203
+ **Result:** ☐ PASS ☐ FAIL
204
+
205
+ ---
206
+
207
+ ## Test Suite 5: Real-World User Flows
208
+
209
+ ### Test 5.1: Morning Visit, Evening Visit (Same Day)
210
+
211
+ **Purpose:** Verify visitCount behavior across a single day.
212
+
213
+ **Steps:**
214
+ 1. **Morning (9 AM):** Visit test site, visitCount = 1
215
+ 2. **Afternoon (2 PM, 5 hours later):**
216
+ - Close browser completely
217
+ - Reopen browser, visit test site
218
+ - **Expected:** visitCount still = 1 (within 30-min window from last activity)
219
+ 3. **Evening (10 PM, 8 hours after afternoon visit):**
220
+ - Reopen browser (ensure 30+ min since last visit)
221
+ - Visit test site
222
+ - **Expected:** visitCount = 2 (exceeded 30-min timeout)
223
+
224
+ **Result:** ☐ PASS ☐ FAIL
225
+
226
+ **Alternative:** Speed up using DevTools:
227
+ ```javascript
228
+ // Manually set lastVisit to 31 minutes ago
229
+ const data = JSON.parse(localStorage.getItem('guideai_user_metadata'));
230
+ data.metadata.lastVisit = Date.now() - (31 * 60 * 1000);
231
+ localStorage.setItem('guideai_user_metadata', JSON.stringify(data));
232
+ // Refresh page - visitCount should increment
233
+ ```
234
+
235
+ ---
236
+
237
+ ### Test 5.2: Multiple Tabs Open Simultaneously
238
+
239
+ **Purpose:** Verify visitCount is shared across tabs.
240
+
241
+ **Steps:**
242
+ 1. Open Tab 1, visit test site
243
+ 2. Check visitCount in Tab 1
244
+ - **Expected:** `visitCount: 1`
245
+ 3. Open Tab 2 (Cmd/Ctrl + T), visit test site
246
+ 4. Check visitCount in Tab 2
247
+ - **Expected:** `visitCount: 1` (shared localStorage)
248
+ 5. In Tab 1, run:
249
+ ```javascript
250
+ window.GuideAI.metadata.trackVisitManually()
251
+ ```
252
+ 6. In Tab 2, refresh page
253
+ 7. Check visitCount in Tab 2
254
+ - **Expected:** `visitCount: 2` (sees update from Tab 1)
255
+
256
+ **Result:** ☐ PASS ☐ FAIL
257
+
258
+ ---
259
+
260
+ ### Test 5.3: User Login Flow
261
+
262
+ **Purpose:** Verify login correctly increments visitCount.
263
+
264
+ **Steps:**
265
+ 1. Visit test site (not logged in), visitCount = 1
266
+ 2. Simulate login:
267
+ ```javascript
268
+ window.GuideAI.metadata.resetSessionVisitTracking()
269
+ window.GuideAI.metadata.trackVisitManually()
270
+ window.GuideAI.metadata.trackLogin({ email: 'test@example.com' })
271
+ ```
272
+ 3. Check visitCount
273
+ - **Expected:** `visitCount: 2`
274
+ 4. Check loginCount
275
+ - **Expected:** `loginCount: 1`
276
+
277
+ **Result:** ☐ PASS ☐ FAIL
278
+
279
+ ---
280
+
281
+ ## Test Suite 6: Edge Cases
282
+
283
+ ### Test 6.1: Rapid Page Refreshes
284
+
285
+ **Purpose:** Verify rapid refreshes don't inflate visitCount.
286
+
287
+ **Steps:**
288
+ 1. Visit test site, visitCount = 1
289
+ 2. Press F5 (refresh) 10 times rapidly
290
+ 3. Check visitCount after each refresh
291
+ - **Expected:** `visitCount: 1` (unchanged)
292
+
293
+ **Result:** ☐ PASS ☐ FAIL
294
+
295
+ ---
296
+
297
+ ### Test 6.2: Browser Crash Recovery
298
+
299
+ **Purpose:** Verify visitCount persists after browser crash.
300
+
301
+ **Steps:**
302
+ 1. Visit test site, visitCount = 1
303
+ 2. Increment to visitCount = 3
304
+ 3. Force browser crash (Task Manager → End Task on browser)
305
+ 4. Reopen browser
306
+ 5. Visit test site
307
+ 6. Check visitCount
308
+ - **Expected:** `visitCount: 3` (persisted in localStorage)
309
+ - Within 30 min: stays at 3
310
+ - After 30+ min: increments to 4
311
+
312
+ **Result:** ☐ PASS ☐ FAIL
313
+
314
+ ---
315
+
316
+ ## Test Suite 7: POC First-Time User Detection
317
+
318
+ ### Test 7.1: First-Time User Onboarding
319
+
320
+ **Purpose:** Verify first-time user detection for onboarding flow.
321
+
322
+ **Steps:**
323
+ 1. Clear all browser data
324
+ 2. Visit test site
325
+ 3. Check if onboarding appears (based on `visitCount === 1`)
326
+ - **Expected:** Onboarding shown
327
+ 4. Close browser, reopen within 30 min
328
+ 5. Visit test site again
329
+ 6. Check if onboarding appears
330
+ - **Expected:** Onboarding STILL shown (visitCount still 1)
331
+ 7. Wait 31+ minutes (or manually set lastVisit to 31 min ago)
332
+ 8. Visit test site
333
+ 9. Check visitCount
334
+ - **Expected:** `visitCount: 2`
335
+ - **Expected:** Onboarding NOT shown (returning user)
336
+
337
+ **Result:** ☐ PASS ☐ FAIL
338
+
339
+ ---
340
+
341
+ ## Utility Commands
342
+
343
+ ### Inspect localStorage
344
+ ```javascript
345
+ // Get full metadata
346
+ JSON.parse(localStorage.getItem('guideai_user_metadata'))
347
+
348
+ // Get just visitCount
349
+ const data = JSON.parse(localStorage.getItem('guideai_user_metadata'))
350
+ console.log('visitCount:', data.metadata.visitCount)
351
+
352
+ // Get sessionId
353
+ const data = JSON.parse(localStorage.getItem('guideai_user_metadata'))
354
+ console.log('sessionId:', data.metadata.sessionId)
355
+ ```
356
+
357
+ ### Manually Set visitCount
358
+ ```javascript
359
+ const data = JSON.parse(localStorage.getItem('guideai_user_metadata'))
360
+ data.metadata.visitCount = 5
361
+ localStorage.setItem('guideai_user_metadata', JSON.stringify(data))
362
+ location.reload()
363
+ ```
364
+
365
+ ### Simulate 31 Minutes Ago
366
+ ```javascript
367
+ const data = JSON.parse(localStorage.getItem('guideai_user_metadata'))
368
+ data.metadata.lastVisit = Date.now() - (31 * 60 * 1000)
369
+ localStorage.setItem('guideai_user_metadata', JSON.stringify(data))
370
+ location.reload() // visitCount should increment
371
+ ```
372
+
373
+ ### Force Visit Increment
374
+ ```javascript
375
+ window.GuideAI.metadata.trackVisitManually()
376
+ ```
377
+
378
+ ### Clear All Data
379
+ ```javascript
380
+ localStorage.clear()
381
+ sessionStorage.clear()
382
+ location.reload()
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Summary Checklist
388
+
389
+ After completing all tests, verify these scenarios PASS:
390
+
391
+ - [ ] **Cross-Browser:** Chrome → Firefox = visitCount resets to 1
392
+ - [ ] **Incognito Mode:** Always treated as first-time user (visitCount = 1)
393
+ - [ ] **Mobile → Desktop:** Separate visitCount on different devices
394
+ - [ ] **Clear Data:** Clearing browser data resets visitCount
395
+ - [ ] **Same Browser, Multiple Sessions (< 30 min):** visitCount unchanged
396
+ - [ ] **Same Browser, Multiple Sessions (> 30 min):** visitCount increments
397
+ - [ ] **Multiple Tabs:** visitCount shared via localStorage
398
+ - [ ] **Login Flow:** Login correctly increments visitCount
399
+ - [ ] **First-Time User Detection:** `visitCount === 1` correctly identifies new users
400
+
401
+ ---
402
+
403
+ ## Test Results Summary
404
+
405
+ | Test | Status | Notes |
406
+ |------|--------|-------|
407
+ | Cross-Browser (Chrome → Firefox) | ☐ PASS ☐ FAIL | |
408
+ | Incognito Mode | ☐ PASS ☐ FAIL | |
409
+ | Desktop → Mobile | ☐ PASS ☐ FAIL | |
410
+ | Clear Browser Data | ☐ PASS ☐ FAIL | |
411
+ | Same Session (< 30 min) | ☐ PASS ☐ FAIL | |
412
+ | New Session (> 30 min) | ☐ PASS ☐ FAIL | |
413
+ | Multiple Tabs | ☐ PASS ☐ FAIL | |
414
+ | Login Flow | ☐ PASS ☐ FAIL | |
415
+ | First-Time User Detection | ☐ PASS ☐ FAIL | |
416
+
417
+ **Date Tested:** __________
418
+ **Tester Name:** __________
419
+ **Browser Versions Tested:**
420
+ - Chrome: __________
421
+ - Firefox: __________
422
+ - Safari: __________
423
+ - Mobile: __________
424
+
425
+ ---
426
+
427
+ ## Troubleshooting
428
+
429
+ ### visitCount not incrementing after 30+ minutes
430
+ - Check that `trackVisits: true` in GuideAI config
431
+ - Verify `sessionTimeout` is set to 30 * 60 * 1000 (default)
432
+ - Check console for errors
433
+
434
+ ### visitCount incrementing on every page load
435
+ - Check if localStorage is disabled in browser
436
+ - Verify localStorage is not being cleared by extensions
437
+ - Check for errors in browser console
438
+
439
+ ### Different visitCount in different tabs
440
+ - This should NOT happen - localStorage is shared
441
+ - If this occurs, check for localStorage corruption
442
+ - Clear all data and retest
443
+
444
+ ---
445
+
446
+ ## Conclusion
447
+
448
+ These manual tests complement the automated unit/integration tests and validate that visitCount behaves correctly in real-world scenarios. The current implementation is **"good enough"** for the POC if all tests pass, acknowledging that users will be treated as first-time users when:
449
+ 1. Switching browsers
450
+ 2. Using incognito mode
451
+ 3. Switching devices
452
+ 4. Clearing browser data
453
+