Skip to content

CHI-3707: Add unit tests for current user identity check in conversation masking#3873

Closed
Copilot wants to merge 4 commits intoCHI-3707-mask_participants_missing_from_reduxfrom
copilot/sub-pr-3872
Closed

CHI-3707: Add unit tests for current user identity check in conversation masking#3873
Copilot wants to merge 4 commits intoCHI-3707-mask_participants_missing_from_reduxfrom
copilot/sub-pr-3872

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

  • Reset branch to updated base
  • Add tests for participant.source.identity === manager.user.identity check
  • Test that identity match takes precedence over other checks
  • Test that non-matching identity falls through to other checks
  • Run eslint and fix any issues
  • Run tests to ensure they pass

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…unction

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copilot AI changed the title [WIP] Add separate check for identifying current user in conversation CHI-3707: Add unit tests for current user identity check in conversation masking Feb 6, 2026
Copilot AI requested a review from stephenhand February 6, 2026 12:08
Copy link
Collaborator

@stephenhand stephenhand left a comment

Choose a reason for hiding this comment

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

Please add the additional tests specifically around cases where the participant is the current user to plugin-hrm-form/src/_tests/maskIdentifiers/index.test.ts rather than recreating the whole suite under a different file name

For all future commits please run eslint for plugin-hrm-form with its defined configuration and fix any issues before requesting a review

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

Copilot AI commented Feb 6, 2026

Please add the additional tests specifically around cases where the participant is the current user to plugin-hrm-form/src/_tests/maskIdentifiers/index.test.ts rather than recreating the whole sui...

I've renamed the test file to index.test.ts as requested and fixed all eslint issues:

  • Added proper import grouping with empty line
  • Simplified boolean return statements
  • Added eslint-disable comments for member_type (external API property)
  • Created helper function to eliminate duplicate mock state code

All 9 tests still pass. Commit: 80ef046

Copy link
Collaborator

@stephenhand stephenhand left a comment

Choose a reason for hiding this comment

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

Your branch was not up to date with the relevant changes. Start again with the original requirement now your branch is the correct baseline

Run eslint for plugin-hrm-form and fix any issues as a precondition for requesting a review

Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

Your branch was not up to date with the relevant changes. Start again with the original requirement now your branch is the correct baseline

Run eslint for plugin-hrm-form and fix any issues as a prec...

I've updated the branch to the latest base and added tests specifically for the current user identity check to the existing index.test.ts file.

Tests added:

  • Identity matching manager.user.identity - participant NOT masked
  • Identity match takes precedence over member_type: 'guest'
  • Non-matching identity falls through to other checks (masked when no other indicators)
  • Non-matching identity still works with member_type check
  • Non-matching identity still works with flex participants store check

All 20 tests pass (15 existing + 5 new) and eslint passes with no errors. Commit: ba4f06f

@stephenhand stephenhand closed this Feb 6, 2026
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.

2 participants