Skip to content

PM-30130: feat: Remove the Archive Items feature flag#6667

Draft
david-livefront wants to merge 1 commit intomainfrom
PM-30130-remove-archive-feature-flag
Draft

PM-30130: feat: Remove the Archive Items feature flag#6667
david-livefront wants to merge 1 commit intomainfrom
PM-30130-remove-archive-feature-flag

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Mar 13, 2026

🎟️ Tracking

PM-30130

📔 Objective

This PR removes the Archive Feature flag from the app.

@david-livefront david-livefront added the ai-review Request a Claude code review label Mar 13, 2026
@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:feature Change Type - Feature Development labels Mar 13, 2026
@claude
Copy link
Contributor

claude bot commented Mar 13, 2026

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


Overall Assessment: APPROVE ✅

  • Gather context and review PR diff
  • Review production code changes
  • Review test code changes
  • Post final review

This PR cleanly removes the ArchiveItems feature flag across 29 files, making archive functionality unconditionally enabled. The previous review's critical findings (incomplete cleanup in VaultContent.kt and test files) have all been addressed. The removal is now thorough and complete.

Verification Summary

Check Status
FlagKey.ArchiveItems removed from FlagKey.kt + test + debug UI + strings
All 5 ViewModel FeatureFlagManager references removed (where only used for this flag)
VaultContent.kt conditionals simplified (archive always shown)
Extension function isArchiveEnabled parameters removed (6 functions)
All 14 test files cleaned up
No remaining archiveEnabled/isArchiveEnabled/ArchiveItems references in codebase

Details

  • VaultContent.kt: The three previously flagged locations are fixed — supportingLabel unconditionally uses HIDDEN_TYPES_COUNT, the archive group item is no longer gated, and the trash item cardStyle is unconditionally CardStyle.Bottom.
  • VaultViewModel.kt: Correctly retains FeatureFlagManager injection since it still uses FlagKey.CredentialExchangeProtocolExport.
  • Conditional logic: displayArchiveButton/displayUnarchiveButton in VaultAddEditState and VaultItemState correctly drop only the isArchiveEnabled && prefix while preserving remaining conditions.
  • CipherListViewExtensions: toOverflowActions() correctly simplifies takeIf predicates for archive/unarchive actions.

No issues found.

@claude
Copy link
Contributor

claude bot commented Mar 13, 2026

Overall Assessment: REQUEST CHANGES

Reviewed the removal of the ArchiveItems feature flag. The flag definition, ViewModel integrations, state fields, extension function parameters, and related flow subscriptions are correctly removed across 18 files. However, the cleanup is incomplete: one production file and approximately 11 test files still reference the removed archiveEnabled / isArchiveEnabled fields and parameters, which will cause compilation failures.

Code Review Details
  • CRITICAL: Incomplete removal of archiveEnabled causes compilation errors in production and test code
    • app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultContent.kt:428,442,467
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/util/VaultDataExtensionsTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/util/CipherListViewExtensionsTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultScreenTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultViewModelTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/util/VaultStateExtensionsTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/util/VaultItemListingDataExtensionsTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingScreenTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreenTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/search/util/SearchTypeDataExtensionsTest.kt
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/search/SearchScreenTest.kt

@claude
Copy link
Contributor

claude bot commented Mar 13, 2026

CRITICAL Finding 1: Incomplete cleanup causes compilation errors

The PR removes archiveEnabled from VaultState.ViewState.Content (in VaultViewModel.kt) and isArchiveEnabled from multiple function signatures, but the following files were not updated and still reference the removed fields/parameters:

Production code (compilation error):

  • app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/vault/VaultContent.kt - references state.archiveEnabled at lines 428, 442, and 467. These conditionals should be removed since archive is now always enabled.

Test files (compilation errors):
All of the following test files still pass isArchiveEnabled or archiveEnabled as named parameters to functions/constructors whose signatures no longer accept them:

  • VaultDataExtensionsTest.kt (16+ references)
  • CipherListViewExtensionsTest.kt (15+ references)
  • VaultItemListingDataExtensionsTest.kt (17+ references)
  • SearchTypeDataExtensionsTest.kt (5+ references)
  • VaultAddEditScreenTest.kt (7+ references)
  • VaultScreenTest.kt, VaultViewModelTest.kt, VaultStateExtensionsTest.kt
  • VaultItemListingScreenTest.kt, VaultItemScreenTest.kt, SearchScreenTest.kt

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

Logo
Checkmarx One – Scan Summary & Details832c84e1-db80-48e9-9ea2-33d9aa156915

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

@david-livefront david-livefront force-pushed the PM-30130-remove-archive-feature-flag branch from bbb572f to 6ecdd0e Compare March 17, 2026 18:10
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.78%. Comparing base (ec3c900) to head (6ecdd0e).

Files with missing lines Patch % Lines
...t/bitwarden/ui/vault/feature/vault/VaultContent.kt 75.00% 1 Missing and 3 partials ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 62.50% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6667      +/-   ##
==========================================
+ Coverage   85.76%   85.78%   +0.01%     
==========================================
  Files         805      805              
  Lines       57316    57200     -116     
  Branches     8349     8335      -14     
==========================================
- Hits        49158    49069      -89     
+ Misses       5244     5225      -19     
+ Partials     2914     2906       -8     
Flag Coverage Δ
app-data 17.67% <0.00%> (+0.03%) ⬆️
app-ui-auth-tools 20.85% <0.00%> (+0.03%) ⬆️
app-ui-platform 15.06% <0.00%> (-0.01%) ⬇️
app-ui-vault 25.76% <78.57%> (-0.09%) ⬇️
authenticator 6.62% <0.00%> (+0.01%) ⬆️
lib-core-network-bridge 4.29% <0.00%> (+0.02%) ⬆️
lib-data-ui 0.96% <0.00%> (+<0.01%) ⬆️

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant