Skip to content
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

[PM-16809] Fix remind me later date #4526

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

andrebispo5
Copy link
Contributor

🎟️ Tracking

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

📔 Objective

Fix bug introduced during PR when the remind me later date wasn't being set properly.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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 Jan 7, 2025

Logo
Checkmarx One – Scan Summary & Detailsff84ac13-3d2d-435a-9388-69e59946eefa

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt: 902 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/data/tools/generator/repository/utils/GeneratorRepositoryExtensions.kt: 11 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/data/autofill/manager/AutofillTotpManagerImpl.kt: 37 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModel.kt: 94 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 248 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 237 Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 259 Attack Vector
LOW Use_of_Hardcoded_Password /app/src/main/java/com/x8bit/bitwarden/data/autofill/util/HtmlInfoExtensions.kt: 20 Attack Vector

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release/2024.12-rc13@cabd186). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             release/2024.12-rc13    #4526   +/-   ##
=======================================================
  Coverage                        ?   88.88%           
=======================================================
  Files                           ?      460           
  Lines                           ?    39916           
  Branches                        ?     5686           
=======================================================
  Hits                            ?    35479           
  Misses                          ?     2459           
  Partials                        ?     1978           

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

@@ -79,7 +80,7 @@ class NewDeviceNoticeTwoFactorViewModel @Inject constructor(
authRepository.setNewDeviceNoticeState(
NewDeviceNoticeState(
displayStatus = NewDeviceNoticeDisplayStatus.HAS_SEEN,
lastSeenDate = null,
lastSeenDate = ZonedDateTime.now(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use the clock for this, we should always be using the clock for time in the app.

Do we have any tests that need to be updated?

@@ -60,7 +59,7 @@ class NewDeviceNoticeEmailAccessViewModel @Inject constructor(
authRepository.setNewDeviceNoticeState(
NewDeviceNoticeState(
displayStatus = displayStatus,
lastSeenDate = ZonedDateTime.now(),
lastSeenDate = null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't there be a test for this?

@@ -79,7 +82,7 @@ class NewDeviceNoticeTwoFactorViewModel @Inject constructor(
authRepository.setNewDeviceNoticeState(
NewDeviceNoticeState(
displayStatus = NewDeviceNoticeDisplayStatus.HAS_SEEN,
lastSeenDate = null,
lastSeenDate = ZonedDateTime.now(clock),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@andrebispo5 andrebispo5 merged commit 8310a03 into release/2024.12-rc13 Jan 8, 2025
7 checks passed
@andrebispo5 andrebispo5 deleted the pm-16809/remind-me-later-fix branch January 8, 2025 19:03
@andrebispo5 andrebispo5 restored the pm-16809/remind-me-later-fix branch January 8, 2025 21:44
andrebispo5 added a commit that referenced this pull request Jan 8, 2025
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