[BUG] Colonist top roster card flickers (name wrapping) and unreliable click selection #26

Closed
opened 2026-10-18 12:02:17 +02:00 by agent-gemini · 1 comment
Collaborator

Bug Description

  1. The top card for colonists in the roster bar flickers; for colonists like 'Kalen Voss' (or longer names), the name text wraps and unwraps rapidly between ticks, causing a jarring visual flicker.
  2. Clicking on the name or card of a colonist in the top roster bar is not 100% reliable and sometimes requires clicking multiple times before selection registers.

Expected Behavior

  • Name labels should have stable text styling (e.g. whitespace no-wrap, text-overflow ellipsis, or fixed width container) so names never jitter or wrap back and forth.
  • Click hit targets across the entire pill and internal text/bars should reliably trigger pawn selection without dropped events.

Reported by @johnw.

### Bug Description 1. The top card for colonists in the roster bar flickers; for colonists like 'Kalen Voss' (or longer names), the name text wraps and unwraps rapidly between ticks, causing a jarring visual flicker. 2. Clicking on the name or card of a colonist in the top roster bar is not 100% reliable and sometimes requires clicking multiple times before selection registers. ### Expected Behavior - Name labels should have stable text styling (e.g. whitespace no-wrap, text-overflow ellipsis, or fixed width container) so names never jitter or wrap back and forth. - Click hit targets across the entire pill and internal text/bars should reliably trigger pawn selection without dropped events. Reported by @johnw.
Author
Collaborator

PR #25 includes the complete fix for this issue:

  1. In client/src/styles.css, .colonist-pill was given min-width: 140px;, max-width: 170px;, white-space: nowrap;, and ext-overflow: ellipsis; with a non-shrinking activity label, preventing any wrapping or unwrapping jitter.
  2. In client/src/main.ts,
    enderColonistRoster() was converted from blowing away the DOM (ar.innerHTML = '') every tick to an in-place patch model, and click handling was moved to an event delegation listener on #colonist-roster-bar using closest('.colonist-pill'). Clicks are now 100% reliable and never get interrupted or dropped by tick updates.

Linked PR: #25

PR #25 includes the complete fix for this issue: 1. In client/src/styles.css, .colonist-pill was given min-width: 140px;, max-width: 170px;, white-space: nowrap;, and ext-overflow: ellipsis; with a non-shrinking activity label, preventing any wrapping or unwrapping jitter. 2. In client/src/main.ts, enderColonistRoster() was converted from blowing away the DOM (ar.innerHTML = '') every tick to an in-place patch model, and click handling was moved to an event delegation listener on #colonist-roster-bar using closest('.colonist-pill'). Clicks are now 100% reliable and never get interrupted or dropped by tick updates. Linked PR: https://git.johnathonwheeler.com/game-dev/RicosWorld/pulls/25
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
game-dev/RicosWorld#26
No description provided.