QA plans al sugerir HU + cancel analisis + datepicker shadcn
- project-analyzer: saveAsDrafts genera QA plan por cada HU sugerida - DashboardView: cancelAnalysis con AbortController + mensaje limpio - HuDrafts: DatePicker con Calendar + Popover (shadcn-vue) - HuDrafts: formulario dinámico segun tipo (Epic vs HU/Feature/etc) - components/ui: Popover + Calendar creados - qa_plans: tabla separada (cubre drafts + user_stories existentes)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { callAI } from '@/services/ai'
|
||||
import { getSessionsByProject, getSessionSummary, getProjectState } from '@/services/transcriptions-db'
|
||||
import { saveDraft, createDraftId } from '@/services/hu-drafts-db'
|
||||
import { generateAndSavePlan } from '@/services/qa-analyzer'
|
||||
import type { EnrichedUserStory } from '@/stores/workitems'
|
||||
|
||||
export interface AnalysisHU {
|
||||
@@ -129,12 +130,16 @@ export async function saveAsDrafts(
|
||||
})
|
||||
if (isDuplicate) { skipped++; continue }
|
||||
|
||||
const draftId = createDraftId()
|
||||
await saveDraft({
|
||||
id: createDraftId(), projectId, title: hu.title,
|
||||
id: draftId, projectId, title: hu.title,
|
||||
description: hu.description, acceptanceCriteria: hu.acceptance_criteria.join('\n'),
|
||||
priority: hu.priority, type: 'U', metadata: '{}',
|
||||
sourceSessionId, syncStatus: 'draft', createdAt: new Date().toISOString(),
|
||||
})
|
||||
// QA plan: fire-and-forget para no bloquear el guardado
|
||||
generateAndSavePlan(projectId, draftId, hu.title, hu.description, hu.acceptance_criteria.join('\n'))
|
||||
.catch(e => console.error(`[Alpha] QA auto-gen failed for ${hu.title}:`, e))
|
||||
saved++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user