Skip to content

[PM-34393] Add event logging for organization invite link actions#7826

Open
r-tome wants to merge 10 commits into
mainfrom
ac/pm-34393/invite-link-events
Open

[PM-34393] Add event logging for organization invite link actions#7826
r-tome wants to merge 10 commits into
mainfrom
ac/pm-34393/invite-link-events

Conversation

@r-tome

@r-tome r-tome commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-34393

📔 Objective

Add EventType values for invite link actions (accept, create, edit domains, delete, refresh) and log them from the invite link commands.

CollectController is updated to accept the client-reported Organization_InviteLinkClientCopied event so copy actions performed in the client can be recorded.

Clients PR.

r-tome added 7 commits June 17, 2026 08:42
…events upon invite link acceptance. Update tests to verify event logging functionality.
…s upon invite link creation. Update tests to verify event logging functionality and ensure correct organization retrieval.
…llectController and add corresponding unit tests
@r-tome r-tome added the ai-review Request a Claude code review label Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the addition of organization invite link event logging. The change adds five new EventType values (one OrganizationUser_*, four Organization_*), logs them from the Accept/Create/Update/Delete/Refresh invite link commands, and wires the client-reported Organization_InviteLinkClientCopied event through CollectController. The enum numbering gap at 1523 appears intentional (per the final commit correcting the accepted value), and the client-copied event follows the existing Organization_ClientExportedVault/AutoConfirm handling pattern.

Code Review Details

No findings. The implementation is consistent with established patterns:

  • Event logging is placed after success/error checks in each command, with a defensive null guard on the fetched organization.
  • The new CollectController case mirrors the sibling org-client event handling (null-org skip, then log).
  • Test coverage is thorough — success paths assert Received(1) with the correct event type, error paths assert DidNotReceiveWithAnyArgs(), and the controller tests cover both valid-org and null-org cases.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.29%. Comparing base (0909945) to head (762942c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7826      +/-   ##
==========================================
+ Coverage   61.28%   61.29%   +0.01%     
==========================================
  Files        2226     2226              
  Lines       98296    98326      +30     
  Branches     8884     8888       +4     
==========================================
+ Hits        60242    60273      +31     
  Misses      35934    35934              
+ Partials     2120     2119       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@r-tome r-tome marked this pull request as ready for review June 17, 2026 12:11
@r-tome r-tome requested review from a team as code owners June 17, 2026 12:11
sven-bitwarden
sven-bitwarden previously approved these changes Jun 17, 2026
lastbestdev
lastbestdev previously approved these changes Jun 22, 2026

@lastbestdev lastbestdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - includes changes to handle copied link events from client in collect endpoint, other new events are logged in appropriate commands for create/edit/delete/accept Org invite links

@r-tome r-tome dismissed stale reviews from lastbestdev and sven-bitwarden via 7032014 June 29, 2026 11:54
@sonarqubecloud

Copy link
Copy Markdown

sven-bitwarden
sven-bitwarden previously approved these changes Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants