setHotkeys({ toggleScore: "P" }) returns early because toggleScore still equals "P"
minimap caption stays [M] instead of falling back to [?]
pushToolbarHotkeys() always sends the full 8-action map, so this is latent unless a caller (or a future partial update) omits a key. Rebinding that changes a value still works.
Suggested fix: also treat a key-set mismatch as a change (Object.keys(this.hotkeys).length !== Object.keys(map).length or a two-way diff), then rebuild captions from { ...map } as today.
Found while adding Wave 8 leftover coverage for `toolbar-hud.ts`.
`setHotkeys` only treats the map as changed when **a key present in the new map** differs:
```ts
const changed = Object.keys(map).some((k) => this.hotkeys[k] !== map[k]);
if (!changed) return;
this.hotkeys = { ...map };
```
Dropping a binding while the remaining labels are unchanged is a no-op. Example:
- `setHotkeys({ toggleScore: "P", toggleMinimap: "M" })` paints `[P]` `[M]`
- `setHotkeys({ toggleScore: "P" })` returns early because `toggleScore` still equals `"P"`
- minimap caption stays `[M]` instead of falling back to `[?]`
`pushToolbarHotkeys()` always sends the full 8-action map, so this is latent unless a caller (or a future partial update) omits a key. Rebinding that *changes* a value still works.
Suggested fix: also treat a key-set mismatch as a change (`Object.keys(this.hotkeys).length !== Object.keys(map).length` or a two-way diff), then rebuild captions from `{ ...map }` as today.
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 while adding Wave 8 leftover coverage for
toolbar-hud.ts.setHotkeysonly treats the map as changed when a key present in the new map differs:Dropping a binding while the remaining labels are unchanged is a no-op. Example:
setHotkeys({ toggleScore: "P", toggleMinimap: "M" })paints[P][M]setHotkeys({ toggleScore: "P" })returns early becausetoggleScorestill equals"P"[M]instead of falling back to[?]pushToolbarHotkeys()always sends the full 8-action map, so this is latent unless a caller (or a future partial update) omits a key. Rebinding that changes a value still works.Suggested fix: also treat a key-set mismatch as a change (
Object.keys(this.hotkeys).length !== Object.keys(map).lengthor a two-way diff), then rebuild captions from{ ...map }as today.Fixed in
spikersoft-angularPR #823 (a0f0ccd9). Closing.