2.2 KiB
2.2 KiB
Project Creation Flow - QA Fix Applied ✅
Issue Found
New projects were not initializing the extensionLinked field, causing the collector checklist to malfunction.
Root Cause
/api/projects/create endpoint was missing extensionLinked: false in the initial project document.
Impact
- Fresh projects had
undefinedforextensionLinked - Collector AI couldn't properly detect extension status
- Checklist showed incorrect state
- Handoff tracking was broken for new projects
Fix Applied
File: app/api/projects/create/route.ts
Change:
Added extensionLinked: false to project initialization:
// ChatGPT data
chatgptUrl: chatgptUrl || null,
// Extension tracking
extensionLinked: false, // ✅ ADDED THIS
status: 'active',
Expected Behavior After Fix
New Project Creation:
- User creates project
- Project document includes
extensionLinked: false - AI Chat page loads → Collector mode activates
- Checklist displays:
- ⭕ Documents uploaded
- ⭕ GitHub connected
- ⭕ Extension linked
Extension Linking:
- User goes to Context page → "Link Extension"
- User enters workspace path → clicks "Link Extension"
- Backend updates
extensionLinked: true - Checklist updates in real-time:
- ⭕ Documents uploaded
- ⭕ GitHub connected
- ✅ Extension linked
AI Awareness:
- AI receives
project.extensionLinked: false(ortrue) - AI updates
collectorHandoff.extensionLinkedaccordingly - Checklist state persists across sessions
Testing Checklist
- Create a new project
- Verify project has
extensionLinked: falsein Firestore - Open AI Chat
- Verify checklist shows 3 items (all unchecked)
- Link extension via Context page
- Verify
extensionLinked: truein Firestore - Verify checklist updates to show extension linked ✅
Related Files
app/api/projects/create/route.ts- Fixedapp/api/extension/link-project/route.ts- Updates extensionLinkedcomponents/ai/collector-checklist.tsx- Displays checklistlib/server/chat-context.ts- Passes extensionLinked to AIlib/ai/prompts/collector.ts- AI checks extensionLinked field
Status
✅ Fixed and ready for testing