Repository navigation
[PM-16915] fix: Disable custom field name confirmation for blank names - #7484
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR disables the Okay button in Code Review DetailsNo findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7484 +/- ##
=======================================
Coverage 86.80% 86.80%
=======================================
Files 895 895
Lines 65676 65676
Branches 9384 9384
=======================================
Hits 57007 57007
Misses 5189 5189
Partials 3480 3480
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The targeted validation is correctly implemented and covered by regression tests.
0 open findings
What changed in this PR
Prevents creating or renaming custom fields with blank names.
Changes:
- Adds configurable confirm-button validation to
BitwardenTextEntryDialog. - Requires nonblank custom-field names.
- Adds Compose regression tests for add and rename flows.
❓ No screenshots were provided for the disabled-button UI state.
| File | Description |
|---|---|
BitwardenTextEntryDialog.kt |
Supports conditional confirmation. |
VaultAddEditCustomFieldsButton.kt |
Validates new field names. |
VaultAddEditCustomField.kt |
Validates renamed field names. |
VaultAddEditScreenTest.kt |
Tests blank-name prevention. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| onDismissRequest: () -> Unit, | ||
| autoFocus: Boolean = false, | ||
| initialText: String? = null, | ||
| isConfirmEnabled: (String) -> Boolean = { true }, |
There was a problem hiding this comment.
Can this be handled internally?
It looks like it is always disabled when blank
There was a problem hiding this comment.
I believe that If we use this component in other scenarios that accept empty strings, it would void that ability.
There was a problem hiding this comment.
ok checked and it is not used anywhere else, let's fix that.
PM-16915 fix: [Android] Custom fields can be saved with no labels (Name) [bug-factory poc]
branch: poc/PM-16915
base: main
🎟️ Tracking
PM-16915
📔 Objective
Automated fix produced by the bug factory (AI-49 proof of concept). POC output — review, do not merge.
verified: genuine, live, unduplicated.
BitwardenTextEntryDialog's Okay button is always enabled (BitwardenTextEntryDialog.kt:60-64). Product already settled the intended behaviour on the iOS clone📸 Screenshots
The bug was driven on an emulator before the fix; the phases' captures are in the run directory (
device/). The fix itself is proven by a JVM unit test.After fix:
🧪 Proof
./gradlew :app:testStandardDebugUnitTest --tests "*VaultAddEditScreenTest*blank custom field name*"on the base code (must fail) exited 1; with the fix (must pass) exited 0.Base run
Fix run
🤖 Automated review
⏰ Reminders before merge
Run artifacts:
/Users/andrebispo/.local/share/bug-factory/runs/PM-16915