Skip to content

[PM-24364] fix: [Android] Import logins card is not dismissed [bug-factory poc] - #7486

Merged
andrebispo5 merged 2 commits into
mainfrom
PM-24364-import-logins-card-not-dismissed
Oct 15, 2026
Merged

andrebispo5 merged 2 commits into
mainfrom
PM-24364-import-logins-card-not-dismissed

Conversation

@andrebispo5

@andrebispo5 andrebispo5 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

branch: PM-24364-import-logins-card-not-dismissed
base: main

🎟️ Tracking

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

📔 Objective

Automated fix produced by the bug factory (AI-49 proof of concept). Needs review from the owning team before merge.

verified: genuine, live, unduplicated. On the device, "Import logins later" on the import Error dialog returns to My vault with the card still shown. The other "Import logins later" path, on the same build and account, hides the card and sets the Settings badge. The only difference between the two is the missing storeShowImportLogins(false) in ImportLoginsViewModel.kt:87-92.

📸 Screenshots

The bug was reproduced on an emulator before the fix. The fix itself is proven by a JVM unit test.

🧪 Proof

./gradlew :app:testStandardDebugUnitTest --tests "com.x8bit.bitwarden.ui.vault.feature.importlogins.ImportLoginsViewModelTest" on the base code (must fail) exited 1; with the fix (must pass) exited 0.

Base run
:app:transformStandardDebugUnitTestClassesWithAsm FROM-CACHE

> Task :app:testStandardDebugUnitTest

ImportLoginsViewModelTest > FailSyncAcknowledged should remove dialog state, send NavigateBack event, and store first time values() FAILED
    java.lang.AssertionError at ImportLoginsViewModelTest.kt:428

> Task :app:testStandardDebugUnitTest FAILED

[Incubating] Problems report is available at: file://<repo>/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.8.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
205 actionable tasks: 3 executed, 7 from cache, 195 up-to-date

The google-services Gradle plugin needs to be applied on a project with com.android.application or com.android.dynamic-feature.

19 tests completed, 1 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:testStandardDebugUnitTest'.
> There were failing tests. See the report at: file://<repo>/app/build/reports/tests/testStandardDebugUnitTest/index.html

* Try:
> Run with --scan to get full insights from a Build Scan (powered by Develocity).

BUILD FAILED in 14s

Fix run
TO-DATE
> Task :app:processStandardDebugUnitTestManifest UP-TO-DATE
> Task :app:generateStandardDebugUnitTestConfig UP-TO-DATE
> Task :app:koverFindJar UP-TO-DATE
> Task :app:processStandardDebugJavaRes UP-TO-DATE
> Task :app:processStandardDebugUnitTestJavaRes UP-TO-DATE
> Task :app:hiltCollectClassesStandardDebugUnitTest UP-TO-DATE
> Task :app:bundleStandardDebugClassesToRuntimeJar
> Task :app:hiltAggregateDepsStandardDebugUnitTest UP-TO-DATE
> Task :app:hiltJavaCompileStandardDebugUnitTest NO-SOURCE
> Task :app:transformStandardDebugUnitTestClassesWithAsm FROM-CACHE
> Task :app:testStandardDebugUnitTest

[Incubating] Problems report is available at: file://<repo>/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.8.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 17s
205 actionable tasks: 3 executed, 7 from cache, 195 up-to-date
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.8.0/userguide/configuration_cache_enabling.html

The google-services Gradle plugin needs to be applied on a project with com.android.application or com.android.dynamic-feature.

🤖 Automated review

  • Round 1: 0 blocking finding(s)

⏰ Reminders before merge

  • An engineer from the owning team has reviewed this (AI-49 AC i18n #4)
  • Feedback captured as findings

…ctory poc]

Automated fix from the AI-49 bug factory. Proof: ./gradlew :app:testStandardDebugUnitTest --tests "com.x8bit.bitwarden.ui.vault.feature.importlogins.ImportLoginsViewModelTest" must fail on base and pass with the fix.
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.32%. Comparing base (43d7b8b) to head (e1e06f0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7486      +/-   ##
==========================================
- Coverage   86.80%   83.32%   -3.48%     
==========================================
  Files         895      895              
  Lines       65676    68438    +2762     
  Branches     9384     9384              
==========================================
+ Hits        57007    57027      +20     
- Misses       5189     7931    +2742     
  Partials     3480     3480              
Flag Coverage Δ
app-data 18.65% <0.00%> (-0.01%) ⬇️
app-ui-auth-tools 18.68% <0.00%> (-0.01%) ⬇️
app-ui-platform 16.49% <0.00%> (-0.01%) ⬇️
app-ui-vault 26.88% <100.00%> (+<0.01%) ⬆️
authenticator 6.03% <0.00%> (-0.01%) ⬇️
lib-core-network-bridge 4.11% <0.00%> (-0.01%) ⬇️
lib-data-ui 1.23% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@andrebispo5
andrebispo5 marked this pull request as ready for review October 15, 2026 08:52
Copilot AI balanced review requested due to automatic review settings October 15, 2026 08:52
@andrebispo5
andrebispo5 requested review from a team and david-livefront as code owners October 15, 2026 08:52
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This bugfix makes handleFailedSyncAcknowledged in ImportLoginsViewModel store the same first-time-action values that handleConfirmImportLater already stores: it hides the import logins card and turns on the Settings badge. The handler runs only from the "Import logins later" button on the sync Error dialog. Tapping outside the dialog still goes to DismissDialog, so it does not change anything stored. The updated unit test checks both FirstTimeActionManager calls.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

No blocking findings remain, but the PR explicitly requires owning-team review before merge.

0 open findings

What changed in this PR

Fixes the vault’s import-logins card remaining visible after choosing “Import logins later” from the error dialog.

Changes:

  • Persists card dismissal and enables the Settings badge before navigating back.
  • Extends the existing regression test to verify both saved values.
File Description
app/​src/​test/​kotlin/​com/​x8bit/​bitwarden/​ui/​vault/​feature/​importlogins/​ImportLoginsViewModelTest.kt Verifies dismissal and badge persistence.
app/​src/​main/​kotlin/​com/​x8bit/​bitwarden/​ui/​vault/​feature/​importlogins/​ImportLoginsViewModel.kt Saves both preferences when acknowledging the sync failure.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andrebispo5
andrebispo5 added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit cb88abf Oct 15, 2026
35 of 37 checks passed
@andrebispo5
andrebispo5 deleted the PM-24364-import-logins-card-not-dismissed branch October 15, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants