Skip to content

Don't show activity label in BuildingDetail's resident/worker character lists #767

Description

@gaidheal1

Summary

The residents/workers character lists shown in a building's MapDetailCard (via BuildingDetail) append the character's current activity to their name. Drop that — show just the character's name in these lists.

Where it is

frontend/src/components/BuildingDetail/BuildingDetail.tsx:35-40:

function residentLine(resident: BuildingDetailResident): string {
  // "walking" overrides the scheduled activity while moving, same rule as
  // a character's own map tooltip (CharacterTooltipContent).
  const activity = resident.isMoving ? "walking" : resident.currentActivity;
  return activity ? `${resident.name}${activity}` : resident.name;
}

Used for both the Residents list (line 89: renderItem={(resident) => <span>{residentLine(resident)}</span>}) and the Workers list (line 108, same pattern).

Requested change

Render just resident.name in these lists — drop the — {activity} suffix entirely.

Leave the map's own hover tooltip behavior alone — the activity label shown when hovering a character directly on the map (CharacterTooltipContent / the activityLabel logic in frontend/src/components/Map/MapTooltips.tsx:101-110) is a separate code path and is not in scope here.

Notes

  • BuildingDetailResident's currentActivity/isMoving fields (BuildingDetail.tsx:11-16) are only consumed by residentLine — check whether they're still needed as props at all after this change, or whether that's better left as-is in case something else picks them up later.
  • Small, isolated, single-file change — good first issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status
    Staging review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions