Hide AI recommendation from results view; keep DB capture

AI text is still generated and saved to calc_submissions for internal
follow-up, but no longer displayed to the user — keeps the detailed
analysis behind the product sign-up wall.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 11:12:02 -04:00
parent ec0b8feac5
commit b26903c4ee
2 changed files with 5 additions and 15 deletions

14
app.js
View File

@@ -129,9 +129,9 @@
ai += `This would represent entirely new interest income for your community at no additional risk.`; ai += `This would represent entirely new interest income for your community at no additional risk.`;
} }
// ── AI recommendation — call server; fall back to client-side text ── // ── AI recommendation — call server to generate & save to DB (not displayed) ──
try { try {
const aiRes = await fetch('/api/calculate', { await fetch('/api/calculate', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({
@@ -140,15 +140,7 @@
totalPotential, opInterest, resInterest, totalPotential, opInterest, resInterest,
}), }),
}); });
if (aiRes.ok) { } catch (_) { /* best-effort — DB save failed silently */ }
const { recommendation } = await aiRes.json();
document.getElementById('calcAiText').textContent = recommendation;
} else {
document.getElementById('calcAiText').textContent = ai;
}
} catch (_) {
document.getElementById('calcAiText').textContent = ai;
}
// ── Animate the main number ── // ── Animate the main number ──
animateValue(document.getElementById('resultAmount'), 0, totalPotential); animateValue(document.getElementById('resultAmount'), 0, totalPotential);

View File

@@ -532,10 +532,8 @@
</div> </div>
</div> </div>
<div class="calc-ai-bubble"> <!-- AI text captured to DB only — not displayed -->
<span class="ai-label">✦ HOA LedgerIQ AI Estimate</span> <p id="calcAiText" style="display:none"></p>
<p id="calcAiText"></p>
</div>
<div class="calc-refine-blurb"> <div class="calc-refine-blurb">
<span class="calc-refine-icon"></span> <span class="calc-refine-icon"></span>