Expected: one rule for a zero requirement (treat as 1, or force empty, or hide the bar) so a window resize cannot empty a bar that updateState just filled.
Covered by experience-bar-hud.spec.ts (“treats required=0 as 1 in updateState… but resize rebuilds to empty”).
Wave 8 coverage a3 (`ExperienceBarHUD` in `projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/experience-bar-hud.ts`).
`updateState` and `buildUI` disagree when `required` is 0:
- `updateState`: `uValue = clamp(xp / (required || 1))` → 50 XP / 0 required paints a **full** bar (`1`).
- `buildUI` (constructor + `resize`): `ratio = required > 0 ? xp / required : 0` → the same state paints an **empty** bar (`0`).
Repro (unit, jsdom, mocked troika — no GPU):
1. Construct `ExperienceBarHUD(800, 600)`.
2. `updateState(50, 0)` → `uValue === 1`, label `"50 / 0"`.
3. `resize(1024, 768)` → `uValue === 0`, label still `"50 / 0"`.
Expected: one rule for a zero requirement (treat as 1, or force empty, or hide the bar) so a window resize cannot empty a bar that `updateState` just filled.
Covered by `experience-bar-hud.spec.ts` (“treats required=0 as 1 in updateState… but resize rebuilds to empty”).
Resolved in spikersoft-angular PR #819 (merged to master). ExperienceBarHUD required=0 fill agrees between updateState and resize. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). ExperienceBarHUD required=0 fill agrees between updateState and resize. 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.
Wave 8 coverage a3 (
ExperienceBarHUDinprojects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/experience-bar-hud.ts).updateStateandbuildUIdisagree whenrequiredis 0:updateState:uValue = clamp(xp / (required || 1))→ 50 XP / 0 required paints a full bar (1).buildUI(constructor +resize):ratio = required > 0 ? xp / required : 0→ the same state paints an empty bar (0).Repro (unit, jsdom, mocked troika — no GPU):
ExperienceBarHUD(800, 600).updateState(50, 0)→uValue === 1, label"50 / 0".resize(1024, 768)→uValue === 0, label still"50 / 0".Expected: one rule for a zero requirement (treat as 1, or force empty, or hide the bar) so a window resize cannot empty a bar that
updateStatejust filled.Covered by
experience-bar-hud.spec.ts(“treats required=0 as 1 in updateState… but resize rebuilds to empty”).Resolved in spikersoft-angular PR #819 (merged to
master). ExperienceBarHUD required=0 fill agrees between updateState and resize. Closing.