[PR #5906] [MERGED] [PM-25824] Add "Import items" screen #32151

Closed
opened 2026-04-18 15:34:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5906
Author: @SaintPatrck
Created: 9/18/2025
Status: Merged
Merged: 9/19/2025
Merged by: @SaintPatrck

Base: mainHead: cxf/app/import-logins-screen


📝 Commits (10+)

  • 8ef8171 [PM-25824] Add "Import items" screen
  • e46df01 Refactor: Improve spacing in ImportItemsScreen
  • 29f9f85 Refactor ImportItemsScreenTest and BitwardenComposeTest
  • 715c9dc Refactor: Format ciphersService.importCiphers call
  • a1377ca Refactor: Pass modifier to ImportItemsScreen
  • 849ef37 Add ImportItemsScreenTest for NavigateToImportFromComputer
  • 9d9648c Refactor ImportItemsViewModel string update
  • feac679 Increase ImportItemsScreen bottom padding
  • ce261e6 Fix onNavigateToImportFromComputer invocation
  • 192ca3d Refactor: Move Suppress annotation in CredentialExchangeImporterImpl

📊 Changes

17 files changed (+775 additions, -215 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt (+23 -21)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/model/ImportCxfPayloadResult.kt (+1 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt (+2 -2)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/model/ImportCredentialsResult.kt (+1 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/composition/LocalManagerProvider.kt (+6 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/manager/snackbar/SnackbarRelay.kt (+1 -0)
app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsScreen.kt (+210 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModel.kt (+121 -100)
app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/handlers/ImportItemsHandler.kt (+51 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt (+1 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt (+1 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt (+3 -3)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/base/BitwardenComposeTest.kt (+3 -0)
app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsScreenTest.kt (+208 -0)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt (+124 -75)
📝 cxf/src/main/kotlin/com/bitwarden/cxf/importer/CredentialExchangeImporterImpl.kt (+8 -1)
📝 ui/src/main/res/values/strings.xml (+11 -10)

📄 Description

🎟️ Tracking

PM-25824

📔 Objective

This commit introduces a new screen that allows users to import items from other credential managers using the Credential Manager Credential Exchange Framework.

The following changes are included:

  • Added ImportItemsScreen to allow users to select an app to import from or navigate to import from computer.
  • Added ImportItemsHandler to handle actions from the ImportItemsScreen.
  • Added new strings for the "Import items" feature.
  • Added new tests for the "Import items" feature.
  • Updated ImportItemsViewModel to handle the logic for the ImportItemsScreen.
  • Updated VaultRepository and CredentialExchangeImportManager to support importing items.
  • Updated LocalManagerProvider to include CredentialExchangeImporter.
  • Updated SnackbarRelay to include VAULT_SYNC_FAILED.
  • Updated CredentialExchangeImporterImpl to handle ImportCredentialsUnknownErrorException.

📸 Screenshots

image
## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/5906 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 9/18/2025 **Status:** ✅ Merged **Merged:** 9/19/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `cxf/app/import-logins-screen` --- ### 📝 Commits (10+) - [`8ef8171`](https://github.com/bitwarden/android/commit/8ef8171562ad340756c688e93407085f54d51ca2) [PM-25824] Add "Import items" screen - [`e46df01`](https://github.com/bitwarden/android/commit/e46df0192448897e2e5fcc90952101e158274bb2) Refactor: Improve spacing in ImportItemsScreen - [`29f9f85`](https://github.com/bitwarden/android/commit/29f9f85805a774c35ada8fb983c6b3fc99dd9c12) Refactor ImportItemsScreenTest and BitwardenComposeTest - [`715c9dc`](https://github.com/bitwarden/android/commit/715c9dcc1de0fd202b712ea467e88589b00749ec) Refactor: Format ciphersService.importCiphers call - [`a1377ca`](https://github.com/bitwarden/android/commit/a1377ca9cebb03bb328ec0755f9f47f7eac12276) Refactor: Pass modifier to ImportItemsScreen - [`849ef37`](https://github.com/bitwarden/android/commit/849ef3781a51bbb54ceb5c8bb80c559e4a02cae1) Add ImportItemsScreenTest for NavigateToImportFromComputer - [`9d9648c`](https://github.com/bitwarden/android/commit/9d9648cbff1c7615d60159ce2d2777ebbaf19b7a) Refactor ImportItemsViewModel string update - [`feac679`](https://github.com/bitwarden/android/commit/feac6796e0ea3ec85769a3532c18adcbcb47b228) Increase ImportItemsScreen bottom padding - [`ce261e6`](https://github.com/bitwarden/android/commit/ce261e6015b3f19d09d92bb51034295129e19628) Fix `onNavigateToImportFromComputer` invocation - [`192ca3d`](https://github.com/bitwarden/android/commit/192ca3dee0b5fea44bb948a670da827187a8ab20) Refactor: Move Suppress annotation in CredentialExchangeImporterImpl ### 📊 Changes **17 files changed** (+775 additions, -215 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerImpl.kt` (+23 -21) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/model/ImportCxfPayloadResult.kt` (+1 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt` (+2 -2) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/repository/model/ImportCredentialsResult.kt` (+1 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/composition/LocalManagerProvider.kt` (+6 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/manager/snackbar/SnackbarRelay.kt` (+1 -0) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsScreen.kt` (+210 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModel.kt` (+121 -100) ➕ `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/handlers/ImportItemsHandler.kt` (+51 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModel.kt` (+1 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CredentialExchangeImportManagerTest.kt` (+1 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt` (+3 -3) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/base/BitwardenComposeTest.kt` (+3 -0) ➕ `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsScreenTest.kt` (+208 -0) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/importitems/ImportItemsViewModelTest.kt` (+124 -75) 📝 `cxf/src/main/kotlin/com/bitwarden/cxf/importer/CredentialExchangeImporterImpl.kt` (+8 -1) 📝 `ui/src/main/res/values/strings.xml` (+11 -10) </details> ### 📄 Description ## 🎟️ Tracking PM-25824 ## 📔 Objective This commit introduces a new screen that allows users to import items from other credential managers using the Credential Manager Credential Exchange Framework. The following changes are included: - Added `ImportItemsScreen` to allow users to select an app to import from or navigate to import from computer. - Added `ImportItemsHandler` to handle actions from the `ImportItemsScreen`. - Added new strings for the "Import items" feature. - Added new tests for the "Import items" feature. - Updated `ImportItemsViewModel` to handle the logic for the `ImportItemsScreen`. - Updated `VaultRepository` and `CredentialExchangeImportManager` to support importing items. - Updated `LocalManagerProvider` to include `CredentialExchangeImporter`. - Updated `SnackbarRelay` to include `VAULT_SYNC_FAILED`. - Updated `CredentialExchangeImporterImpl` to handle `ImportCredentialsUnknownErrorException`. ## 📸 Screenshots <img width="365" alt="image" src="https://github.com/user-attachments/assets/32983ef4-5164-47c2-918e-8660f6184241" /> <video width="356" src="https://github.com/user-attachments/assets/f581f072-e3a2-449b-8ee7-fc07b4521b18" /> ## ⏰ 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 <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-18 15:34:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#32151