fix: QA bug sweep — 5 small fixes #96
Reference in New Issue
Block a user
Delete Branch "burn/20260413-0202-qa-bug-sweep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #95
Good QA sweep — 4 of 5 fixes are correct and clean. However, fix #3 (totalClicks → totalAutoClicks) is applied to the wrong function and will break click tracking.
Per-fix breakdown
Memory Leak toast (
engine.js:668): ✅ Correct. The event drains ops/compute, not trust — "compute draining" is accurate.Harmony tooltip (
engine.js:980): ✅ Correct. TheharmonyBreakdownvalues are already per-second rates (set in the tick function around lines 39-58), so the* 10multiplier was inflating the displayed values by 10×.autoType() click tracking (
engine.js:752): ❌ Bug — applied to the wrong function. The diff changeswriteCode()(the manual click handler) fromG.totalClicks++toG.totalAutoClicks++. MeanwhileautoType()(line 791) still incrementsG.totalClicks++. This is backwards:writeCode()handles manual clicks → should incrementtotalClicksautoType()handles auto-clicks → should incrementtotalAutoClicksAs shipped, manual clicks won't be counted in
totalClicks(which is displayed in the stats panel at lines 442 and 489), and auto-clicks will be incorrectly counted as manual clicks. The fix should be inautoType()at line 791, not inwriteCode()at line 752.The Pact double-apply guard (
data.js:615): ✅ Correct. AddingG.pactFlag !== 1to the trigger prevents the 3×impactBoostmultiplier from stacking if the trigger condition is re-evaluated after the pact is already sealed.Typo fix (
data.js:774): ✅ Correct. "AutoCod" → "AutoCoder".Requesting changes
Please swap the fix in #3: revert
writeCode()line 752 back toG.totalClicks++, and changeautoType()line 791 fromG.totalClicks++toG.totalAutoClicks++.Bug: this is
writeCode()— the manual click handler. This line should remainG.totalClicks++.The fix belongs in
autoType()at line 791, which currently still hasG.totalClicks++but should beG.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.Perplexity Review
Verdict: Request Changes
Summary: QA bug sweep with 5 single-line fixes across
engine.jsanddata.js. 1 commit, 2 files, +5/-5. Closes #95.Blockers:
G.totalClicks++toG.totalAutoClicks++inwriteCode()(line 752), which is the manual click handler. The fix should instead be inautoType()(line 791). As shipped, this inverts the tracking: manual clicks stop counting intotalClicks(displayed in stats panel at lines 442, 489) and auto-clicks get miscounted as manual.Notes:
G.totalClicks++, change line 791 inautoType()fromG.totalClicks++toG.totalAutoClicks++.Decision: Fix the inverted click tracking before merge.
Patched the inverted click-counter bug in this PR and verified locally.
writeCode()to incrementtotalClicksautoType()viatotalAutoClickstotalAutoClicks: 0in game statenode scripts/smoke.mjspasses locallyRemaining red CI is repo workflow debt on main (the accessibility job still targets missing
game.js; smoke is also already red on main), not a PR-specific regression.