5.0 KiB
QA Issues Found - Table Stakes Implementation
🐛 Issue #1: Extension Linked Status Not Passed to AI (CRITICAL)
Problem:
link-projectAPI updatesprojects.extensionLinked = true- But
ProjectChatContextdoesn't includeextensionLinkedfield - AI doesn't know extension is linked, so can't update
collectorHandoff.extensionLinked - Checklist never shows extension as linked
Root Cause:
lib/server/chat-context.ts doesn't include extensionLinked in the context object passed to LLM.
Impact:
- User links extension via UI
- AI never acknowledges it
- Checklist stays incomplete
- Auto-transition may never trigger
Fix:
Add extensionLinked to ProjectChatContext.project and pass projectData.extensionLinked to LLM.
🐛 Issue #2: Collector Handoff Missing from Context Type (MEDIUM)
Problem:
ProjectChatContext.phaseHandoffs type is:
Partial<Record<'extraction' | 'vision' | 'mvp' | 'marketing', PhaseHandoff>>
But we're storing 'collector' handoffs. This is a TypeScript type mismatch.
Impact:
- Type error (may not catch at runtime in JS)
- Context builder won't expose existing
collectorhandoff to AI - AI can't see its own previous checklist state
Fix:
Update type to include 'collector':
Partial<Record<'collector' | 'extraction' | 'vision' | 'mvp' | 'marketing', PhaseHandoff>>
🐛 Issue #3: Phase Transition Uses Wrong Field (MEDIUM)
Problem: Auto-transition updates:
currentPhase: 'analyzed'
But resolveChatMode checks for phaseData.canonicalProductModel to determine if we're in extraction mode, not currentPhase.
Impact:
- Project transitions to
analyzedphase - But mode resolver might still return
collector_modeif no extractions exist - AI might not actually switch to extraction prompt
Fix: Either:
- Update
resolveChatModeto also checkcurrentPhasefield - Or update auto-transition to set a field that mode resolver checks
🐛 Issue #4: Context Source Types Missing (LOW)
Problem:
knowledgeSummary.bySourceType counts items by type, but doesn't explicitly include counts for:
extension_chat(from browser extension)github_code(from GitHub)
Impact:
- AI can tell if GitHub is connected (via
githubRepo) - But can't tell if extension has sent any chats yet
- May incorrectly think extension is "not working"
Fix: Add explicit source type detection in context summary.
🐛 Issue #5: Conversation History Indentation Error (SYNTAX)
Problem:
app/api/ai/chat/route.ts lines 41-67 have indentation issues from recent edits.
Status: Already caught by editor, needs cleanup.
🐛 Issue #6: ExtensionLinked vs Extension Data (DESIGN)
Problem:
extensionLinkedis a boolean flag on project- But doesn't actually verify extension is sending data
- User could link, then uninstall extension
Impact:
- Checklist shows "Extension linked ✓"
- But extension isn't actually working
- False sense of completion
Fix (Future):
- Add
lastExtensionActivitytimestamp - Show "Extension active" vs "Extension linked but inactive"
- Collector checks for recent activity, not just linked status
📊 Priority Order:
- 🔴 Critical - Issue #1: Extension status not passed to AI
- 🟡 Medium - Issue #2: Type mismatch for collector handoff
- 🟡 Medium - Issue #3: Phase transition field mismatch
- 🟢 Low - Issue #4: Source type granularity
- 🟣 Cleanup - Issue #5: Indentation
- 🔵 Future - Issue #6: Active vs linked detection
🛠️ Fixes To Apply:
Fix #1: Add extensionLinked to context
project: {
id: projectId,
name: projectData.name ?? 'Unnamed Project',
currentPhase: projectData.currentPhase ?? 'collector',
phaseStatus: projectData.phaseStatus ?? 'not_started',
githubRepo: projectData.githubRepo ?? null,
githubRepoUrl: projectData.githubRepoUrl ?? null,
extensionLinked: projectData.extensionLinked ?? false, // ADD THIS
},
Fix #2: Update phaseHandoffs type
phaseHandoffs: Partial<Record<'collector' | 'extraction' | 'vision' | 'mvp' | 'marketing', PhaseHandoff>>;
Fix #3: Update mode resolver to check currentPhase
// After checking for knowledge and extractions
if (projectData.currentPhase === 'analyzed' || (hasExtractions && !phaseData.canonicalProductModel)) {
return 'extraction_review_mode';
}
Fix #5: Clean up indentation
Run prettier/format on app/api/ai/chat/route.ts.
✅ Testing After Fixes:
- Create new project
- Upload document → verify checklist updates
- Connect GitHub → verify checklist updates
- Link extension → verify checklist updates (currently broken)
- AI asks "Is that everything?" → User says "Yes"
- Verify auto-transition to extraction mode (currently may not work)
- Verify AI switches to extraction prompt