Bitwarden client apps (web, browser extension, desktop, and cli). bitwarden.com
Go to file
Robyn MacCallum 06629dc3b8
Some checks failed
Testing / Run typechecking (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-browser junit:junit-browser.xml name:Browser paths:apps/browser bitwarden_license/bit-browser]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-cli junit:junit-cli.xml name:CLI paths:apps/cli bitwarden_license/bit-cli]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-desktop junit:junit-desktop.xml name:Desktop paths:apps/desktop]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-libs junit:junit-libs.xml name:Libs paths:libs bitwarden_license/bit-common]) (push) Has been cancelled
Testing / Run tests - ${{ matrix.test-group.name }} (map[artifact:jest-coverage-web junit:junit-web.xml name:Web paths:apps/web bitwarden_license/bit-web]) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
[PM-35196] Mutation memory management (#20871) (#21007)
* pass addedElements to checkForNewShadowRoots

* Fix checkForNewShadowRoots latch and nested-shadow traversal

Two bugs in checkForNewShadowRoots, addressed together because they share
the function and the test surface:

1. pageContainsShadowDom resolved at init() and never re-evaluated. On
   sites that attach shadow DOM after init (e.g., hbomax.com — SPAs that
   boot their custom-element renderers post-LOAD), the short-circuit
   blocked all detection for the rest of the session.

2. The narrow scan used el.querySelectorAll("*"), which does not pierce
   shadow boundaries. A shadow host nested inside another shadow root was
   invisible to the scan even when the latch was on.

Changes:

- Narrow the latch short-circuit: fires only when both
  pageContainsShadowDom is false AND addedElements is empty.
- markShadowDomPresent: a named, one-way sticky-ratchet transition that
  flips the latch when the narrow scan finds a root post-init.
- scanForNewShadowRootInSubtree: a depth-bounded recursive helper that
  pierces nested shadow boundaries (MAX_DEEP_QUERY_RECURSION_DEPTH = 4).
- pendingMutationAddedElements: now Set<Element>; isConnected filter at
  the debounced flush skips dead trees.

* Ancestor suppression and set management.

* Swap MutationRecord[][] for el->set<attr>; swap-on-drain, clear maps, clear shadow-root candidate on overflow and expose stats.

* Short-circuit checkMutationsInShadowRoots when pageContainsShadowDom is false

* Narrow requirePageDetailsUpdate to flag-only; schedule in debounce wrapper

* Collapse observedShadowRoots WeakSet into knownShadowRoots Set

* Gate new-shadow-root detection on addedNodes.length > 0

* Reap detached shadow roots from knownShadowRoots in the drain

* Instrument observer hot paths with stopwatch and fieldsReaped counter

* Remove autofill observer instrumentation.

* Reap unconditionally since shadow hosts may obscure mutated nodes.

* De-abbreviate; reap->purge; explanatory comment on cap.

* Revert "Reap unconditionally since shadow hosts may obscure mutated nodes."

This reverts commit 6637bfd65c.

* Unconditionally purge in processMutations.

---------

Co-authored-by: blackwood <mrobinson@bitwarden.com>
Co-authored-by: addisonbeck <github@addisonbeck.com>
2026-06-02 14:32:57 -04:00
.checkmarx Added devcontainer setup (devcontainer.json, docker-compose.yml, postCreateCommand.sh) (#18541) 2026-04-08 15:58:05 -04:00
.claude PM-35200 - Create contributing guide for Claude tooling (#20430) 2026-04-30 10:44:58 +02:00
.codescene disable code duplication check in unit tests (#6773) 2023-11-06 15:48:34 -05:00
.devcontainer Added devcontainer setup (devcontainer.json, docker-compose.yml, postCreateCommand.sh) (#18541) 2026-04-08 15:58:05 -04:00
.github [deps]: Update actions/github-script action to v9 (#20391) 2026-05-13 12:36:02 -04:00
.husky Update husky hooks (#7738) 2024-01-30 06:50:54 -08:00
.storybook [CL-1130] Fix a11y and storybook errors in UIF-owned code (#19921) 2026-04-21 14:16:48 -04:00
.vscode chore: replace deprecated typescript.tsdk with js/ts.tsdk.path (#20146) 2026-04-14 09:16:10 -04:00
apps [PM-35196] Mutation memory management (#20871) (#21007) 2026-06-02 14:32:57 -04:00
bitwarden_license [PM-31945] Fix missing group access to collections in Access Intelligence V2 (#20545) 2026-05-15 11:01:26 -07:00
docs [PM-32686] Add bank account item type (#19302) 2026-04-28 13:04:34 -05:00
libs [PM-37816] Revert removal of Getting Started tab on extension (#20792) 2026-05-21 14:18:24 -04:00
scripts Add Windows variant of Rust env prepare script (#20061) 2026-04-14 15:00:33 -06:00
.browserslistrc [PM-6788][PM-7755] add babel/preset-env and browserslist (#9383) 2024-05-30 18:42:26 -04:00
.editorconfig Add support for migrated jslib (#2826) 2022-06-03 18:01:07 +02:00
.git-blame-ignore-revs add prettier formatting merge commit to .git-blame-ignore-revs (#7037) 2023-11-29 17:53:26 -05:00
.gitattributes
.gitignore Added devcontainer setup (devcontainer.json, docker-compose.yml, postCreateCommand.sh) (#18541) 2026-04-08 15:58:05 -04:00
.npmrc [PM-25911] Add commercial sdk internal as dependency (#16883) 2025-10-27 15:17:20 +01:00
.nvmrc [PM-22343] Bump non-cli to Node 22 (#15058) 2025-06-26 18:05:37 -04:00
.nxignore refactor(scheduling): extract @bitwarden/scheduling Nx leaf library (#19771) 2026-03-27 11:23:22 +00:00
.prettierignore chore(tech-debt): [PM-33963] Remove legacy Duo Web SDK v2 from desktop 2026-04-03 17:04:06 -04:00
.prettierrc.json Update CL documentation (#5379) 2023-05-08 14:46:59 +02:00
angular.json [CL-717][PM-27966] Update to Angular 20 and Storybook 9 (#17638) 2025-12-01 14:15:58 -05:00
babel.config.json [PM-6788] enable bugfixes in babel/preset-env (#9465) 2024-05-31 17:59:39 -04:00
clients.code-workspace Add Nx Console to vscode recommended extension list (#17683) 2025-11-27 07:47:01 +01:00
CONTRIBUTING.md Update README and CONTRIBUTING to point to contributing.bitwarden.com (#2771) 2022-06-13 17:34:07 +10:00
eslint.config.mjs enable jest/no-alias-methods (#20187) 2026-04-16 18:07:49 +02:00
jest.config.js [PM-34775] Generate Invite Link Lib and API Service (#20301) 2026-04-28 11:54:20 -04:00
jest.preset.js feat(nx): add basic-lib generator for streamlined library creation (#14992) 2025-06-05 14:20:23 -04:00
LICENSE_BITWARDEN.txt Fix some references to master (#14578) 2025-05-01 07:18:09 -07:00
LICENSE_GPL.txt Prepare bitwarden_license directory (#2663) 2022-05-09 17:50:15 +02:00
LICENSE.txt Fix some references to master (#14578) 2025-05-01 07:18:09 -07:00
lint-staged.config.mjs Add Windows variant of Rust env prepare script (#20061) 2026-04-14 15:00:33 -06:00
nx.json Nx telemetry setting (analytics: false). (#20433) 2026-04-29 11:44:34 -04:00
package-lock.json Bumped client version(s) (#20950) (#20965) 2026-06-02 08:18:46 -04:00
package.json Update sdk-internal to 0.2.0-main.757 (#20663) 2026-05-15 13:12:41 +09:00
README.md Remove gitter chat badges from READMEs (#19368) 2026-03-04 16:33:27 +00:00
SECURITY.md Revise language on SECURITY.md 2022-03-15 15:39:14 -04:00
tailwind.config.js [CL-1141] Improve tailwind config structure across apps and libs (#20102) 2026-04-28 17:09:05 -04:00
tsconfig.base.json [PM-34775] Generate Invite Link Lib and API Service (#20301) 2026-04-28 11:54:20 -04:00
tsconfig.eslint.json fix(eslint): extend tsconfig.base in tsconfig.eslint (#15082) 2025-06-05 11:08:03 -04:00
tsconfig.json [PM-32442] Enforce tsc-strict on desktop and CLI apps (#19058) 2026-02-24 09:20:44 +01:00

Bitwarden

GitHub Workflow browser build on main GitHub Workflow CLI build on main GitHub Workflow desktop build on main GitHub Workflow web build on main


Bitwarden Client Applications

This repository houses all Bitwarden client applications except the mobile applications (iOS | android).

Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.

We're Hiring!

Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.

Contribute

Code contributions are welcome! Please commit any pull requests against the main branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.

Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.