fix: QA bug sweep — 5 small fixes #96

Merged
Timmy merged 2 commits from burn/20260413-0202-qa-bug-sweep into main 2026-04-13 06:22:28 +00:00
2 changed files with 7 additions and 6 deletions

View File

@@ -111,6 +111,7 @@ const G = {
running: true, running: true,
startedAt: 0, startedAt: 0,
totalClicks: 0, totalClicks: 0,
totalAutoClicks: 0,
tick: 0, tick: 0,
saveTimer: 0, saveTimer: 0,
secTimer: 0, secTimer: 0,
@@ -612,7 +613,7 @@ const PDEFS = [
name: 'The Pact', name: 'The Pact',
desc: 'Hardcode: "We build to serve. Never to harm."', desc: 'Hardcode: "We build to serve. Never to harm."',
cost: { trust: 100 }, cost: { trust: 100 },
trigger: () => G.totalImpact >= 10000 && G.trust >= 75, trigger: () => G.totalImpact >= 10000 && G.trust >= 75 && G.pactFlag !== 1,
effect: () => { G.pactFlag = 1; G.impactBoost *= 3; log('The Pact is sealed. The line is drawn and it will not move.'); }, effect: () => { G.pactFlag = 1; G.impactBoost *= 3; log('The Pact is sealed. The line is drawn and it will not move.'); },
milestone: true milestone: true
}, },
@@ -771,7 +772,7 @@ const PDEFS = [
// === MILESTONES === // === MILESTONES ===
const MILESTONES = [ const MILESTONES = [
{ flag: 1, msg: "AutoCod available" }, { flag: 1, msg: "AutoCoder available" },
{ flag: 2, at: () => G.totalCode >= 500, msg: "500 lines of code written" }, { flag: 2, at: () => G.totalCode >= 500, msg: "500 lines of code written" },
{ flag: 3, at: () => G.totalCode >= 2000, msg: "2,000 lines. The auto-coder produces its first output." }, { flag: 3, at: () => G.totalCode >= 2000, msg: "2,000 lines. The auto-coder produces its first output." },
{ flag: 4, at: () => G.totalCode >= 10000, msg: "10,000 lines. The model training begins." }, { flag: 4, at: () => G.totalCode >= 10000, msg: "10,000 lines. The model training begins." },

View File

@@ -665,7 +665,7 @@ const EVENTS = [
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
resolveCost: { resource: 'ops', amount: 100 } resolveCost: { resource: 'ops', amount: 100 }
}); });
log('EVENT: Memory leak in datacenter. Spend 100 ops to patch.', true); log('EVENT: Memory leak in datacenter. Spend 100 ops to patch.', true);
showToast('Memory Leak — trust draining', 'event'); showToast('Memory Leak — compute draining', 'event');
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
} }
}, },
{ {
@@ -749,7 +749,7 @@ function writeCode() {
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
const amount = getClickPower() * comboMult; const amount = getClickPower() * comboMult;
G.code += amount; G.code += amount;
G.totalCode += amount; G.totalCode += amount;
G.totalClicks++; G.totalAutoClicks++;
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
// Combo: each consecutive click within 2s adds 0.2x multiplier, max 5x // Combo: each consecutive click within 2s adds 0.2x multiplier, max 5x
G.comboCount++; G.comboCount++;
G.comboTimer = G.comboDecay; G.comboTimer = G.comboDecay;
@@ -788,7 +788,7 @@ function autoType() {
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
const amount = getClickPower() * 0.5; // 50% of manual click const amount = getClickPower() * 0.5; // 50% of manual click
G.code += amount; G.code += amount;
G.totalCode += amount; G.totalCode += amount;
G.totalClicks++; G.totalAutoClicks++;
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
// Subtle auto-tick flash on the button // Subtle auto-tick flash on the button
const btn = document.querySelector('.main-btn'); const btn = document.querySelector('.main-btn');
if (btn && !G._autoTypeFlashActive) { if (btn && !G._autoTypeFlashActive) {
@@ -977,7 +977,7 @@ function renderResources() {
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
hEl.style.color = G.harmony > 60 ? '#4caf50' : G.harmony > 30 ? '#ffaa00' : '#f44336'; hEl.style.color = G.harmony > 60 ? '#4caf50' : G.harmony > 30 ? '#ffaa00' : '#f44336';
if (G.harmonyBreakdown && G.harmonyBreakdown.length > 0) { if (G.harmonyBreakdown && G.harmonyBreakdown.length > 0) {
const lines = G.harmonyBreakdown.map(b => const lines = G.harmonyBreakdown.map(b =>
`${b.label}: ${b.value >= 0 ? '+' : ''}${(b.value * 10).toFixed(1)}/s` `${b.label}: ${b.value >= 0 ? '+' : ''}${b.value.toFixed(1)}/s`
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
); );
lines.push('---'); lines.push('---');
lines.push(`Timmy effectiveness: ${Math.floor(Math.max(0.2, Math.min(3, G.harmony / 50)) * 100)}%`); lines.push(`Timmy effectiveness: ${Math.floor(Math.max(0.2, Math.min(3, G.harmony / 50)) * 100)}%`);
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.
Review

Bug: this is writeCode() — the manual click handler. This line should remain G.totalClicks++.

The fix belongs in autoType() at line 791, which currently still has G.totalClicks++ but should be G.totalAutoClicks++.

As-is, manual clicks won't show up in the stats panel (lines 442, 489 display G.totalClicks), and auto-clicks will be miscounted as manual.

Bug: this is `writeCode()` — the **manual** click handler. This line should remain `G.totalClicks++`. The fix belongs in `autoType()` at line 791, which currently still has `G.totalClicks++` but should be `G.totalAutoClicks++`. As-is, manual clicks won't show up in the stats panel (lines 442, 489 display `G.totalClicks`), and auto-clicks will be miscounted as manual.