Skip to content

[PM-32121] Add CookieAcquisition screen and ViewModel#6523

Open
SaintPatrck wants to merge 2 commits intomainfrom
cookie-vending/p10-t11_cookie-acquisition-screen
Open

[PM-32121] Add CookieAcquisition screen and ViewModel#6523
SaintPatrck wants to merge 2 commits intomainfrom
cookie-vending/p10-t11_cookie-acquisition-screen

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Feb 12, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32121

📔 Objective

Add the Cookie Acquisition screen and ViewModel for the cookie-vending flow. This screen prompts users to sync cookies with their browser when required by their SSO configuration.

Changes:

  • CookieAcquisitionScreen — Stateless Compose screen with launch browser, continue without syncing, and help link actions
  • CookieAcquisitionViewModel — BaseViewModel with State/Action/Event pattern, handles cookie callback results from deep link, manages pending cookie acquisition request lifecycle
  • CookieAcquisitionNavigation — Type-safe navigation with @Serializable route and slide transitions
  • CookieAcquisitionHandler — Remembered handler for action dispatch
  • ill_sso_cookie_sync.xml — Vector drawable illustration for the screen
  • Full test coverage for both ViewModel and Screen

📸 Screenshots

Comp Actual (preview)

@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context labels Feb 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Logo
Checkmarx One – Scan Summary & Details31412afa-560c-43d9-9a88-81e8668a057b

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

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 94.35028% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.37%. Comparing base (4cdd0b8) to head (e9112e0).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ature/cookieacquisition/CookieAcquisitionScreen.kt 93.54% 2 Missing and 4 partials ⚠️
...re/cookieacquisition/CookieAcquisitionViewModel.kt 95.31% 2 Missing and 1 partial ⚠️
...ieacquisition/handlers/CookieAcquisitionHandler.kt 95.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6523      +/-   ##
==========================================
- Coverage   86.38%   86.37%   -0.01%     
==========================================
  Files         777      792      +15     
  Lines       56175    56599     +424     
  Branches     8170     8191      +21     
==========================================
+ Hits        48527    48889     +362     
- Misses       4804     4857      +53     
- Partials     2844     2853       +9     

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

@SaintPatrck SaintPatrck force-pushed the cookie-vending/p10-t11_cookie-acquisition-screen branch from e930fe1 to 2bf6340 Compare February 12, 2026 16:20
import javax.inject.Inject

private const val KEY_STATE = "state"
private const val HELP_URL = "https://bitwarden.com/help"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🗒️ Temporary URL will be replaced with actual documentation URL when it is available.

@SaintPatrck SaintPatrck force-pushed the cookie-vending/p10-t11_cookie-acquisition-screen branch 2 times, most recently from 87f68fc to 64c0931 Compare February 12, 2026 18:52
Implement the cookie acquisition UI for browser-to-app cookie
synchronization. This screen is presented when the SDK requests
cookies for a hostname, allowing the user to launch a browser
to complete sign-in and sync cookies back to the app.

- Add CookieAcquisitionViewModel with SAE pattern, subscribing
  to cookieCallbackResultFlow for acquisition results
- Add CookieAcquisitionScreen with illustration, launch browser
  button, continue without syncing option, and help link
- Add CookieAcquisitionNavigation with type-safe route
- Add CookieAcquisitionHandler for extracted action callbacks
- Add named path attributes to ill_sso_cookie_sync.xml for
  theme-aware coloring
- Add string resources for screen text
- Add ViewModel and Screen unit tests (18 tests)

Co-Authored-By: Claude <noreply@anthropic.com>
@SaintPatrck SaintPatrck force-pushed the cookie-vending/p10-t11_cookie-acquisition-screen branch from 64c0931 to e9112e0 Compare February 12, 2026 20:23
@SaintPatrck SaintPatrck marked this pull request as ready for review February 12, 2026 21:16
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners February 12, 2026 21:16
contentWindowInsets = ScaffoldDefaults
.contentWindowInsets
.union(WindowInsets.displayCutout)
.only(WindowInsetsSides.Horizontal + WindowInsetsSides.Top),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

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

Labels

app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants