8000 BIT-2414: Log organization events by KatherineInCode · Pull Request #686 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

BIT-2414: Log organization events #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Jul 8, 2024
Merged

Conversation

KatherineInCode
Copy link
Contributor
@KatherineInCode KatherineInCode commented Jun 24, 2024

🎟️ Tracking

BIT-2414

📔 Objective

This starts logging organizational events, particularly these:

  • clientViewed
  • clientToggledPasswordVisible
  • clientToggledHiddenFieldVisible
  • clientToggledCardCodeVisible
  • clientCopiedPassword
  • clientCopiedHiddenField
  • clientCopiedCardCode
  • clientAutofilled
  • clientToggledCardNumberVisible

Since these were the ones logged in the MAUI app.

Event storage itself is in the EventService, which will be expanded in a Future PR to actually send the events to the server; this just stores them.

I was uncertain of where best to draw boundaries with wrapper functions, most notably because logging the events is async throws; I settled on a wrapper that does a default handling of the error (logging it) but not a wrapper that puts things in a Task. It seemed reasonable to me that we'd want to maintain the understanding that logging an event is async at the call site, but save the 4 lines of boilerplate to catch an error and log it. I'm open to discussion on this, however.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor
github-actions bot commented Jun 24, 2024

Logo
Checkmarx One – Scan Summary & Details1ef55b47-b625-4a36-b94f-5a1d124c0558

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 27 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 26

Copy link
Contributor
github-actions bot commented Jun 24, 2024
1 Warning
⚠️ Ignoring duplicate libraries: '-lbitwarden_uniffi'
6 Messages
📖 BitwardenActionExtensionTests: Executed 0 tests, with 0 failures (0 expected) in 0 (0.001) seconds
📖 BitwardenAutoFillExtensionTests: Executed 0 tests, with 0 failures (0 expected) in 0 (0.001) seconds
📖 BitwardenShareExtensionTests: Executed 0 tests, with 0 failures (0 expected) in 0 (0.001) seconds
📖 BitwardenSharedTests: Executed 3232 tests, with 12 failures (0 expected) in 58.823 (59.713) seconds
📖 BitwardenTests: Executed 4 tests, with 0 failures (0 expected) in 0.381 (0.404) seconds
📖 NetworkingTests: Executed 26 tests, with 0 failures (0 expected) in 0.062 (0.07) seconds

Bitwarden code coverage

Total coverage: 86.30%

File Coverage
BitwardenShared/Core/Autofill/Services/AutofillCredentialService.swift 95.93%
BitwardenShared/Core/Platform/Services/EventService.swift 97.78%
BitwardenShared/Core/Platform/Services/ServiceContainer.swift 97.41%
BitwardenShared/Core/Platform/Services/StateService.swift 97.50%
BitwardenShared/Core/Platform/Services/Stores/AppSettingsStore.swift 95.69%
BitwardenShared/Core/Vault/Models/Domain/Organization.swift 96.67%
BitwardenShared/UI/Vault/Extensions/Alert+Vault.swift 100.00%
BitwardenShared/UI/Vault/Helpers/AutofillHelper.swift 97.04%
BitwardenShared/UI/Vault/Vault/AutofillList/VaultAutofillListProcessor.swift 90.97%
BitwardenShared/UI/Vault/Vault/VaultGroup/VaultGroupProcessor.swift 97.42%
BitwardenShared/UI/Vault/Vault/VaultList/VaultListProcessor.swift 96.47%
BitwardenShared/UI/Vault/Vault/VaultList/VaultListView.swift 96.23%
BitwardenShared/UI/Vault/VaultItem/AddEditItem/AddEditItemProcessor.swift 92.32%
BitwardenShared/UI/Vault/VaultItem/VaultItemCoordinator.swift 95.44%
BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemAction.swift 98.39%
BitwardenShared/UI/Vault/VaultItem/ViewItem/ViewItemProcessor.swift 96.57%

Powered by Slather

Generated by 🚫 Danger

@KatherineInCode KatherineInCode requested review from a team and matt-livefront June 24, 2024 19:13
@KatherineInCode KatherineInCode marked this pull request as ready for review June 24, 2024 19:14
Copy link
codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.89%. Comparing base (5fd083d) to head (dec0f00).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #686      +/-   ##
==========================================
+ Coverage   87.82%   87.89%   +0.07%     
==========================================
  Files         562      563       +1     
  Lines       27973    28131     +158     
==========================================
+ Hits        24566    24725     +159     
+ Misses       3407     3406       -1     

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

fedemkr
fedemkr previously approved these changes Jul 2, 2024
Copy link
Member
@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

LGTM 🎉 The only thing to improve would be to add the tests that are missing in the Codecov report unless they are very trivial.

@KatherineInCode
Copy link
Contributor Author

I was having a hard time getting Codecov to tell me what it thought was missing, but now it has that, so I'll see what I can do

@KatherineInCode KatherineInCode requested a review from fedemkr July 8, 2024 17:56
@KatherineInCode KatherineInCode merged commit 0f49adc into main Jul 8, 2024
8 checks passed
@KatherineInCode KatherineInCode deleted the bit-2414/log-org-events branch July 8, 2024 20:08
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
0