Skip to content

[PM-32806] feat: Add Add/Edit support for Passport item type#6923

Draft
SaintPatrck wants to merge 4 commits into
mainfrom
new-item-types/PM-32806_addedit-passport
Draft

[PM-32806] feat: Add Add/Edit support for Passport item type#6923
SaintPatrck wants to merge 4 commits into
mainfrom
new-item-types/PM-32806_addedit-passport

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented May 14, 2026

🎟️ Tracking

📔 Objective

Replace the Passport stub in the Add/Edit flow with the full editor so people can save Passport items through the normal create/edit flow. Inputs cover the 13 fields exposed by the SDK's PassportView; sensitive values (passportNumber, nationalIdentificationNumber) reveal-toggle via BitwardenPasswordField, and the three date fields reuse the License date selection stub pending the shared native picker. The Passport state's isSdkSupported override is removed so the normal save path runs end-to-end.

📸 Screenshots

Figma Actual

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label May 14, 2026
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development labels May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the Passport Add/Edit wiring across VaultAddEditScreen, VaultAddEditItemContent, the new VaultAddEditPassportItems and VaultAddEditPassportTypeHandlers, the ViewModel action plumbing, the toCipherType()/toPassport() save mapping, and the accompanying unit and screen tests. The 13 text/date fields, two BitwardenPasswordField reveal toggles, and handler-to-action wiring are consistent with the sibling License implementation. The earlier concerns flagged on prior commits (Passport throwing in toCipherType() and the missing screen-level test coverage) are addressed by 9aaa8250c and the new tests at VaultAddEditScreenTest.kt:2911-3075.

Code Review Details

No blocking findings. Implementation closely mirrors the License Add/Edit pattern, strings resolve to existing resources in :ui/strings.xml, the three date fields intentionally retain the same no-op onClick = {} stub as License pending the shared native date picker (TODO present), and the dropped/unused date handlers (1d0cf4cdd) keep state and actions in sync.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 97.93388% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.01%. Comparing base (d390272) to head (9aaa825).

Files with missing lines Patch % Lines
.../feature/vault/util/VaultAddItemStateExtensions.kt 0.00% 1 Missing and 2 partials ⚠️
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 94.87% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6923      +/-   ##
==========================================
- Coverage   86.29%   86.01%   -0.28%     
==========================================
  Files         856      903      +47     
  Lines       62034    64067    +2033     
  Branches     9017     9072      +55     
==========================================
+ Hits        53532    55109    +1577     
- Misses       5404     5848     +444     
- Partials     3098     3110      +12     
Flag Coverage Δ
app-data 17.00% <0.00%> (-0.27%) ⬇️
app-ui-auth-tools 19.42% <0.00%> (-0.09%) ⬇️
app-ui-platform 15.93% <0.00%> (+0.48%) ⬆️
app-ui-vault 28.76% <97.93%> (+0.85%) ⬆️
authenticator 6.34% <0.00%> (-0.05%) ⬇️
lib-core-network-bridge 4.10% <0.00%> (-0.02%) ⬇️
lib-data-ui 1.13% <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.

.standardHorizontalMargin(),
)
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

QUESTION: Are screen tests for the new Passport Add/Edit Compose UI planned before this leaves draft?

Details

The sibling License Add/Edit PR (#6908) added ~148 lines of screen tests to VaultAddEditScreenTest.kt covering each field’s typing → action wiring (in ItemType_License changing ... should trigger ...TextChange). This PR adds 13 new input fields in vaultAddEditPassportItems plus a new VaultAddEditPassportTypeHandlers, but no corresponding entries were added to VaultAddEditScreenTest.kt.

ViewModel coverage for the PassportType actions is solid, but the screen-level coverage gap means a miswired handler (e.g., onPassportNumberTextChange accidentally hooked to a different field) would not be caught. Worth confirming whether these are deferred follow-up work or expected before promoting out of draft.

@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_passport branch from cafc904 to e33e9ef Compare May 14, 2026 19:13
Base automatically changed from new-item-types/PM-32806_passport to main May 14, 2026 19:43
Replace the Passport stub in the Add/Edit flow with the full editor so
people can create and update Passport items now that the View screen
ships. Inputs cover the 13 fields exposed by the Passport SDK model;
sensitive values reveal-toggle via the password field, and dates reuse
the License date selection stub pending the shared native picker.
@SaintPatrck SaintPatrck force-pushed the new-item-types/PM-32806_addedit-passport branch from b3ac862 to 9aaa825 Compare May 14, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow 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