In AutopilotHUD (space-game/hud/autopilot-hud.ts), the "Target Selection" type toggle (Custom Position ⇄ Spacecraft) is unclickable: its click hit-area overlaps the last command button ("Go to Position"), and because handleClick uses this.hitAreas.find(...) (first match wins) with command buttons registered first, a click on the toggle dispatches the goToPositioncommand instead of toggling the target type.
The two rects share x-range and overlap in y[265,284]. Any click in the target-type row lands on goToPosition first.
Root cause
The command-button hit areas use y = posY + (screenHeight - posY - by); the target-type/spacecraft/target-point hit areas use a different formula y = posY + (contentStartY - y) - titleBarHeight. The two formulas disagree, so the target-type rect is placed on top of the last command button instead of below it.
Impact
The target type can never be switched to Spacecraft via mouse.
Consequently the spacecraft selector and target-point selector (both gated on currentTargetType === "spacecraft") are also dead — their click handlers early-return in custom mode.
Clicking the toggle silently issues a "Go to Position" autopilot command — an unexpected side effect.
Fix direction
Compute the target-type / spacecraft-select / target-point hit areas with the same screen-space mapping the command buttons use (screenHeight - by), or derive all hit areas from the meshes' actual positions in one pass, so no two rects overlap.
Notes
Found via unit tests in the frontend coverage sweep (PR #551). Current (buggy) behavior is pinned by a characterization test in autopilot-hud.spec.ts referencing this issue.
### Summary
In `AutopilotHUD` (`space-game/hud/autopilot-hud.ts`), the **"Target Selection" type toggle** (Custom Position ⇄ Spacecraft) is unclickable: its click hit-area overlaps the last command button ("Go to Position"), and because `handleClick` uses `this.hitAreas.find(...)` (first match wins) with command buttons registered first, a click on the toggle dispatches the `goToPosition` **command** instead of toggling the target type.
### Evidence (hit-area rects at default position)
```
command/goToPosition: x[60,380] y[264,284]
targetType: x[60,380] y[265,285] <-- ~fully overlaps the button above, 1px offset
```
The two rects share x-range and overlap in y[265,284]. Any click in the target-type row lands on `goToPosition` first.
### Root cause
The command-button hit areas use `y = posY + (screenHeight - posY - by)`; the target-type/spacecraft/target-point hit areas use a different formula `y = posY + (contentStartY - y) - titleBarHeight`. The two formulas disagree, so the target-type rect is placed on top of the last command button instead of below it.
### Impact
- The target type can never be switched to **Spacecraft** via mouse.
- Consequently the **spacecraft selector** and **target-point selector** (both gated on `currentTargetType === "spacecraft"`) are also dead — their click handlers early-return in custom mode.
- Clicking the toggle silently issues a "Go to Position" autopilot command — an unexpected side effect.
### Fix direction
Compute the target-type / spacecraft-select / target-point hit areas with the same screen-space mapping the command buttons use (`screenHeight - by`), or derive all hit areas from the meshes' actual positions in one pass, so no two rects overlap.
### Notes
Found via unit tests in the frontend coverage sweep (PR #551). Current (buggy) behavior is pinned by a characterization test in `autopilot-hud.spec.ts` referencing this issue.
Re-verified against origin/master — NOT DONE. The bug is pinned as expected behaviour, not fixed.
projects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.spec.ts:86-97 carries a characterization block that says so explicitly:
// CHARACTERIZATION — spikersoft-issues#812 … These tests pin the CURRENT buggy behaviour; flip them when #812 is fixed.
with it("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling") at :90 and it("BUG #812: spacecraft + target-point selectors stay dead …") at :97.
git log origin/master -- '*autopilot-hud*' shows the newest commit is 312568c9 — the commit that added those pinning tests. No subsequent commit touched autopilot-hud.ts.
Flagging this as a pattern rather than a one-off, because it has now bitten this audit four times. #809 (CourseModule.number never assigned), #810 (Boss.selectBossType() throws), #811 (wasm-voxel AES has no round function) and this ticket all have test(coverage) commits that reference the bug number and pin the broken behaviour. Searching git log --grep="#N" finds a commit and it reads like a fix.
The tests themselves are good practice — they're honestly labelled and they'll fail loudly when someone fixes the code. The hazard is purely at the tracker level: a ticket audit that trusts git log --grep will close all four as done. I've noted it in each so the next sweep doesn't.
Remaining: fix the hit-area overlap in autopilot-hud.ts (the toggle's clickable region overlaps the "Go to Position" command button), then invert the two characterization tests so they assert the corrected behaviour.
Re-verified against `origin/master` — **NOT DONE. The bug is pinned as expected behaviour, not fixed.**
`projects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.spec.ts:86-97` carries a characterization block that says so explicitly:
> `// CHARACTERIZATION — spikersoft-issues#812 … These tests pin the CURRENT buggy behaviour; flip them when #812 is fixed.`
with `it("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling")` at `:90` and `it("BUG #812: spacecraft + target-point selectors stay dead …")` at `:97`.
`git log origin/master -- '*autopilot-hud*'` shows the newest commit is `312568c9` — the commit that *added* those pinning tests. No subsequent commit touched `autopilot-hud.ts`.
**Flagging this as a pattern rather than a one-off**, because it has now bitten this audit four times. #809 (`CourseModule.number` never assigned), #810 (`Boss.selectBossType()` throws), #811 (wasm-voxel AES has no round function) and this ticket all have `test(coverage)` commits that reference the bug number and **pin the broken behaviour**. Searching `git log --grep="#N"` finds a commit and it reads like a fix.
The tests themselves are good practice — they're honestly labelled and they'll fail loudly when someone fixes the code. The hazard is purely at the tracker level: a ticket audit that trusts `git log --grep` will close all four as done. I've noted it in each so the next sweep doesn't.
**Remaining:** fix the hit-area overlap in `autopilot-hud.ts` (the toggle's clickable region overlaps the "Go to Position" command button), then invert the two characterization tests so they assert the corrected behaviour.
Verified 2026-08-07 against the synced default branch.
Code:spikersoft-angular@8e5a4048 — still broken. The newest commit touching projects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.ts is 27344de4 (2026-07-18, a SonarQube S7778 telemetry-push refactor) — no hit-area change. autopilot-hud.spec.ts:86-97 still carries the CHARACTERIZATION — spikersoft-issues#812 block with it("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling") at :90 and the dead-selector test at :97.
Live: Frontend-interaction bug; not separately probed. The toggle, the spacecraft selector and the target-point selector remain unreachable by mouse.
Remaining: Compute the target-type / spacecraft-select / target-point hit areas with the same screen-space mapping the command buttons use (screenHeight - by), or derive all hit areas from the meshes' actual positions in one pass so no two rects overlap. Then invert the two characterization tests.
Status: still broken — full detail carried over to the new issue.
Closing here. Work now lives in the repo that holds the fix, so fixes #638 in a PR will
auto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent
Migrated to **spikerj/spikersoft-angular#638** as part of the umbrella-tracker breakup.
Verified 2026-08-07 against the synced default branch.
- **Code:** `spikersoft-angular@8e5a4048` — still broken. The newest commit touching `projects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.ts` is `27344de4` (2026-07-18, a SonarQube S7778 telemetry-push refactor) — no hit-area change. `autopilot-hud.spec.ts:86-97` still carries the `CHARACTERIZATION — spikersoft-issues#812` block with `it("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling")` at `:90` and the dead-selector test at `:97`.
- **Live:** Frontend-interaction bug; not separately probed. The toggle, the spacecraft selector and the target-point selector remain unreachable by mouse.
- **Remaining:** Compute the target-type / spacecraft-select / target-point hit areas with the same screen-space mapping the command buttons use (`screenHeight - by`), or derive all hit areas from the meshes' actual positions in one pass so no two rects overlap. Then invert the two characterization tests.
Status: still broken — full detail carried over to the new issue.
Closing here. Work now lives in the repo that holds the fix, so `fixes #638` in a PR will
auto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent
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.
Summary
In
AutopilotHUD(space-game/hud/autopilot-hud.ts), the "Target Selection" type toggle (Custom Position ⇄ Spacecraft) is unclickable: its click hit-area overlaps the last command button ("Go to Position"), and becausehandleClickusesthis.hitAreas.find(...)(first match wins) with command buttons registered first, a click on the toggle dispatches thegoToPositioncommand instead of toggling the target type.Evidence (hit-area rects at default position)
The two rects share x-range and overlap in y[265,284]. Any click in the target-type row lands on
goToPositionfirst.Root cause
The command-button hit areas use
y = posY + (screenHeight - posY - by); the target-type/spacecraft/target-point hit areas use a different formulay = posY + (contentStartY - y) - titleBarHeight. The two formulas disagree, so the target-type rect is placed on top of the last command button instead of below it.Impact
currentTargetType === "spacecraft") are also dead — their click handlers early-return in custom mode.Fix direction
Compute the target-type / spacecraft-select / target-point hit areas with the same screen-space mapping the command buttons use (
screenHeight - by), or derive all hit areas from the meshes' actual positions in one pass, so no two rects overlap.Notes
Found via unit tests in the frontend coverage sweep (PR #551). Current (buggy) behavior is pinned by a characterization test in
autopilot-hud.spec.tsreferencing this issue.Re-verified against
origin/master— NOT DONE. The bug is pinned as expected behaviour, not fixed.projects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.spec.ts:86-97carries a characterization block that says so explicitly:with
it("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling")at:90andit("BUG #812: spacecraft + target-point selectors stay dead …")at:97.git log origin/master -- '*autopilot-hud*'shows the newest commit is312568c9— the commit that added those pinning tests. No subsequent commit touchedautopilot-hud.ts.Flagging this as a pattern rather than a one-off, because it has now bitten this audit four times. #809 (
CourseModule.numbernever assigned), #810 (Boss.selectBossType()throws), #811 (wasm-voxel AES has no round function) and this ticket all havetest(coverage)commits that reference the bug number and pin the broken behaviour. Searchinggit log --grep="#N"finds a commit and it reads like a fix.The tests themselves are good practice — they're honestly labelled and they'll fail loudly when someone fixes the code. The hazard is purely at the tracker level: a ticket audit that trusts
git log --grepwill close all four as done. I've noted it in each so the next sweep doesn't.Remaining: fix the hit-area overlap in
autopilot-hud.ts(the toggle's clickable region overlaps the "Go to Position" command button), then invert the two characterization tests so they assert the corrected behaviour.Migrated to spikerj/spikersoft-angular#638 as part of the umbrella-tracker breakup.
Verified 2026-08-07 against the synced default branch.
spikersoft-angular@8e5a4048— still broken. The newest commit touchingprojects/spikersoft/src/app/_components/_games/space-game/hud/autopilot-hud.tsis27344de4(2026-07-18, a SonarQube S7778 telemetry-push refactor) — no hit-area change.autopilot-hud.spec.ts:86-97still carries theCHARACTERIZATION — spikersoft-issues#812block withit("BUG #812: clicking the target-type toggle fires the goToPosition command instead of toggling")at:90and the dead-selector test at:97.screenHeight - by), or derive all hit areas from the meshes' actual positions in one pass so no two rects overlap. Then invert the two characterization tests.Status: still broken — full detail carried over to the new issue.
Closing here. Work now lives in the repo that holds the fix, so
fixes #638in a PR willauto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent