Skip to content

796: adds two new engagement types to NGO engagement - #923

Open
DarrellRoberts wants to merge 11 commits into
developfrom
darrell/feat/new-engagement-statuses
Open

796: adds two new engagement types to NGO engagement#923
DarrellRoberts wants to merge 11 commits into
developfrom
darrell/feat/new-engagement-statuses

Conversation

@DarrellRoberts

@DarrellRoberts DarrellRoberts commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds two new engagement types to NGO engagement:

  • Tried to contact
  • In contact

Currently blocked by be as new values not expected in engagementStatus validation

Related Issues

Addresses #796

Changes

  • Bullet list of meaningful changes (optional)

Screenshots / Demos

Badges

image image

Modal

EN

image

DE

image

Checklist

  • WITHIN THE SCOPE OF AN ISSUE; No unnecessary files included
  • Tests added/updated
  • Documentation updated
  • CI passes

@nadavosa

Copy link
Copy Markdown
Collaborator

Review

Nice, thorough coverage of the two new engagement types across labels, colors, and icons — and confirms this properly closes the @ts-expect-error gaps I flagged on #912.

Inconsistency between the two status-map files

src/components/Dashboard/Profile/common/statusMaps.ts gives the two new statuses distinct, sensible styling:

[AgentEngagementStatusType.INCONTACT]: "var(--color-green-500)",       // ChatsCircleIcon
[AgentEngagementStatusType.TRIED_TO_CONTACT]: "var(--color-grey-200)", // PhoneDisconnectIcon

But src/components/Dashboard/common/statusMaps.ts gives both the same color and icon as each other — and the same as NEW:

[AgentEngagementStatusType.NEW]: "var(--color-green-100)",           // SparkleIcon
[AgentEngagementStatusType.INCONTACT]: "var(--color-green-100)",     // SparkleIcon
[AgentEngagementStatusType.TRIED_TO_CONTACT]: "var(--color-green-100)", // SparkleIcon

Wherever this second file's maps are used (e.g. the Agents list/badges view, matching the "Badges" screenshot in the description), New, In contact, and Tried to contact would render visually identical — no way to tell them apart at a glance, which seems to defeat the point of adding two distinguishable statuses. Worth reusing the same color/icon choices from the Profile/common file here too (or intentionally choosing different-but-still-distinct ones), rather than leaving all three as SparkleIcon/green-100.

Nothing else stands out — translations read fine in both locales, and no other exhaustive Record<AgentEngagementStatus...> map was missed (checked all three usages in the repo).

@DarrellRoberts

Copy link
Copy Markdown
Collaborator Author

thanks for checking @nadavosa & good spot. Have pushed my changes

@arturasmckwcz arturasmckwcz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review findings (automated).

Simplification: src/components/Dashboard/common/statusMaps.ts and src/components/Dashboard/Profile/common/statusMaps.ts are two hand-maintained, structurally parallel maps both keyed on overlapping AgentEngagementStatusType values with no shared source of truth — which is exactly what let this PR half-update one of them (see inline comment). A single canonical AgentEngagementStatusType{color, icon} map imported by both consumers would make this class of drift structurally impossible.

[AgentEngagementStatusType.INCONTACT]: "var(--color-green-100)",
[AgentEngagementStatusType.TRIED_TO_CONTACT]: "var(--color-green-100)",
[AgentEngagementStatusType.NEW]: "var(--color-violet-100)",
[AgentEngagementStatusType.INCONTACT]: "var(--color-green-500)",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Correctness: statusIconMap further down in this file was left unchanged for INCONTACT/TRIED_TO_CONTACT (still SparkleIcon, same as NEW), even though this diff gives them distinct colors here, and the sibling Dashboard/Profile/common/statusMaps.ts gives them distinct icons (ChatsCircleIcon/PhoneDisconnectIcon).

Failure scenario: Any future caller of Dashboard/common/StatusBadge.tsx for engagement status will render the new colors paired with the wrong, stale icon, inconsistent with how the same statuses render on the agent profile page. Currently dormant because AgentCard.tsx only feeds volunteerSearch (not engagementStatus) into this specific StatusBadge, so it won't visibly break until that column is wired up — but the next person to consume this map has no reason to suspect the inconsistency.

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