space-game KeybindingConfigHUD.dispose rebuilds the overlay instead of tearing it down #1079

Closed
opened 2026-08-13 13:34:16 +00:00 by spikerj · 1 comment
Owner

Wave 8 coverage a3 (KeybindingConfigHUD.dispose in projects/spikersoft/src/app/_components/_games/space-game/hud/keybinding-config-hud.ts).

dispose() calls rebuildUI(), which:

  1. removes and disposes current children,
  2. recreates the full overlay (createUI() + updateKeybindingList()).

So ngOnDestroy / HUD teardown that calls dispose() leaves a brand-new troika Text + mesh graph attached to the scene instead of an empty group. Compare dungeon HUDs (clearGroup() then null hit targets) and ShipSelectionHUD (empty group after dispose).

Expected: dispose() should tear down and not rebuild. rebuildUI() is the right helper for resize(), not for dispose.

Covered by keybinding-config-hud.spec.ts (“dispose rebuilds the overlay instead of leaving an empty group”).

Wave 8 coverage a3 (`KeybindingConfigHUD.dispose` in `projects/spikersoft/src/app/_components/_games/space-game/hud/keybinding-config-hud.ts`). `dispose()` calls `rebuildUI()`, which: 1. removes and disposes current children, 2. **recreates** the full overlay (`createUI()` + `updateKeybindingList()`). So `ngOnDestroy` / HUD teardown that calls `dispose()` leaves a brand-new troika `Text` + mesh graph attached to the scene instead of an empty group. Compare dungeon HUDs (`clearGroup()` then null hit targets) and `ShipSelectionHUD` (empty group after dispose). Expected: `dispose()` should tear down and not rebuild. `rebuildUI()` is the right helper for `resize()`, not for dispose. Covered by `keybinding-config-hud.spec.ts` (“dispose rebuilds the overlay instead of leaving an empty group”).
Author
Owner

Resolved in spikersoft-angular PR #819 (merged to master). KeybindingConfigHUD.dispose tears the overlay down instead of rebuilding it. Closing.

Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). KeybindingConfigHUD.dispose tears the overlay down instead of rebuilding it. Closing.
Sign in to join this conversation.