Skip to content

Commit d1ef950

Browse files
committed
Improve callout
1 parent cc0fa04 commit d1ef950

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

internal/server/static/index.html

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ <h3>Why calculate PR costs?</h3>
12571257
}
12581258
}
12591259

1260-
function formatEfficiencyHTML(efficiencyPct, grade, message, preventableCost, preventableHours, totalCost, totalHours, isAnnual = false, annualWasteCost = 0, annualWasteHours = 0, userCount = 0, salary = 250000, benefitsMultiplier = 1.2, analysisType = 'project') {
1260+
function formatEfficiencyHTML(efficiencyPct, grade, message, preventableCost, preventableHours, totalCost, totalHours, isAnnual = false, annualWasteCost = 0, annualWasteHours = 0, userCount = 0, salary = 250000, benefitsMultiplier = 1.2, analysisType = 'project', sourceName = '') {
12611261
let html = '<div class="efficiency-section">';
12621262
html += '<h2>Workflow Efficiency</h2>';
12631263

@@ -1303,18 +1303,32 @@ <h3>Why calculate PR costs?</h3>
13031303
if (savings > 0) {
13041304
// Format savings without decimals
13051305
const savingsRounded = Math.round(savings);
1306-
const savingsFormatted = '$' + savingsRounded.toLocaleString('en-US');
1306+
1307+
// Format savings in millions or thousands
1308+
let savingsFormatted;
1309+
if (savingsRounded >= 1000000) {
1310+
const millions = (savingsRounded / 1000000).toFixed(1);
1311+
savingsFormatted = '$' + millions + 'M';
1312+
} else if (savingsRounded >= 1000) {
1313+
const thousands = Math.round(savingsRounded / 1000);
1314+
savingsFormatted = '$' + thousands + 'K';
1315+
} else {
1316+
savingsFormatted = '$' + savingsRounded.toLocaleString('en-US');
1317+
}
13071318

13081319
// Calculate headcount savings (fully-loaded salary)
13091320
const fullyLoadedSalary = salary * benefitsMultiplier;
13101321
const headcountSavings = Math.round(savings / fullyLoadedSalary);
13111322

1312-
// Strip + from grade if present (e.g., "C+" → "C")
1313-
const gradeForDisplay = grade.replace('+', '');
1323+
// Use sourceName if available, otherwise default to "you"
1324+
const targetName = sourceName || 'you';
13141325

13151326
html += '<div class="efficiency-callout">';
1316-
html += `<p><strong>Tired of being a ${gradeForDisplay} ${analysisType}?</strong></p>`;
1317-
html += `<p>Come talk to us at <a href="mailto:go-faster@codeGROOVE.dev">go-faster@codeGROOVE.dev</a> to save at least <strong>${savingsFormatted} a year</strong> in lost development velocity. We're serious. That's like <strong>${headcountSavings} free headcount</strong> on your team. It's free for open-source projects.</p>`;
1327+
html += '<p style="font-size: 20px; font-weight: 600; margin-bottom: 20px; line-height: 1.4;">Your eng team isn't slow. Your process is.</p>';
1328+
html += `<p style="font-size: 17px; margin-bottom: 16px;">Code review latency costs <strong>${targetName}</strong> <strong>${savingsFormatted}+ annually</strong>—the output of <strong>${headcountSavings} senior engineers</strong> just evaporating.</p>`;
1329+
html += '<p style="font-size: 17px; margin-bottom: 20px;">We collapse review cycles so your team ships faster. <strong>ROI shows week one.</strong></p>';
1330+
html += '<p style="font-size: 15px; color: #6e6e73; margin-bottom: 16px;">Free forever for open-source projects.</p>';
1331+
html += '<p style="margin: 0;"><a href="mailto:go-faster@codeGROOVE.dev" style="font-size: 17px;">go-faster@codeGROOVE.dev</a></p>';
13181332
html += '</div>';
13191333
}
13201334
}
@@ -1838,7 +1852,7 @@ <h3>Why calculate PR costs?</h3>
18381852
const salary = request.config?.annual_salary || 250000;
18391853
const benefitsMultiplier = request.config?.benefits_multiplier || 1.2;
18401854
const analysisType = mode === 'org' ? 'organization' : 'project';
1841-
html += formatEfficiencyHTML(extEfficiencyPct, extEfficiency.grade, extEfficiency.message, extPreventableCost, extPreventableHours, e.total_cost, e.total_hours, true, annualWasteCost, annualWasteHours, e.unique_users || 0, salary, benefitsMultiplier, analysisType);
1855+
html += formatEfficiencyHTML(extEfficiencyPct, extEfficiency.grade, extEfficiency.message, extPreventableCost, extPreventableHours, e.total_cost, e.total_hours, true, annualWasteCost, annualWasteHours, e.unique_users || 0, salary, benefitsMultiplier, analysisType, sourceName);
18421856

18431857
// Calculate average PR efficiency
18441858
const totalPRs = e.total_prs;

0 commit comments

Comments
 (0)