Enhance AI Gap Fill Logic and Progression Path Handling
Deploy Development / deploy (push) Successful in 49s
Test Suite / pytest-backend (push) Successful in 45s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s

- Integrated `try_suggest_ai_stage_step` to suggest AI-generated gap fill steps based on user input, improving the automation of the planning process.
- Updated `_enrich_roadmap_unfilled_gap_offers` to conditionally include AI gap fill proposals, enhancing the offer generation logic.
- Implemented `_merge_gap_fill_offers_from_steps` to consolidate gap fill offers from various steps, ensuring a comprehensive list of available offers.
- Modified `ProgressionGraphEditor` to utilize the new merging logic for gap fill offers, improving the user experience in managing offers.
- Enhanced utility functions to streamline the collection and filtering of gap fill offers from API responses.
- Bumped version to reflect the new features and improvements.
This commit is contained in:
Lars committed 2026-06-13 08:36:53 +02:00
1 parent 3f130aa8ad
commit 89c6780294
3 files changed
+77 -22

No files matched your search

@@ -32,6 +32,7 @@ import {
collectGapOffersFromApiResponse,
dedupeGapOffersBySlot,
filterGapOffersForUnfilledSlots,
mergeGapOffersForDraft,
pathQaQualityPercent,
applyResolvedStructuredToDraft,
buildPlanningArtifactFromDraft,
@@ -500,11 +501,14 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
return res
}
const gapOffersFromMatchResponse = (synced, res) =>
filterGapOffersForUnfilledSlots(
synced,
dedupeGapOffersBySlot(collectGapOffersFromApiResponse(res), synced),
)
const runMatchCompareFlow = async (synced, { source = 'match' } = {}) => {
const res = await fetchMatchCompare(synced)
const evalRes = await fetchPathEvaluate(synced)
setGapFillOffers(mergeGapOffersForDraft(synced, res, evalRes))
presentMatchCompare(res, { source })
setPathQa(evalRes?.path_qa || res?.baseline_path_qa || null)
return res
}
const presentMatchCompare = (res, { source = 'manual' } = {}) => {
setSemanticBrief(res?.semantic_brief_summary || null)
@@ -523,22 +527,17 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
let notice =
diffCount > 0
? `Match: ${diffCount} Slot-Vorschlag/Vorschläge — bitte im Dialog prüfen und auswählen.`
: 'Match: Keine abweichenden Slot-Vorschläge — Dialog zur Kontrolle geöffnet.'
: 'Match: Keine abweichenden Bibliotheks-Slots — Dialog zur Kontrolle geöffnet.'
const gapCount = collectGapOffersFromApiResponse(res).length
if (gapCount > 0) {
notice += ` ${gapCount} KI-Angebot(e) für leere Slots im Panel „Graph-Bewertung“.`
}
if (bPct != null && pPct != null && pPct !== bPct) {
notice += ` Pfad-QS Vorschlag fair bewertet: ${bPct} % → ${pPct} %.`
}
setMatchNotice(notice)
}
const runMatchCompareFlow = async (synced, { source = 'match' } = {}) => {
const res = await fetchMatchCompare(synced)
setGapFillOffers(gapOffersFromMatchResponse(synced, res))
presentMatchCompare(res, { source })
const evalRes = await fetchPathEvaluate(synced)
setPathQa(evalRes?.path_qa || res?.baseline_path_qa || null)
return res
}
const runMatch = async () => {
const q = (draft?.goalQuery || '').trim()
if (q.length < 3) {
@@ -601,7 +600,8 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
const evalRes = await fetchPathEvaluate(syncedNext)
const { draft: evaluated, remainingOffers } = applyEvaluateResult(syncedNext, evalRes)
setDraft({ ...evaluated, dirty: true })
setGapFillOffers(remainingOffers)
const mergedOffers = mergeGapOffersForDraft(evaluated, comparePayload, evalRes)
setGapFillOffers(mergedOffers.length > 0 ? mergedOffers : remainingOffers)
setProposedPathQa(null)
setCompareOpen(false)
setComparePayload(null)
@@ -632,7 +632,8 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
const res = await fetchPathEvaluate(synced)
const { draft: evaluated, remainingOffers } = applyEvaluateResult(synced, res)
setDraft(evaluated)
setGapFillOffers(remainingOffers)
const mergedOffers = mergeGapOffersForDraft(evaluated, res)
setGapFillOffers(mergedOffers.length > 0 ? mergedOffers : remainingOffers)
} catch (e) {
setActionErr(e.message || 'Bewertung fehlgeschlagen')
} finally {