Skip to content

chore: Revise trigger message to include IP address [CHI-3828]#4271

Merged
gpaoloni merged 8 commits intomasterfrom
gian_CHI-3828
May 1, 2026
Merged

chore: Revise trigger message to include IP address [CHI-3828]#4271
gpaoloni merged 8 commits intomasterfrom
gian_CHI-3828

Conversation

@gpaoloni
Copy link
Copy Markdown
Collaborator

@gpaoloni gpaoloni commented Apr 30, 2026

Description

This PR:

  • Lifts ip and contact identifier into Redux session state.
  • Makes use of the above properties to include in the trigger message, matching the behavior of the older webchat.

Checklist

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

@gpaoloni
Copy link
Copy Markdown
Collaborator Author

@copilot Take a look at the failing unit tests and fix them in a separate PR (to be merged against this one).

  • The changes in the code should not be reverted, only fix the tests according to the new behavior.
  • Where possible, add new test cases.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

@gpaoloni I've opened a new pull request, #4279, to work on those changes. Once the pull request is ready, I'll request review from you.

@gpaoloni gpaoloni requested a review from stephenhand April 30, 2026 17:43
@gpaoloni gpaoloni marked this pull request as ready for review April 30, 2026 17:43
@gpaoloni
Copy link
Copy Markdown
Collaborator Author

@copilot In a new PR, add unit tests for the changes in this PR:

  • aselo-webchat-react-app/src/components/MessagingCanvasPhase.tsx: test that the "auto first message" uses contactIdentifier, ipAddress and DEFAULT_CUSTOMER_DEFAULT_NAME according to which is present.
  • Add tests to the session reducer for the new actions ACTION_SET_IP_ADDRESS and ACTION_SET_CONTACT_IDENTIFIER.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

@gpaoloni I've opened a new pull request, #4282, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits April 30, 2026 20:43
…n reducer new actions [CHI-3828]

Agent-Logs-Url: https://github.com/techmatters/flex-plugins/sessions/c23b823e-464f-47a2-97d4-4b403e917f97

Co-authored-by: gpaoloni <15805319+gpaoloni@users.noreply.github.com>
test: Add unit tests for MessagingCanvasPhase auto-message and session reducer actions [CHI-3828]
@gpaoloni gpaoloni merged commit d57d1df into master May 1, 2026
26 checks passed
@gpaoloni gpaoloni deleted the gian_CHI-3828 branch May 1, 2026 16:05
ipAddress ||
localizeKey(currentTranslations)('Conversation-Participants-CustomerDefaultName') ||
DEFAULT_CUSTOMER_DEFAULT_NAME;
const message = `${autoFirstMessage} ${contactIdentifierWithDefaults}`;
Copy link
Copy Markdown
Collaborator

@stephenhand stephenhand May 5, 2026

Choose a reason for hiding this comment

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

Sorry, missed this. We should always use interpolated string keys for dynamic data like this rather than hardcoding the interpolation. People may not always want the contact identifier to come at the end of their message

Also fallbacks like DEFAULT_AUTO_FIRST_MESSAGE are pointless, localizeKey returns the unmodified key if no translation can be found anywhere in the hierarchy, not a falsey value

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