Skip to content

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

Open
r-tome wants to merge 7 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 7 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 introduces five new EventType values (1523–1628), logs them from the Accept, Create, Update, Delete, and Refresh invite link commands, and adds the client-reported Organization_InviteLinkClientCopied case to CollectController. Enum values are sequential with no collisions, the re-fetch-and-null-check logging pattern is consistent across commands (and EventService internally gates on the org's UseEvents ability), and each command has both positive and negative (DidNotReceive) test coverage.

Code Review Details

No findings at or above the reporting threshold.

Notes considered and intentionally not flagged:

  • The new Organization_InviteLinkClientCopied case in CollectController does not verify org membership before logging. This matches the pre-existing behavior of its sibling cases (Organization_ClientExportedVault, Organization_AutoConfirmEnabled_Admin, Organization_AutoConfirmDisabled_Admin) in the same case block, so it is consistent with the established convention rather than a regression.
  • The GetByIdAsync re-fetch plus null check in the Create/Update/Delete/Refresh commands is acceptable: EventService filters on the organization's UseEvents ability internally.

@sonarqubecloud

Copy link
Copy Markdown

@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.25%. Comparing base (2706c74) to head (f5f5d76).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7826    +/-   ##
========================================
  Coverage   61.25%   61.25%            
========================================
  Files        2193     2210    +17     
  Lines       97296    97850   +554     
  Branches     8767     8836    +69     
========================================
+ Hits        59601    59941   +340     
- Misses      35582    35779   +197     
- Partials     2113     2130    +17     

☔ 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
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.

2 participants