Skip to content

PM-31043: Add unarchive button to overflow menus#6387

Merged
david-livefront merged 1 commit intomainfrom
PM-31043-unarchive-list-overflow-button
Jan 21, 2026
Merged

PM-31043: Add unarchive button to overflow menus#6387
david-livefront merged 1 commit intomainfrom
PM-31043-unarchive-list-overflow-button

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Jan 21, 2026

🎟️ Tracking

PM-31043

📔 Objective

This PR adds the unarchive button to the overflow menu for list items on the listing screen, vault screen, and search screen.

📸 Screenshots

⏰ 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

@david-livefront david-livefront requested a review from a team as a code owner January 21, 2026 15:41
@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context t:misc Change Type - ¯\_(ツ)_/¯ labels Jan 21, 2026
@david-livefront david-livefront added the ai-review Request a Claude code review label Jan 21, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Logo
Checkmarx One – Scan Summary & Details1c5072e5-3b28-4742-a214-17c39c7d0e81

Great job! No new security vulnerabilities introduced in this pull request

@claude
Copy link
Contributor

claude bot commented Jan 21, 2026

Claude finished @david-livefront's task in 2m 7s —— View job


Code Review Summary

PR: PM-31043: Add unarchive button to overflow menus

Reviewed: 11 files (+397/-1 lines)

Overview

This PR adds the unarchive button to overflow menus on the listing screen, vault screen, and search screen. The implementation follows the established pattern from the archive functionality (PR #6385).

Assessment

No blocking issues found. This is a clean, well-structured implementation.

What Was Reviewed

Area Status
Security No concerns - follows existing patterns
Correctness Implementation is correct
Breaking Changes None
Test Coverage Adequate - success/failure cases covered for all 3 ViewModels
Pattern Consistency Follows established archive patterns

Implementation Notes

  1. No premium check for unarchive - Unlike handleArchiveClick, the unarchive handlers don't check for premium. This appears intentional - users should be able to unarchive items even without premium to avoid being locked out of their data.

  2. Consistent patterns - The implementation mirrors the archive functionality:

    • UnarchiveClick action in ListingItemOverflowAction.VaultAction
    • handleUnarchiveClick and handleUnarchiveCipherReceive in all 3 ViewModels
    • Button visibility gated by archivedDate != null && deletedDate == null && isArchiveEnabled
  3. Test coverage - Tests cover:

    • Success case (shows snackbar)
    • Error case (shows error dialog)
    • Menu item generation when cipher is archived

Minor Observation (Not Blocking)

There's no test for verifying the unarchive action is NOT shown when isArchiveEnabled = false. A corresponding test exists for archive (toOverflowActions should not return Archive action when Archive is disabled). This is a minor test coverage gap that could be addressed in a follow-up.


Result: Approved

The code is well-implemented, follows established patterns, and has adequate test coverage.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 94.31818% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.57%. Comparing base (afc1ff4) to head (1f8d44c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...warden/ui/platform/feature/search/SearchContent.kt 0.00% 0 Missing and 1 partial ⚠️
...rden/ui/platform/feature/search/SearchViewModel.kt 96.29% 0 Missing and 1 partial ⚠️
...ult/feature/itemlisting/VaultItemListingContent.kt 0.00% 0 Missing and 1 partial ⚠️
...t/feature/itemlisting/VaultItemListingViewModel.kt 96.55% 0 Missing and 1 partial ⚠️
...bitwarden/ui/vault/feature/vault/VaultViewModel.kt 96.29% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6387      +/-   ##
==========================================
+ Coverage   85.56%   85.57%   +0.01%     
==========================================
  Files         764      764              
  Lines       55501    55589      +88     
  Branches     8047     8066      +19     
==========================================
+ Hits        47488    47571      +83     
  Misses       5239     5239              
- Partials     2774     2779       +5     

☔ View full report in Codecov by Sentry.
📢 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.


@Suppress("MaxLineLength")
@Test
fun `toOverflowActions should return Unarchive action when cipher is archive and not deleted`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️

Suggested change
fun `toOverflowActions should return Unarchive action when cipher is archive and not deleted`() {
fun `toOverflowActions should return Unarchive action when cipher is archived and not deleted`() {

SaintPatrck
SaintPatrck previously approved these changes Jan 21, 2026
Copy link
Contributor

@SaintPatrck SaintPatrck left a comment

Choose a reason for hiding this comment

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

LGTM. Nitpick isn't worth blocking. Coverage gap is minor, so I agree it's not a blocker either.

@david-livefront david-livefront force-pushed the PM-31043-unarchive-list-overflow-button branch from adb69d3 to 1f8d44c Compare January 21, 2026 16:24
@github-actions github-actions bot removed the ai-review Request a Claude code review label Jan 21, 2026
@david-livefront david-livefront added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit c52910e Jan 21, 2026
16 checks passed
@david-livefront david-livefront deleted the PM-31043-unarchive-list-overflow-button branch January 21, 2026 17:20
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:misc Change Type - ¯\_(ツ)_/¯

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants