@@ -1063,7 +1063,7 @@ <h1><a href="/">PR Cost Calculator</a></h1>
10631063 id ="repoSampleSize "
10641064 value ="50 "
10651065 min ="1 "
1066- max ="100 "
1066+ max ="250 "
10671067 >
10681068 < div class ="help-text "> 50 (recommended, ±14% accuracy) or 30 (faster, ±18% accuracy)</ div >
10691069 </ div >
@@ -1103,7 +1103,7 @@ <h1><a href="/">PR Cost Calculator</a></h1>
11031103 id ="orgSampleSize "
11041104 value ="50 "
11051105 min ="1 "
1106- max ="100 "
1106+ max ="250 "
11071107 >
11081108 < div class ="help-text "> 50 (recommended, ±14% accuracy) or 30 (faster, ±18% accuracy)</ div >
11091109 </ div >
@@ -1426,7 +1426,7 @@ <h3>Why calculate PR costs?</h3>
14261426 }
14271427 }
14281428
1429- function formatEfficiencyHTML ( efficiencyPct , grade , message , preventableCost , preventableHours , totalCost , totalHours , avgOpenHours , isAnnual = false , annualWasteCost = 0 , annualWasteHours = 0 , wasteHoursPerWeek = 0 , wasteCostPerWeek = 0 , wasteHoursPerAuthorPerWeek = 0 , wasteCostPerAuthorPerWeek = 0 , totalAuthors = 0 , salary = 250000 , benefitsMultiplier = 1.2 , analysisType = 'project' , sourceName = '' , mergeRate = 0 , mergedPRs = 0 , unmergedPRs = 0 , velocityGrade = '' , velocityMessage = '' , mergeRateGrade = '' , mergeRateMessage = '' ) {
1429+ function formatEfficiencyHTML ( efficiencyPct , grade , message , preventableCost , preventableHours , totalCost , totalHours , avgOpenHours , isAnnual = false , annualWasteCost = 0 , annualWasteHours = 0 , wasteHoursPerWeek = 0 , wasteCostPerWeek = 0 , wasteHoursPerAuthorPerWeek = 0 , wasteCostPerAuthorPerWeek = 0 , totalAuthors = 0 , salary = 250000 , benefitsMultiplier = 1.2 , analysisType = 'project' , sourceName = '' , mergeRate = 0 , mergedPRs = 0 , unmergedPRs = 0 , velocityGrade = '' , velocityMessage = '' , mergeRateGrade = '' , mergeRateMessage = '' , days = 60 ) {
14301430 let html = '<div class="efficiency-section">' ;
14311431
14321432 // Development Efficiency box
@@ -1450,6 +1450,8 @@ <h3>Why calculate PR costs?</h3>
14501450 html += `<span style="font-size: 22px; font-weight: 700; color: #1d1d1f;">${ formatTimeUnit ( avgOpenHours ) } </span>` ;
14511451 html += '</div>' ;
14521452 html += `<div class="efficiency-message" style="font-size: 11px;">${ velocityGradeObj . message } </div>` ;
1453+ const cutoffDays = parseInt ( days ) * 2 ;
1454+ html += `<div style="font-size: 11px; color: #86868b; margin-top: 4px;">Excludes open PRs created >${ cutoffDays } d ago</div>` ;
14531455 html += '</div>' ; // Close efficiency-box
14541456
14551457 // Merge Success Rate box (if data available) - use backend-computed grades if provided
@@ -1470,14 +1472,16 @@ <h3>Why calculate PR costs?</h3>
14701472
14711473 // Annual Impact box (only if annual)
14721474 if ( isAnnual && annualWasteCost > 0 ) {
1473- html += '<div class="efficiency-box" style="background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%); border-left: 3px solid #ffcc00;">' ;
1474- html += '<h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600; color: #1d1d1f;">Projected Annual Waste</h3>' ;
1475+ html += '<div class="efficiency-box">' ;
1476+ html += '<h3 style="margin: 0 0 6px 0; font-size: 12px; font-weight: 600; color: #1d1d1f;">Projected Annual Waste</h3>' ;
1477+ html += '<div style="display: flex; align-items: center; gap: 8px; margin-bottom: 2px;">' ;
14751478 const annualWasteRounded = Math . round ( annualWasteCost ) ;
14761479 const annualWasteFormatted = '$' + annualWasteRounded . toLocaleString ( 'en-US' ) ;
1477- html += `<div style="font-size: 28px; font-weight: 700; color: #1d1d1f; margin-bottom: 4px;">${ annualWasteFormatted } </div>` ;
1480+ html += `<span style="font-size: 22px; font-weight: 700; color: #1d1d1f;">${ annualWasteFormatted } </span>` ;
1481+ html += '</div>' ;
14781482 const annualCostPerHead = salary * benefitsMultiplier ;
14791483 const headcount = annualWasteCost / annualCostPerHead ;
1480- html += `<div class="efficiency-message">Equal to ${ headcount . toFixed ( 1 ) } engineers</div>` ;
1484+ html += `<div class="efficiency-message" style="font-size: 11px;" >Equal to ${ headcount . toFixed ( 1 ) } engineers</div>` ;
14811485 html += '</div>' ; // Close efficiency-box
14821486 }
14831487
@@ -2417,7 +2421,7 @@ <h3>Why calculate PR costs?</h3>
24172421 const velocityMessage = e . merge_velocity_message || '' ;
24182422 const mergeRateGrade = e . merge_rate_grade || '' ;
24192423 const mergeRateMessage = e . merge_rate_grade_message || '' ;
2420- html += formatEfficiencyHTML ( extEfficiencyPct , extEfficiency . grade , extEfficiency . message , extPreventableCost , extPreventableHours , e . total_cost , e . total_hours , avgPRDurationHours , true , annualWasteCost , annualWasteHours , wasteHoursPerWeek , wasteCostPerWeek , wasteHoursPerAuthorPerWeek , wasteCostPerAuthorPerWeek , totalAuthors , salary , benefitsMultiplier , analysisType , sourceName , mergeRate , mergedPRs , unmergedPRs , velocityGrade , velocityMessage , mergeRateGrade , mergeRateMessage ) ;
2424+ html += formatEfficiencyHTML ( extEfficiencyPct , extEfficiency . grade , extEfficiency . message , extPreventableCost , extPreventableHours , e . total_cost , e . total_hours , avgPRDurationHours , true , annualWasteCost , annualWasteHours , wasteHoursPerWeek , wasteCostPerWeek , wasteHoursPerAuthorPerWeek , wasteCostPerAuthorPerWeek , totalAuthors , salary , benefitsMultiplier , analysisType , sourceName , mergeRate , mergedPRs , unmergedPRs , velocityGrade , velocityMessage , mergeRateGrade , mergeRateMessage , days ) ;
24212425
24222426 // Add R2R callout if enabled, otherwise generic merge time callout
24232427 // Calculate modeled efficiency (with 1.5h merge time)
0 commit comments