Skip to content

feat: add iOS Safari web extension flow#2595

Draft
2001Y wants to merge 104 commits into
bitwarden:mainfrom
2001Y:feat/ios-safari-web-extension
Draft

feat: add iOS Safari web extension flow#2595
2001Y wants to merge 104 commits into
bitwarden:mainfrom
2001Y:feat/ios-safari-web-extension

Conversation

@2001Y
Copy link
Copy Markdown

@2001Y 2001Y commented Apr 30, 2026

Summary

  • add the iOS Safari Web Extension target, native bridge, and shared Safari request/response pipeline
  • implement generated-password follow-up handling, setup progress UX, and action-panel driven save/update flows
  • stabilize simulator action-extension runtime enough to run credentialed Safari live QA end-to-end
  • add dedicated Safari Web Extension tests, fixture pages, and simulator-driven live QA coverage

Motivation

  • enable Bitwarden's iOS Safari Web Extension flow end-to-end in the iOS app and shared runtime
  • bring setup UX, page-action handling, and native/web bridge behavior to a shippable state
  • replace the last manual-only Safari validation gap with reproducible simulator coverage

Changes

  • add BitwardenSafariWebExtension target scaffold, manifest resources, and native handler/bridge wiring
  • add shared Safari extension request/response/suggestion/submission models and bridge codec coverage
  • implement generated-password follow-up context, native request context propagation, and save/update persistence flows
  • derive action-extension save-login and change-password routes directly from collected pageDetails
  • add simulator-safe persisted store fallbacks for app-extension Core Data paths
  • suppress non-actionable simulator .appex error assertions/noise that blocked live QA
  • add local Safari fixture pages for login, signup, and change-password flows
  • add a dedicated BitwardenUITests target/scheme plus fixture-driven simulator smoke coverage
  • document the fixture-based Safari testing loop and add lightweight Maestro smoke flows

Test Plan

  • node BitwardenSafariWebExtension/Application/Support/content.node-test.js
  • node BitwardenSafariWebExtension/Application/Support/background.node-test.js
  • xcodebuild test -disableAutomaticPackageResolution -project Bitwarden.xcodeproj -scheme Bitwarden -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.4.1' -only-testing:BitwardenSafariWebExtensionTests -only-testing:BitwardenSharedTests/SafariExtensionRequestProcessorTests -only-testing:BitwardenSharedTests/SafariExtensionResponseTests -only-testing:BitwardenSharedTests/SafariExtensionBridgeCodecTests -only-testing:BitwardenSharedTests/SafariExtensionStateTests -only-testing:BitwardenSharedTests/SafariExtensionProcessorTests -only-testing:BitwardenSharedTests/SettingsCoordinatorTests -only-testing:BitwardenSharedViewInspectorTests/SafariExtensionViewTests CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO
  • xcodebuild build -disableAutomaticPackageResolution -project Bitwarden.xcodeproj -scheme BitwardenSafariWebExtension -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO
  • xcodebuild test -project Bitwarden.xcodeproj -scheme Bitwarden -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.4.1' -only-testing:BitwardenSharedTests/ActionExtensionHelperTests -only-testing:BitwardenSharedTests/DataStoreTests -only-testing:BitwardenKitTests/ErrorNetworkingTests COMPILER_INDEX_STORE_ENABLE=NO
  • signed simulator build launches Bitwarden to the onboarding screen on iPhone 17 Pro (iOS 26.4.1)
  • fresh-app direct self-hosted login reaches LoginMasterPasswordEntry with password.2001y.dev
  • simulator Safari live flow saves a new login from Docs/safari-extension-dev-fixtures/signup.html
  • simulator Safari live flow opens generator from signup and returns to New login follow-up
  • simulator Safari live flow fills saved credentials into Docs/safari-extension-dev-fixtures/login.html
  • simulator Safari live flow reaches matched-item selection / password actions from Docs/safari-extension-dev-fixtures/change-password.html

Screenshots / Examples

  • N/A

Notes for Reviewers

  • the branch now includes reproducible local fixtures and a dedicated UITest target for Safari validation instead of leaving credentialed live QA as an untracked manual step
  • simulator action-extension stabilization here is intentionally scoped to development/live-QA reliability (.appex Core Data fallback + non-loggable assertion suppression), not a product-facing entitlement change
  • current upstream checks on the PR still require normal maintainer-side review / label / CLA flow

2001y added 30 commits April 22, 2026 19:11
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


2001y seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bitwarden-bot
Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-36081
Link: https://bitwarden.atlassian.net/browse/PM-36081

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@2001Y
Copy link
Copy Markdown
Author

2001Y commented Apr 30, 2026

Follow-up QA note:

  • Automated coverage is green for the Safari Web Extension stack (JS node tests, shared Safari tests, dedicated bridge/handler tests, appex build).
  • Signed simulator builds also launch the Bitwarden app successfully; I verified the app reaches the onboarding screen on iPhone 17 Pro / iOS 26.4.1.
  • The remaining gap is login-gated live QA for the Safari flows themselves (fill, save, change password, generate password, generated-password follow-up) because that requires a usable Bitwarden account/session inside the simulator.
  • Keeping this PR in draft until that credentialed manual pass is completed is probably the safest path.

2001y added 2 commits May 2, 2026 00:21
- derive save-login and change-password action-extension routes from page details
- add simulator-safe persisted store fallbacks for app extensions
- suppress non-actionable simulator appex logging/assertion noise
- add regression tests for routing and store fallback behavior
- add a dedicated BitwardenUITests scheme/target for simulator-driven Safari checks
- add local login/signup/change-password fixture pages and Maestro smoke flows
- document the fixture-based Safari extension testing loop
- cover live save, fill, change-password, and generate-follow-up flows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants