Found during Wave 7 coverage (agent a8) while unit-testing HexatileGameComponent with a mocked WebGLRenderer.
tileCount is a computed over a plain Map:
tileCount=computed(()=>this.hexTiles.size);
hexTiles is filled in generateHexGrid() (AfterViewInit / GLB load). The computed has no signal dependencies, so the first CD caches 0 and the inventory footer {{ tileCount() }} never updates after the grid exists (331 tiles for gridSize = 10).
getExportData() reads the Map directly and is fine; only the HUD count is wrong.
Fix: store the count in a signal updated at the end of generateHexGrid / clearGrid, or replace hexTiles with a signal-backed structure.
Found during Wave 7 coverage (agent a8) while unit-testing `HexatileGameComponent` with a mocked WebGLRenderer.
`tileCount` is a computed over a plain `Map`:
```ts
tileCount = computed(() => this.hexTiles.size);
```
`hexTiles` is filled in `generateHexGrid()` (AfterViewInit / GLB load). The computed has **no signal dependencies**, so the first CD caches `0` and the inventory footer `{{ tileCount() }}` never updates after the grid exists (331 tiles for `gridSize = 10`).
`getExportData()` reads the Map directly and is fine; only the HUD count is wrong.
Fix: store the count in a signal updated at the end of `generateHexGrid` / `clearGrid`, or replace `hexTiles` with a signal-backed structure.
Characterization test: `hexatile-game.logic.spec.ts` asserts `tileCount() === 0` while `hexTiles.size > 100`.
Resolved in spikersoft-angular PR #819 (merged to master). hexatile tileCount() recomputes when the Map mutates. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). hexatile tileCount() recomputes when the Map mutates. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found during Wave 7 coverage (agent a8) while unit-testing
HexatileGameComponentwith a mocked WebGLRenderer.tileCountis a computed over a plainMap:hexTilesis filled ingenerateHexGrid()(AfterViewInit / GLB load). The computed has no signal dependencies, so the first CD caches0and the inventory footer{{ tileCount() }}never updates after the grid exists (331 tiles forgridSize = 10).getExportData()reads the Map directly and is fine; only the HUD count is wrong.Fix: store the count in a signal updated at the end of
generateHexGrid/clearGrid, or replacehexTileswith a signal-backed structure.Characterization test:
hexatile-game.logic.spec.tsassertstileCount() === 0whilehexTiles.size > 100.Resolved in spikersoft-angular PR #819 (merged to
master). hexatile tileCount() recomputes when the Map mutates. Closing.