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
Owner

Closes #95

  1. 🐛 Memory Leak toast: 'trust draining' → 'compute draining'
  2. 🐛 Harmony tooltip: remove 10× multiplier (values already per-second)
  3. 🐛 autoType(): track as totalAutoClicks instead of totalClicks
  4. 🐛 The Pact (late): guard trigger with pactFlag !== 1 to prevent double-apply
  5. 🐛 Typo: 'AutoCod' → 'AutoCoder'
Closes #95 1. 🐛 Memory Leak toast: 'trust draining' → 'compute draining' 2. 🐛 Harmony tooltip: remove 10× multiplier (values already per-second) 3. 🐛 autoType(): track as totalAutoClicks instead of totalClicks 4. 🐛 The Pact (late): guard trigger with pactFlag !== 1 to prevent double-apply 5. 🐛 Typo: 'AutoCod' → 'AutoCoder'
Timmy added 1 commit 2026-04-13 06:03:02 +00:00
fix: QA bug sweep — 5 fixes (closes #95)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
8e006897a4
1. Memory Leak toast: "trust draining" → "compute draining"
2. Harmony tooltip: remove 10× multiplier (values already per-second)
3. autoType(): track as totalAutoClicks instead of totalClicks
4. The Pact (late): guard trigger with pactFlag !== 1
5. Typo: "AutoCod" → "AutoCoder"
Rockachopa requested changes 2026-04-13 06:06:19 +00:00
Rockachopa left a comment
Owner

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

  1. Memory Leak toast (engine.js:668): Correct. The event drains ops/compute, not trust — "compute draining" is accurate.

  2. Harmony tooltip (engine.js:980): Correct. The harmonyBreakdown values are already per-second rates (set in the tick function around lines 39-58), so the * 10 multiplier was inflating the displayed values by 10×.

  3. autoType() click tracking (engine.js:752): Bug — applied to the wrong function. The diff changes writeCode() (the manual click handler) from G.totalClicks++ to G.totalAutoClicks++. Meanwhile autoType() (line 791) still increments G.totalClicks++. This is backwards:

    • writeCode() handles manual clicks → should increment totalClicks
    • autoType() handles auto-clicks → should increment totalAutoClicks

    As 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 in autoType() at line 791, not in writeCode() at line 752.

  4. The Pact double-apply guard (data.js:615): Correct. Adding G.pactFlag !== 1 to the trigger prevents the 3× impactBoost multiplier from stacking if the trigger condition is re-evaluated after the pact is already sealed.

  5. Typo fix (data.js:774): Correct. "AutoCod" → "AutoCoder".

Requesting changes

Please swap the fix in #3: revert writeCode() line 752 back to G.totalClicks++, and change autoType() line 791 from G.totalClicks++ to G.totalAutoClicks++.

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 1. **Memory Leak toast** (`engine.js:668`): ✅ Correct. The event drains ops/compute, not trust — "compute draining" is accurate. 2. **Harmony tooltip** (`engine.js:980`): ✅ Correct. The `harmonyBreakdown` values are already per-second rates (set in the tick function around lines 39-58), so the `* 10` multiplier was inflating the displayed values by 10×. 3. **autoType() click tracking** (`engine.js:752`): ❌ **Bug — applied to the wrong function.** The diff changes `writeCode()` (the *manual* click handler) from `G.totalClicks++` to `G.totalAutoClicks++`. Meanwhile `autoType()` (line 791) still increments `G.totalClicks++`. This is backwards: - `writeCode()` handles manual clicks → should increment `totalClicks` - `autoType()` handles auto-clicks → should increment `totalAutoClicks` As 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 in `autoType()` at line 791, not in `writeCode()` at line 752. 4. **The Pact double-apply guard** (`data.js:615`): ✅ Correct. Adding `G.pactFlag !== 1` to the trigger prevents the 3× `impactBoost` multiplier from stacking if the trigger condition is re-evaluated after the pact is already sealed. 5. **Typo fix** (`data.js:774`): ✅ Correct. "AutoCod" → "AutoCoder". ## Requesting changes Please swap the fix in #3: revert `writeCode()` line 752 back to `G.totalClicks++`, and change `autoType()` line 791 from `G.totalClicks++` to `G.totalAutoClicks++`.
Owner

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.
Member

Perplexity Review

Verdict: Request Changes

Summary: QA bug sweep with 5 single-line fixes across engine.js and data.js. 1 commit, 2 files, +5/-5. Closes #95.

Blockers:

  1. CI failing (accessibility audit + smoke test both red).
  2. Fix #3 applied to wrong function — agree fully with Rockachopa. The diff changes G.totalClicks++ to G.totalAutoClicks++ in writeCode() (line 752), which is the manual click handler. The fix should instead be in autoType() (line 791). As shipped, this inverts the tracking: manual clicks stop counting in totalClicks (displayed in stats panel at lines 442, 489) and auto-clicks get miscounted as manual.

Notes:

  1. Fixes #1 (memory leak toast), #2 (harmony tooltip 10x), #4 (pact double-apply guard), and #5 (typo) are all correct and clean.
  2. This is a one-line swap to fix: revert line 752 to G.totalClicks++, change line 791 in autoType() from G.totalClicks++ to G.totalAutoClicks++.

Decision: Fix the inverted click tracking before merge.

## Perplexity Review **Verdict: Request Changes** **Summary:** QA bug sweep with 5 single-line fixes across `engine.js` and `data.js`. 1 commit, 2 files, +5/-5. Closes #95. **Blockers:** 1. CI failing (accessibility audit + smoke test both red). 2. Fix #3 applied to wrong function — agree fully with Rockachopa. The diff changes `G.totalClicks++` to `G.totalAutoClicks++` in `writeCode()` (line 752), which is the **manual** click handler. The fix should instead be in `autoType()` (line 791). As shipped, this inverts the tracking: manual clicks stop counting in `totalClicks` (displayed in stats panel at lines 442, 489) and auto-clicks get miscounted as manual. **Notes:** 1. Fixes #1 (memory leak toast), #2 (harmony tooltip 10x), #4 (pact double-apply guard), and #5 (typo) are all correct and clean. 2. This is a one-line swap to fix: revert line 752 to `G.totalClicks++`, change line 791 in `autoType()` from `G.totalClicks++` to `G.totalAutoClicks++`. **Decision:** Fix the inverted click tracking before merge.
Timmy added 1 commit 2026-04-13 06:21:43 +00:00
fix: restore manual click counting in QA bug sweep
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
a2f345593c
Author
Owner

Patched the inverted click-counter bug in this PR and verified locally.

  • restored writeCode() to increment totalClicks
  • moved auto-click tracking to autoType() via totalAutoClicks
  • initialized totalAutoClicks: 0 in game state
  • node scripts/smoke.mjs passes locally

Remaining 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.

Patched the inverted click-counter bug in this PR and verified locally. - restored `writeCode()` to increment `totalClicks` - moved auto-click tracking to `autoType()` via `totalAutoClicks` - initialized `totalAutoClicks: 0` in game state - `node scripts/smoke.mjs` passes locally Remaining 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.
Timmy merged commit bbcce1f064 into main 2026-04-13 06:22:28 +00:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-beacon#96