Skip to content

CHI-3736: Mask identifiers in browser notifications#3964

Open
stephenhand wants to merge 14 commits intomasterfrom
CHI-3736-mask_notifications
Open

CHI-3736: Mask identifiers in browser notifications#3964
stephenhand wants to merge 14 commits intomasterfrom
CHI-3736-mask_notifications

Conversation

@stephenhand
Copy link
Collaborator

Description

Replace standard new message notification title with one that doesn't include the users identifier when masking IDs

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • [n/a] Tested for call contacts

Other Related Issues

None

Verification steps

See ticket

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

… include the users identifier when masking IDs
@stephenhand stephenhand requested a review from gpaoloni February 26, 2026 13:38
return { translateUI, getMessage };
};

export const lookupTranslation = (code: string, parameters: Record<string, string> = {}): string => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot Add unit tests for this new method in the existing unit test file for this module

maskNotifications(channelType);
};

export const maskNotifications = (channelType: TaskChannelDefinition) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot Update the unit tests for this file to cover the logic for masking notifications

Copy link
Contributor

Copilot AI commented Feb 26, 2026

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

Copilot AI and others added 4 commits February 26, 2026 13:58
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
…escribe block

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Add unit tests for lookupTranslation and maskChannelStringsWithIdentifiers notification logic
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates browser notification titles for masked-identifier scenarios so chat message notifications no longer expose user identifiers, using a new localized string and a translation lookup helper.

Changes:

  • Added lookupTranslation helper to compile Flex Manager string templates with optional parameters.
  • Overrode the NewChatMessage browser notification title to a masked, localized title when VIEW_IDENTIFIERS is denied.
  • Added unit tests for lookupTranslation and for the new notification override behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
plugin-hrm-form/src/translations/index.ts Adds lookupTranslation for resolving/compiling translations from Flex Manager strings.
plugin-hrm-form/src/translations/en.json Adds a new key for the masked browser notification title (“New message”).
plugin-hrm-form/src/maskIdentifiers/index.ts Hooks a NewChatMessage browser notification override into the identifier-masking setup.
plugin-hrm-form/src/_tests/translations/index.test.ts Adds test coverage for lookupTranslation.
plugin-hrm-form/src/_tests/maskIdentifiers/index.test.ts Adds test coverage for the notification override when identifiers are masked.

Copy link
Contributor

Copilot AI commented Feb 26, 2026

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

…ing on global

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Fix: Explicitly import Handlebars in translations/index.ts instead of relying on global
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@stephenhand
Copy link
Collaborator Author

stephenhand commented Feb 27, 2026

@copilot fix the unit tests broken by commit ab750c6 and add coverage for deleting the notification

Copy link
Contributor

Copilot AI commented Feb 27, 2026

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

…deletion

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
CHI-3736: Mask identifiers in browser notifications
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