Skip to content

fix(ui): deleted units shouldn't be considered dead or alive#453

Merged
fank merged 1 commit into
OCAP2:mainfrom
JJM273:fix-UnitTab-despawned-units
May 24, 2026
Merged

fix(ui): deleted units shouldn't be considered dead or alive#453
fank merged 1 commit into
OCAP2:mainfrom
JJM273:fix-UnitTab-despawned-units

Conversation

@JJM273
Copy link
Copy Markdown
Contributor

@JJM273 JJM273 commented May 22, 2026

Summary

introduces 3-state unit styling — alive, dead (killed), inactive (despawned/deleted)

Units tab now distinguishes combat deaths (orange, kill event required) from
despawned or pre-spawn units (greyed out), fixing false dead-styling in missions
with frequent server-side cleanup (e.g. Antistasi, Zeus, etc). Respawned players correctly
return to alive styling.

This maintains the intent of PR #422, making deleted units distinct from alive units, but now they are also distinct from dead units as well, making it easy to see the state of a group at a glance. Styling matches existing aesthetic and uses the color for "dead" that is used on the other tabs for death counts.

image

How to test

View a recording where some units die and some are deleted/despawned in game, you will see 3 different styles in the unit list.
View where a player dies and respawns, style will go alive > dead > alive (maintains existing behavior for players)

Checklist

  • cd ui && npm test passes
  • No breaking changes

…ces 3-state unit styling — alive, dead (killed), inactive (despawned/deleted)

  Units tab now distinguishes combat deaths (orange, kill event required) from
  despawned or pre-spawn units (greyed out), fixing false dead-styling in missions
  with frequent server-side cleanup (e.g. Antistasi, Zeus, etc). Respawned players correctly
  return to alive styling.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a distinction between 'dead' and 'inactive' unit statuses in the UnitsTab component. It replaces the binary alive/dead check with a more granular status helper that accounts for kill events and despawning. Corresponding CSS updates were made to style inactive units with dimmed text and dead units with a warning color. Additionally, new test cases were added to verify the styling logic for despawned, killed, and respawned units. I have no feedback to provide as there were no review comments.

@smitt14ua
Copy link
Copy Markdown
Contributor

lgtm

@fank fank merged commit 4d846e9 into OCAP2:main May 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants