maniator / maniator/verticopolis
[Bug]: [P3] Excalibur 0.32 leaks three window keyboard listeners per engine teardown
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Imported from the engineering backlog (
_bmad-output/implementation-artifacts/backlog.md, storycontext-loss-recovery).
Priority P3 (do-first order) | Severity: low | Status: open | Epic: stability | Type: review-deferral | Recorded: 2026-07-13
What happened?
Excalibur 0.32 leaks three window keyboard listeners per engine teardown (gds-code-review, Edge Case Hunter). Keyboard.init adds raw keydown/keyup/blur window listeners that Engine.dispose() only flags off (toggleEnabled(false)), never detaches; each in-place recovery therefore strands three small listeners retaining the dead Keyboard object. Bounded and tiny (recoveries are rare), and the big retention paths (texture-GC idle loop, browser-component visibilitychange) are already cut in TowerEngine.dispose(). Revisit if Excalibur ships a fix or if recoveries ever become frequent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the context-loss-recovery entry in _bmad-output/implementation-artifacts/backlog.md, then trace Keyboard.init and Engine.dispose(), including toggleEnabled(false) and TowerEngine.dispose(). Done means an engine teardown no longer leaves three window keyboard listeners retaining the disposed Keyboard object during in-place recovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100