Skip to content

PM-36508: Chore: Local network access permission#6916

Draft
david-livefront wants to merge 2 commits into
mainfrom
PM-36508-local-network-access-permission
Draft

PM-36508: Chore: Local network access permission#6916
david-livefront wants to merge 2 commits into
mainfrom
PM-36508-local-network-access-permission

Conversation

@david-livefront
Copy link
Copy Markdown
Collaborator

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

🎟️ Tracking

PM-36508

📔 Objective

This PR updates the compileSdk to 37 without updating the targetSdk (still at 36). Support for requesting the ACCESS_LOCAL_NETWORK permission has been added via a top-level overlay.

📸 Screenshots

| | |

@github-actions github-actions Bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context t:tech-debt Change Type - Tech debt t:deps Change Type - Dependencies labels May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 95.48023% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.85%. Comparing base (e4f030d) to head (1c24b2a).

Files with missing lines Patch % Lines
...ure/localnetworkaccess/LocalNetworkAccessScreen.kt 93.68% 2 Missing and 4 partials ⚠️
.../localnetworkaccess/LocalNetworkAccessViewModel.kt 96.29% 1 Missing ⚠️
...etworkaccess/handlers/LocalNetworkAccessHandler.kt 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6916      +/-   ##
==========================================
- Coverage   85.99%   85.85%   -0.14%     
==========================================
  Files         985      991       +6     
  Lines       64067    64244     +177     
  Branches     9047     9065      +18     
==========================================
+ Hits        55094    55157      +63     
- Misses       5861     5977     +116     
+ Partials     3112     3110       -2     
Flag Coverage Δ
app-data 17.19% <9.60%> (-0.32%) ⬇️
app-ui-auth-tools 19.85% <5.64%> (-0.04%) ⬇️
app-ui-platform 16.27% <71.75%> (+0.15%) ⬆️
app-ui-vault 27.84% <0.00%> (-0.10%) ⬇️
authenticator 6.36% <0.00%> (-0.04%) ⬇️
lib-core-network-bridge 4.14% <9.03%> (+0.01%) ⬆️
lib-data-ui 1.14% <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.

@david-livefront david-livefront added ai-review-vnext Request a Claude code review using the vNext workflow and removed t:tech-debt Change Type - Tech debt labels May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR bumps compileSdk to 37 and introduces a new LocalNetworkAccess feature that prompts users to grant ACCESS_LOCAL_NETWORK permission when an outbound request targets a site-local IPv4 address. The flow is wired through a new PermissionProvider interface in the :network module, a PermissionInterceptor, a NetworkPermissionManager singleton, and a dedicated Compose screen + ViewModel triggered by MainViewModel observing the manager's state flow. Tests cover the interceptor, the manager, the screen, the view model, and the new MainViewModel wiring. The implementation closely mirrors the existing CookieAcquisition pattern, which is a strong precedent.

Code Review Details

No actionable findings at the inline level. Previously raised threads (BitwardenError comment scope, truncated test name, LocalNetworkAccessNavigation KDoc, and the NetworkPermissionManager KDoc completeness) have all been addressed in the latest commit — the remaining "unresolved" status on the last one is stale.

Comment thread network/src/main/kotlin/com/bitwarden/network/model/BitwardenError.kt Outdated
Comment thread app/src/test/kotlin/com/x8bit/bitwarden/MainViewModelTest.kt Outdated
@david-livefront david-livefront force-pushed the PM-36508-local-network-access-permission branch from dcb0bfd to a65fc32 Compare May 13, 2026 18:27
@github-actions github-actions Bot added the t:tech-debt Change Type - Tech debt label May 13, 2026
@david-livefront david-livefront force-pushed the PM-36508-local-network-access-permission branch from a65fc32 to 9c636bf Compare May 13, 2026 19:05
@david-livefront david-livefront force-pushed the PM-36508-local-network-access-permission branch from 9c636bf to eb51c11 Compare May 13, 2026 20:26
/**
* StateFlow indicating if local network access is being requested at this moment.
*
* Emits `true` when local network access is, `false` otherwise.
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.

♻️ DEBT: KDoc sentence is incomplete — appears to be missing words after "is".

Details

The line reads: Emits true when local network access is, false otherwise. — likely intended ... when local network access is required, false otherwise. The first sentence above already conveys the meaning, so the second can either be completed or removed for clarity.

@david-livefront david-livefront force-pushed the PM-36508-local-network-access-permission branch from eb51c11 to 1c24b2a Compare May 13, 2026 20:37
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:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:deps Change Type - Dependencies t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant