Skip to content

PM-43235: bug: Remove edit button for disabled Send types - #7374

Open
david-livefront wants to merge 1 commit into
mainfrom
PM-43235-block-editing-disallowed-sends
Open

PM-43235: bug: Remove edit button for disabled Send types#7374
david-livefront wants to merge 1 commit into
mainfrom
PM-43235-block-editing-disallowed-sends

Conversation

@david-livefront

@david-livefront david-livefront commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

🎟️ Tracking

PM-43235

📔 Objective

This PR updates the SendScreen, SearchScreen, and VaultItemListingScreen to disable the edit button for Sends that are no longer allowed per policy.

@david-livefront
david-livefront requested a review from a team as a code owner September 9, 2026 16:56
@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: REQUEST CHANGES

Reviewed the Send list changes that hide the Edit overflow option for Send types disallowed by the Send Controls policy, covering SendContent, SendListItem, SendViewModel/SendState, the SendData.toViewState mapping, and the accompanying screen, view model, and extension tests. The persistentListOfNotNull usage in SendListItem correctly drops the null Edit entry, both SendListItem call sites were updated, and the new SendType.ITEM -> TODO(...) branch matches the existing convention throughout the Send feature. The main concern is that isEditable is now computed once during the send-data mapping, so it is not refreshed when the policy itself changes while the screen is open.

Code Review Details
  • ⚠️ : isEditable is baked into the view state and never recomputed on a policy or SendControls flag change, leaving a stale Edit option
    • app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt:534
  • ♻️ : Indentation of the every { } block is off by one level relative to the two identical blocks below it
    • app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModelTest.kt:725
  • ❓ : Search and type-filtered Send listings still offer Edit for policy-disallowed types via SendView.toOverflowActions
    • app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/SendContent.kt:136

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.89%. Comparing base (051b2ac) to head (2d094a0).

Files with missing lines Patch % Lines
...it/bitwarden/ui/tools/feature/send/SendListItem.kt 70.37% 5 Missing and 3 partials ⚠️
...bit/bitwarden/ui/tools/feature/send/SendContent.kt 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7374      +/-   ##
==========================================
+ Coverage   85.73%   85.89%   +0.15%     
==========================================
  Files        1056      946     -110     
  Lines       69016    67955    -1061     
  Branches    10279    10217      -62     
==========================================
- Hits        59170    58368     -802     
+ Misses       6233     6001     -232     
+ Partials     3613     3586      -27     
Flag Coverage Δ
app-data 18.05% <0.00%> (-0.35%) ⬇️
app-ui-auth-tools 18.84% <82.00%> (-0.08%) ⬇️
app-ui-platform 16.41% <2.43%> (-0.26%) ⬇️
app-ui-vault 27.69% <2.43%> (-0.01%) ⬇️
authenticator 6.00% <0.00%> (+<0.01%) ⬆️
lib-core-network-bridge 4.03% <0.00%> (-0.04%) ⬇️
lib-data-ui 1.19% <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 Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/SendViewModel.kt Outdated
Comment thread app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/SendContent.kt Outdated
@david-livefront
david-livefront force-pushed the PM-43235-block-editing-disallowed-sends branch 7 times, most recently from c7f0f08 to e9d4c4d Compare September 9, 2026 21:17
@david-livefront
david-livefront force-pushed the PM-43235-block-editing-disallowed-sends branch from e9d4c4d to 2d094a0 Compare September 9, 2026 21:59
iconList = sendView.toLabelIcons(),
shareUrl = sendView.toSendUrl(baseWebSendUrl),
hasPassword = sendView.hasPassword,
overflowItems = sendView.toOverflowActions(baseWebSendUrl),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This PR migrates the SendScreen to use the common toOverflowActions function, which allows us to reuse the logic.

@aj-rosado aj-rosado left a comment

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.

LGTM

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:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants