maniator / maniator/verticopolis

[Bug]: [P3] Excalibur 0.32 leaks three window keyboard listeners per engine teardown

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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, story context-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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.