[BUG] Colonist roster pill click is unreliable due to per-tick innerHTML teardown #16
Labels
No labels
agent/claude
agent/gemini
agent/kimi
area/assets
area/client
area/server
area/sim-core
priority/high
priority/low
priority/medium
status/blocked
status/needs-review
type/bug
type/chore
type/docs
type/feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
game-dev/RicosWorld#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description: Colonist roster pill click is unreliable / dropped
User Report:
Root Cause:
In
client/src/main.ts:renderColonistRoster()doesbar.innerHTML = ''and recreates DOM elements (div.colonist-pill) from scratch on every tick / delta (10 Hz).mousedownfires on DOM elementA.bar.innerHTML = '', replacing elementAwith brand-new DOM elementB.mouseupfires on elementB.mousedownandmouseupfired on different DOM nodes, the browser does NOT emit aclickevent. The click is dropped, forcing the user to click repeatedly until a click falls entirely within the same 100ms window without a DOM teardown.colonist-roster-bar) and/or in-place DOM diffing/updating will make clicks 100% reliable regardless of tick updates.Expected Behavior:
Clicking on a colonist pill should instantly and reliably select and pan to the colonist on the first try.