# Testing Notes - Demo Experience UI

**Issue**: #91
**Started**: 2025-10-08
**Status**: In Progress

## Test Environment

- **Railway Motia API**: https://slide-system-production-5813.up.railway.app
- **Daily.co Domain**: buzztrail.daily.co
- **Local Dev Server**: http://localhost:4500
- **Backend Services Required**:
  - ✅ Railway Motia API (deployed)
  - ⏳ Pipecat + Tavus Avatar (check status)
  - ⏳ Slidev Screenshare (check configuration)

---

## Phase 1: Core Flow Testing (Stream A)

### 1. HairCheck Flow Testing

**Test Date**: 2025-10-08
**Browser**: Chrome (macOS)

- [x] Camera preview displays correctly ✅
- [x] Microphone detection works ✅
- [x] Device permission requests appear properly ✅
- [x] "Join Demo" button enables after permissions granted ✅
- [ ] Can select different camera devices (not tested)
- [ ] Can select different microphone devices (not tested)

**Issues Found**:
- Bug #2: Camera not visible - Daily needed prejoin (Fixed: b172a93)
- Bug #5: Device buttons cut off, Join button misaligned (Fixed: 2ebcb7b)

---

### 2. Discovery Mode Testing

**Test Date**: 2025-10-08 (Partial)
**Browser**: Chrome (macOS)

- [x] Customer successfully joins Daily.co room ✅
- [ ] Tavus avatar appears in main video area ⚠️ **BLOCKED: Pipecat backend not running**
- [ ] Customer self-view appears in bottom-right PiP ⚠️ **BLOCKED: Need avatar to test**
- [ ] Avatar video quality is acceptable ⚠️ **BLOCKED**
- [ ] Avatar audio is clear and synchronized ⚠️ **BLOCKED**
- [x] No console errors during join ✅

**Issues Found**:
- **BLOCKER**: Pipecat backend with Tavus avatar integration not deployed/accessible
- App correctly shows "Waiting for presenter..." when avatar not present ✅

---

### 3. Presentation Mode Testing

**Test Date**: _____
**Browser**: Chrome (macOS)

- [ ] Slidev screenshare participant joins room
- [ ] View mode automatically switches to presentation
- [ ] Slideshow appears in main video area
- [ ] Avatar moves to top-left PiP
- [ ] Customer self-view remains in bottom-right PiP
- [ ] Slide content is readable and clear
- [ ] No layout glitches during transition

**Issues Found**:
-

---

### 4. View Mode Switching Testing

**Test Date**: _____
**Browser**: Chrome (macOS)

- [ ] Automatic switch when screenshare starts (Discovery → Presentation)
- [ ] Automatic switch when screenshare stops (Presentation → Discovery)
- [ ] PiPs reposition correctly during transitions
- [ ] Transitions are smooth (no flashing/jumping)
- [ ] View mode detection timing is acceptable (<500ms)

**Issues Found**:
-

---

### 5. Media Controls Testing

**Test Date**: 2025-10-08
**Browser**: Chrome (macOS)

- [ ] Mic toggle mutes audio (not tested)
- [ ] Mic toggle unmutes audio (not tested)
- [ ] Camera toggle disables video (not tested)
- [ ] Camera toggle enables video (not tested)
- [ ] Can switch microphone devices mid-call (not tested)
- [ ] Can switch camera devices mid-call (not tested)
- [x] Leave button ends call cleanly ✅
- [x] Returns to HairCheck after leaving ✅

**Issues Found**:
- Bug #6: Race condition on leave/join (Fixed: c4fff67)

---

### 6. Error Handling Testing

**Test Date**: _____
**Browser**: Chrome (macOS)

**Connection Loss**:
- [ ] Network disconnect handled gracefully
- [ ] Reconnection attempts work
- [ ] User sees appropriate error message

**Avatar Timeout**:
- [ ] Timeout message appears if avatar doesn't join
- [ ] User can retry or leave

**Permission Denied**:
- [ ] Clear error message when camera/mic denied
- [ ] Instructions for granting permissions

**Issues Found**:
-

---

### 7. Bug Fixes

**Bugs Found in Phase 1**:

| #   | Description | Severity | Status | Fix Commit |
|-----|-------------|----------|--------|------------|
| 1   | Railway API 500 error - incorrect session parameters (`automated_demo` → `live_demo`, `production` → `prod`) | Critical | ✅ Fixed | b172a93 |
| 2   | HairCheck camera not visible - Daily instance not prejoined | Critical | ✅ Fixed | b172a93 |
| 3   | Room URL conflict when transitioning HairCheck → Conversation | Critical | ✅ Fixed | 2ebcb7b |
| 4   | useParticipants crash - undefined event data not handled | Critical | ✅ Fixed | 2ebcb7b |
| 5   | HairCheck CSS - device buttons cut off, Join button misaligned | Minor | ✅ Fixed | 2ebcb7b |
| 6   | Race condition in Daily leave/join - "already joined meeting" error | Critical | ✅ Fixed | c4fff67 |

---

## Phase 2: Cross-Browser Testing (Stream B)

**Prerequisites**: Phase 1 complete, core flow working

### Chrome (macOS)

**Test Date**: _____

- [ ] Full flow validation (HairCheck → Discovery → Presentation)
- [ ] Page load time: _____ seconds
- [ ] Time to join call: _____ seconds
- [ ] View mode transition time: _____ ms
- [ ] No video lag or audio sync issues

**Issues Found**:
-

---

### Safari (macOS)

**Test Date**: _____

- [ ] Full flow validation
- [ ] WebRTC compatibility verified
- [ ] Daily.co quirks handled
- [ ] Media device permissions work correctly
- [ ] Video rendering quality acceptable
- [ ] Audio quality acceptable

**Issues Found**:
-

---

### Firefox (macOS)

**Test Date**: _____

- [ ] Full flow validation
- [ ] Daily.co compatibility verified
- [ ] Video rendering quality acceptable
- [ ] Audio quality acceptable
- [ ] No browser-specific console errors

**Issues Found**:
-

---

## Phase 3: Device/Responsive Testing (Stream C)

**Prerequisites**: Phase 1 complete, core flow working

### Desktop Resolutions

**1920x1080 (Standard Monitor)**:
- [ ] Layout looks correct
- [ ] Video elements properly sized
- [ ] PiPs positioned correctly
- [ ] Controls accessible

**1440x900 (MacBook)**:
- [ ] Layout looks correct
- [ ] Video elements properly sized
- [ ] PiPs positioned correctly
- [ ] Controls accessible

**Issues Found**:
-

---

### iPad Testing

**iPad Pro (Landscape)**:
- [ ] Layout adapts correctly
- [ ] Touch controls work
- [ ] Video quality acceptable
- [ ] PiPs sized appropriately

**iPad Air (Portrait)**:
- [ ] "Desktop required" message appears (if applicable)
- [ ] OR layout adapts correctly
- [ ] Touch controls work

**Issues Found**:
-

---

## Summary

### Overall Results

**Phase 1 - Core Flow**: ✅ Partially Complete (HairCheck ✅, Discovery/Presentation ⚠️ Blocked)
**Phase 2 - Cross-Browser**: ⏳ Not Started (blocked by Phase 1)
**Phase 3 - Device Testing**: ⏳ Not Started (blocked by Phase 1)

### Critical Bugs

| #   | Description | Severity | Blocks Deployment? |
|-----|-------------|----------|-------------------|
|     |             |          |                   |

### Minor Issues

| #   | Description | Severity | Can Defer? |
|-----|-------------|----------|------------|
|     |             |          |            |

### Performance Metrics

- **Page Load Time**: _____ seconds
- **Time to Join Call**: _____ seconds
- **View Mode Transition**: _____ ms

### Browser Compatibility

| Browser         | Status | Notes |
|----------------|--------|-------|
| Chrome (macOS)  | ⏳     |       |
| Safari (macOS)  | ⏳     |       |
| Firefox (macOS) | ⏳     |       |

### Device Compatibility

| Device           | Status | Notes |
|-----------------|--------|-------|
| Desktop 1920x1080 | ⏳     |       |
| Desktop 1440x900  | ⏳     |       |
| iPad Pro         | ⏳     |       |
| iPad Air         | ⏳     |       |

---

## Next Steps

1. ⏳ Verify backend services are ready:
   - Pipecat backend deployed and accessible
   - Tavus avatar integration working
   - Slidev screenshare configured

2. ⏳ Complete Phase 1 (Core Flow Testing)

3. ⏳ Fix critical bugs from Phase 1

4. ⏳ Complete Phase 2 (Cross-Browser Testing)

5. ⏳ Complete Phase 3 (Device Testing)

6. ⏳ Document all findings and close issue #91

7. ⏳ Proceed to Task #92 (Vercel Deployment)
