Enhance Progression Path Evaluation and Comparison Logic
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 45s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 38s
Test Suite / playwright-tests (push) Successful in 1m23s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 45s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 38s
Test Suite / playwright-tests (push) Successful in 1m23s
- Introduced `_steps_to_evaluate_payloads` to convert path steps into evaluation payloads for improved quality assessments. - Updated `_build_progression_compare_response` to include a new `proposed_eval` parameter, allowing for fair quality assessment comparisons. - Enhanced `ProgressionGraphEditor` to utilize the new pipeline quality assessment data. - Modified `ProgressionOptimizeCompareModal` to display detailed comparison results, including handling of trivial slot differences and optimization hints. - Bumped version to reflect the new features and improvements.
This commit is contained in:
1 parent
5bca5ef9eb
commit
e828a5da32
4 files changed
+175
-16
No files matched your search
@@ -505,8 +505,9 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
|
||||
setTargetSummary(res?.target_profile_summary || null)
|
||||
const baselineQa = res?.baseline_path_qa || null
|
||||
const proposedQa = res?.proposed_path_qa || res?.path_qa || null
|
||||
const pipelineQa = res?.proposed_path_qa_pipeline || null
|
||||
setPathQa(baselineQa)
|
||||
setProposedPathQa(proposedQa)
|
||||
setProposedPathQa(pipelineQa)
|
||||
|
||||
const openCompareDialog = (diffCount, noticePrefix) => {
|
||||
setComparePayload(res)
|
||||
|
||||
@@ -37,11 +37,17 @@ export default function ProgressionOptimizeCompareModal({
|
||||
const proposedQa = comparison.proposed_path_qa || comparison.path_qa
|
||||
const baselinePct = pathQaQualityPercent(baselineQa)
|
||||
const proposedPct = pathQaQualityPercent(proposedQa)
|
||||
const rematchRounds = proposedQa?.rematch_rounds
|
||||
const rematchCount = Array.isArray(proposedQa?.rematch_log) ? proposedQa.rematch_log.length : 0
|
||||
const refineCount = Array.isArray(proposedQa?.refine_log) ? proposedQa.refine_log.length : 0
|
||||
const hintCount = Number(proposedQa?.optimization_hint_count || 0)
|
||||
const tierCount = Array.isArray(proposedQa?.qa_tiers) ? proposedQa.qa_tiers.length : 0
|
||||
const pipelinePct = pathQaQualityPercent(comparison?.proposed_path_qa_pipeline)
|
||||
const rematchRounds = comparison?.proposed_path_qa_pipeline?.rematch_rounds
|
||||
?? proposedQa?.rematch_rounds
|
||||
const pipelineQa = comparison?.proposed_path_qa_pipeline
|
||||
const rematchCount = Array.isArray(pipelineQa?.rematch_log) ? pipelineQa.rematch_log.length : 0
|
||||
const refineCount = Array.isArray(pipelineQa?.refine_log) ? pipelineQa.refine_log.length : 0
|
||||
const hintCount = Number(pipelineQa?.optimization_hint_count || 0)
|
||||
const tierCount = Array.isArray(pipelineQa?.qa_tiers) ? pipelineQa.qa_tiers.length : 0
|
||||
const noMeaningfulDiffs = slotDiffs.length === 0
|
||||
const proposedNotBetter =
|
||||
proposedPct != null && baselinePct != null && proposedPct <= baselinePct
|
||||
|
||||
const toggle = (midx) => {
|
||||
setSelected((prev) => {
|
||||
@@ -75,10 +81,42 @@ export default function ProgressionOptimizeCompareModal({
|
||||
Optimierung vergleichen
|
||||
</h3>
|
||||
<p style={{ fontSize: '12px', color: 'var(--text3)', marginTop: 0, lineHeight: 1.45 }}>
|
||||
Links dein aktueller Pfad, rechts der Vorschlag nach vollem Match inkl. Auto-Optimierung.
|
||||
Wähle die Slots, die du übernehmen möchtest.
|
||||
Vergleicht deinen Pfad mit dem End-Stand nach Match — beide Seiten mit derselben Bewertungslogik
|
||||
wie „Graph bewerten“. Auto-Rematch-Details stehen im Panel, nicht in der Prozentzahl.
|
||||
</p>
|
||||
|
||||
{noMeaningfulDiffs || proposedNotBetter ? (
|
||||
<div
|
||||
style={{
|
||||
marginBottom: '12px',
|
||||
padding: '10px 12px',
|
||||
borderRadius: '8px',
|
||||
border: '1px solid color-mix(in srgb, var(--danger) 35%, var(--border))',
|
||||
background: 'color-mix(in srgb, var(--danger) 8%, var(--surface2))',
|
||||
fontSize: '12px',
|
||||
lineHeight: 1.45,
|
||||
}}
|
||||
>
|
||||
{noMeaningfulDiffs ? (
|
||||
<strong>Keine inhaltlichen Slot-Änderungen</strong>
|
||||
) : (
|
||||
<strong>Vorschlag nicht besser als dein Pfad</strong>
|
||||
)}
|
||||
{noMeaningfulDiffs ? (
|
||||
<p style={{ margin: '6px 0 0', color: 'var(--text2)' }}>
|
||||
Rematch hat höchstens dieselben Übungen unter anderen IDs getroffen — kein Grund zur
|
||||
Übernahme. Bitte abbrechen.
|
||||
</p>
|
||||
) : (
|
||||
<p style={{ margin: '6px 0 0', color: 'var(--text2)' }}>
|
||||
Fair bewertet liefert der Vorschlag keinen höheren Pfad-QS-Wert. Die frühere niedrigere
|
||||
Pipeline-Zahl{pipelinePct != null ? ` (${pipelinePct} %)` : ''} stammte aus dem
|
||||
Rematch-Lauf, nicht aus dem sichtbaren End-Pfad.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div
|
||||
style={{
|
||||
display: 'grid',
|
||||
@@ -140,7 +178,7 @@ export default function ProgressionOptimizeCompareModal({
|
||||
|
||||
{slotDiffs.length === 0 ? (
|
||||
<p style={{ fontSize: '12px', color: 'var(--text2)' }}>
|
||||
Keine abweichenden Slot-Zuordnungen — der optimierte Lauf liefert denselben Pfad.
|
||||
Keine inhaltlichen Abweichungen — der End-Stand entspricht deinem Pfad.
|
||||
</p>
|
||||
) : (
|
||||
<>
|
||||
@@ -187,9 +225,11 @@ export default function ProgressionOptimizeCompareModal({
|
||||
>
|
||||
<span style={{ color: 'var(--text2)' }}>
|
||||
Bisher: {diff.baseline_title || '— leer —'}
|
||||
{diff.baseline_exercise_id != null ? ` (#${diff.baseline_exercise_id})` : ''}
|
||||
</span>
|
||||
<span style={{ color: 'var(--accent-dark)' }}>
|
||||
Neu: {diff.proposed_title || '— leer —'}
|
||||
{diff.proposed_exercise_id != null ? ` (#${diff.proposed_exercise_id})` : ''}
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
@@ -208,7 +248,7 @@ export default function ProgressionOptimizeCompareModal({
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary"
|
||||
disabled={applying || selected.size === 0 || slotDiffs.length === 0}
|
||||
disabled={applying || selected.size === 0 || slotDiffs.length === 0 || proposedNotBetter}
|
||||
onClick={() => onApplySelected([...selected])}
|
||||
>
|
||||
{applying ? 'Übernehmen …' : `Auswahl übernehmen (${selected.size})`}
|
||||
|
||||
Reference in new issue
Block a user