Commit graph

20395 commits

Author SHA1 Message Date
Jordan Aasen
404d925f84
[PM-24560] - Add Archive UI Element to View and Edit Item Cards (#16954)
Some checks failed
Testing / Run tests (push) Has been cancelled
Testing / Run Rust tests on macos-14 (push) Has been cancelled
Testing / Run Rust tests on ubuntu-22.04 (push) Has been cancelled
Testing / Run Rust tests on windows-2022 (push) Has been cancelled
Auto Update Branch / Update Branch (push) Has been cancelled
Chromatic / Check PR run (push) Has been cancelled
Lint / Lint (push) Has been cancelled
Lint / Run Rust lint on macos-14 (push) Has been cancelled
Lint / Run Rust lint on ubuntu-24.04 (push) Has been cancelled
Lint / Run Rust lint on windows-2022 (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
* finalize new UI elements for archive/unarchive

* add tests

* add missing service

* add tests

* updates to edit and view pages

* use structureClone

* fix lint

* fix typo

* clean up return types

* fixes to archive UI

* fix tests

* use @if and userId$
2026-01-09 16:39:22 -08:00
renovate[bot]
1714660bde
[deps] AC: Update bufferutil to v4.1.0 (#18280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-10 08:19:13 +10:00
Isaiah Inuwa
494a4a5932
Allow local Electron app signing for Windows dev builds [PM-18325] (#17973) 2026-01-09 21:24:16 +00:00
neuronull
a199744e24
Inform user if Desktop client already running (#17846) 2026-01-09 20:56:36 +00:00
Thomas Avery
711036bd60
[PM-27325] Deprecate user account crypto init methods (#18188)
* deprecate account crypto init methods

* Add deprecation notice for new use cases on makeKeyPair
2026-01-09 14:53:48 -06:00
Jason Ng
00882c331a
[PM-30611] show deleted archived items in trash (#18272) 2026-01-09 15:39:18 -05:00
Addison Beck
eb12758c99
fix(nx): use relative paths in tsconfig.base.json for TypeScript 7 compatibility (#18295)
Update the NX library generator to prefix paths with './' when adding entries to tsconfig.base.json. This ensures compatibility with TypeScript 7 and tsgo, which require relative paths to explicitly start with './'.
2026-01-09 21:22:54 +01:00
Isaiah Inuwa
881afacded
Enable cross-compilation and packaging of Windows Appx from macOS (#17976)
* Enable cross-compilation and packaging of Windows Appx from macOS

* Consolidate cargo build execution into a single function in native build script

* Install cargo-xwin when needed

* Install Appx tools when needed

* Consolidate command execution into a single function in native build script

* Only include the native node modules for the appropriate platform

electron-builder's globs interact strangely, so we can't
exclude all the .node files in the global config and then
include the platform-specific files in the platform
configuration.

* Always copy Rust binaries to dist folder

* Log source and destination when copying files

* Update copyright

* Match Electron version in Beta build
2026-01-09 20:18:17 +00:00
bmbitwarden
92190d734c
Pm 28182 add success page (#17814)
Some checks are pending
Lint / Lint (push) Waiting to run
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Check PR run (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Scan / Check PR run (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Testing / Run Rust tests on windows-2022 (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
* PM-28182-implemented send confirmation drawer

* PM-28182 resolved lint issue

* PM-28182 resolved pr comment

* PM-28182 put behind feature flag

* Fix feature flag checks in send component

* Fix feature flag checks in send dropdown component

* Add SendUIRefresh feature flag

* PM-28182 resolved lint issues

* PM-28182 resolved N bug in drawer message

* PM28182 resolved expirationDate replaced with delettionDate

* PM-28182 resolved build issue

* PM-28182 resolved failling tests

* PM-28182 resolved pr comment to consolidate expression

* chore: rerun web build

* PM-28182 removed unneeded export
2026-01-09 13:39:26 -05:00
Jordan Aasen
1b76ce5b7c
[PM-30264] - fix exact match dialog show logic (#18216)
* fix exact match dialog show logic

* fix logic for uri matching

* simplify exact match dialog show logic
2026-01-09 10:31:08 -08:00
Brandon Treston
392794b560
Ac/pm 26365 auto confirm extension one time setup dialog (#17339)
* create nav link for auto confirm in settings page

* wip

* WIP

* create auto confirm library

* migrate auto confirm files to lib

* update imports

* fix tests

* fix nudge

* cleanup, add documentation

* clean up

* cleanup

* fix import

* fix more imports

* implement one time dialog

* add tests

* design changes

* fix styles

* edit copy

* fix tests

* fix tw issue

* fix typo, add tests

* CR feedback

* more clean up, fix race condition

* CR feedback, cache policies, refactor tests

* run prettier with updated version

* clean up duplicate logic

* clean up

* add missing export

* fix test

* fix dialog position

* add tests
2026-01-09 12:41:39 -05:00
Daniel Riera
c6f704bd21
[PM-29518] Remove @ts-strict-ignore in overlay/inline-menu/content/autofill-inline-menu-content.service.ts (#18155)
* Initialized the observers directly in the constructor and removed setupMutationObserver

* explicitly initialize timers as null

* removed redundant checks for inlineMenuEnabled and tracked the button and list so TS knows they are definitely assigned

* early returns for processContainerElementMutation list and button checks, last child now has a fallback to 0 for undefined

* Update apps/browser/src/autofill/overlay/inline-menu/content/autofill-inline-menu-content.service.ts

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2026-01-09 10:37:16 -05:00
bw-ghapp[bot]
f7f4ac0bcc
Autosync the updated translations (#18277)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-09 15:22:56 +01:00
bw-ghapp[bot]
b4c1d1c149
Autosync the updated translations (#18278)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-09 15:22:43 +01:00
bw-ghapp[bot]
bcdf3a52bb
Autosync the updated translations (#18276)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-09 15:22:20 +01:00
Isaac Ivins
95100b6f23
Feature/pm 28788 desktop header UI migration (#18221)
Some checks are pending
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Check PR run (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Lint (push) Waiting to run
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
Scan / Check PR run (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Run Rust tests on windows-2022 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
Add desktop header component
2026-01-09 09:41:15 +01:00
Jordan Aasen
1022d21654
use custom auth wrapper for at-risk-passwords (#18055)
Some checks are pending
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Check PR run (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Lint (push) Waiting to run
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Scan / Check PR run (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Run Rust tests on windows-2022 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
2026-01-08 15:21:32 -08:00
Zhaolin Liang
4aa69a769b
[PM-25402] auto-assign new logins to current folder/collection (#16268)
* auto-assign selected collection for new vault items

* Ensure a selected collectionId in the vault filter is passed on to a newly created cipher.

Fixes #15485

* Assign selected folder and collection when creating a new cipher

Added here to prevent a regression whenever we switch over to this componet and deprecate vault-v2.component

* account for null folderIds

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com>
Co-authored-by: jaasen-livefront <jaasen@livefront.com>
2026-01-09 00:19:56 +01:00
blackwood
eedc36cf39
Revert "Display autofill overlay for zoom.us signin password (#16900)" (#18261) 2026-01-08 16:46:13 -05:00
Jason Ng
6579e31374
[PM-30537] add tab nav to restart premium link (#18269) 2026-01-08 16:16:08 -05:00
SmithThe4th
53c6017495
Added batch encrypt many method and used that in imports (#18266) 2026-01-08 15:01:03 -05:00
Leslie Tilton
0dd4ed7026
Use official latest phishing sources from phish.co.za (#18271) 2026-01-08 12:54:39 -06:00
Nick Krantz
de2ebc484a
exclude deleted items from at risk check (#18246)
Some checks are pending
Chromatic / Check PR run (push) Waiting to run
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Lint (push) Waiting to run
Scan / Check PR run (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Run Rust tests on windows-2022 (push) Waiting to run
2026-01-08 11:33:24 -06:00
Thomas Avery
4866eaa2ec
[PM-23618] Require masterKey on makeUserKey (#17244) 2026-01-08 11:09:13 -06:00
Max
0396b4e054
Add CSV export functionality to organization members page (#17342)
* Add CSV export functionality to organization members page

* Remove unnecessary async from getMemberExport method

* Changed button position and style

* fixed button alignment

* updates based on feedback from product design

* refactor, cleanup

* fix DI

* add default to user status pipe

* add missing i18n key

* copy update

* remove redundant copy

---------

Co-authored-by: Brandon <btreston@bitwarden.com>
2026-01-08 15:09:52 +00:00
Jason Ng
95235a2b7b
[PM-30526] remove archive option from item more options in AC (#18255) 2026-01-08 09:59:27 -05:00
bmbitwarden
5578c94c65
Pm 29917 split the send access component in the web project into multiple components (#18142)
* PM 29917 implemented refactor of send access component

* PM-29917 refactored to new angular switch syntax

* PM-29917 added mark for check
2026-01-08 09:27:37 -05:00
renovate[bot]
66252d7c10
[deps]: Update Minor github-actions updates (#17621)
* [deps]: Update Minor github-actions updates

* Revert bump

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2026-01-08 14:12:17 +00:00
renovate[bot]
843913bdee
[deps]: Update GitHub Artifact Actions (#17994)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2026-01-08 10:33:21 +00:00
brandonbiete
ca015515e2
[BRE-1474] Add GPG signing and automated PRs to repository-management workflow (#18254)
Some checks are pending
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Check PR run (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Lint (push) Waiting to run
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Scan / Check PR run (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Run Rust tests on windows-2022 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
* Update repository-management workflow for RC branch rulesets

Add GPG signing and PR-based workflow to comply with upcoming RC branch
protection rules. Version bumps now create PRs with signed commits instead
of pushing directly to branches.

* Fix linter issues in workflow

Use environment variables for GPG secrets to prevent template injection.
Update github-script to v8.0.0 to match other workflows in repo.
2026-01-07 17:08:14 -05:00
Stephon Brown
788c5d1d8a
[PM-29906] SM Discount Defect (#18147)
* fix(billing): Update logic for subscriptionLineItems

* billing(fix): correct display logic from secretsManager to passwordManager
2026-01-07 21:08:13 +00:00
Brandon Treston
bb318ee22e
Ac/pm 26364 extension UI for auto confirm (#17258)
* create nav link for auto confirm in settings page

* wip

* WIP

* create auto confirm library

* migrate auto confirm files to lib

* update imports

* fix tests

* fix nudge

* cleanup, add documentation

* clean up

* cleanup

* fix import

* fix more imports

* add tests

* design changes

* fix tests

* fix tw issue

* fix typo, add tests

* CR feedback

* more clean up, fix race condition

* CR feedback, cache policies, refactor tests

* run prettier with updated version

* clean up duplicate logic

* clean up

* fix test

* add missing prop for test mock

* clean up
2026-01-07 15:27:41 -05:00
Daniel James Smith
97312aaaa0
Add 'verifysign' to tools owned dependencies (#18239) 2026-01-07 13:15:39 -07:00
Vijay Oommen
dfa633f7ab
PM-26917 Added a document on how to create an integration (#18248) 2026-01-07 13:54:50 -06:00
Tom
5832065e96
Revert "[PM-30319] [BLOCKER] phish cache freeze (#18157)" (#18245)
This reverts commit fcc2844a16.
2026-01-07 19:25:10 +00:00
neuronull
196db093b2
Desktop autotype remove SHIFT from valid modifier keys (#17347)
Removal of SHIFT from valid modifier keys. As it stands, we allow [SHIFT + `<a-z>`] , which would prevent users from capitalizing letters. As a result, the default shortcut has to change (because it included SHIFT). Changed to CONTROL + ALT + b
2026-01-07 11:54:46 -07:00
neuronull
9ba9c89ee6
Allow unmaintained crates in transient deps (#18241)
Some checks are pending
Auto Update Branch / Update Branch (push) Waiting to run
Chromatic / Check PR run (push) Waiting to run
Chromatic / Chromatic (push) Blocked by required conditions
Lint / Lint (push) Waiting to run
Lint / Run Rust lint on macos-14 (push) Waiting to run
Lint / Run Rust lint on ubuntu-24.04 (push) Waiting to run
Lint / Run Rust lint on windows-2022 (push) Waiting to run
Scan / Check PR run (push) Waiting to run
Scan / Checkmarx (push) Blocked by required conditions
Scan / Sonar (push) Blocked by required conditions
Testing / Run tests (push) Waiting to run
Testing / Run Rust tests on macos-14 (push) Waiting to run
Testing / Run Rust tests on ubuntu-22.04 (push) Waiting to run
Testing / Run Rust tests on windows-2022 (push) Waiting to run
Testing / Rust Coverage (push) Waiting to run
Testing / Upload to Codecov (push) Blocked by required conditions
2026-01-07 18:00:31 +00:00
Thomas Avery
0e2748784b
[PM-25385] Remove unlock-with-master-password-unlock-data flag (#18010)
* remove feature flag from lock component

* Add missing windowHidden desktop feature

* Remove the flag from CLI unlock

* Remove the flag from enum file
2026-01-07 11:29:12 -06:00
Stephon Brown
fa45110420
[PM-29061] Remove Feature Flag 24996 (#18009)
* refactor(billing): remove FF from vault banner

* refactor(billing): remove from prompt service

* chore(billing): remove feature flag

* fix(billing): remove premium banner

* tests(billing): remove premium banner tests

* chore(vault): clean up premium banner dependencies

* fix(billing): revert formatting

* fix(billing): revert formatting

* fix(billing): remove old FF

* fix(billling): revert formatting
2026-01-07 12:19:54 -05:00
Alex Morask
1f763f470a
[PM-29608] [PM-29609] Premium subscription redesign cards (#18145)
* refactor(pricing): misc

- Remove unused test file

* refactor(pricing): discount-badge.component

- Introduce new Discount union type
- Introduce Maybe type helper for T | null | undefined
- Use Discount type in the discount-badge.component
- Update the user-subscription.component to pass Discount type into the discount-badge.component
- Update spec, stories and mdx

* refactor(pricing): pricing-card.component

- Support changeDetection: ChangeDetectionStrategy.OnPush
- Update spec and mdx files

* refactor(pricing): cart-summary.component

- Introduce new Cart type
- Use Cart type as main input in cart-summary.component
- Support optional custom header template in cart-summary.component
- Support optional cart-level Discount type in cart-summary.component
- Update upgrade-payment.component to pass in new Cart type to cart-summary.component
- Update spec file, stories and mdx file

* feat(subscription): misc

- Remove unused test file
- Update jest.config.js
- Add test.setup.ts

* feat(subscription): subscription-card.component

- Add BitwardenSubscription type
- Add subscription-card.component
- Add translations
- Add spec file, stories and MDX file

* feat(subscription): storage-card.component

- Add standalone Storage type
- Add storage-card.component
- Add spec file, stories and MDX file

* feat(subscription): additional-options-card.component

- Add additional-options-card.component
- Add spec file, stories and MDX file

* fix(pricing): cart-summary.component.stories.ts lint

* fix(pricing): discount-badge.component.stories.ts lint

* fix(web): Resolve estimatedTax$ toSignal for use in cart on upgrade-payment.component

* feedback(design): Fix design issues

* Kyle's feedback

* Kyle's feedback

* cleanup: Use SubscriptionStatuses instead of string values

* feat: Add CTA disabling input to storage-card.component

* feat: Add CTA disabling input to additional-options-card.component
2026-01-07 10:54:32 -06:00
Daniel Riera
ba89a3dd70
make abortController optional to match the handler (#18143) 2026-01-07 11:04:04 -05:00
bw-ghapp[bot]
15efacaae9
Autosync the updated translations (#18234)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-07 16:55:06 +01:00
neuronull
b644cca91e
Desktop Autotype add service unit tests (#17678) 2026-01-07 08:54:28 -07:00
bw-ghapp[bot]
9ff3540406
Autosync the updated translations (#18235)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-07 15:54:15 +00:00
bw-ghapp[bot]
2e7e9671a6
Autosync the updated translations (#18233)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-01-07 15:53:15 +00:00
Alex
fcc2844a16
[PM-30319] [BLOCKER] phish cache freeze (#18157)
* prevent redundant cache updates on account switch

Remove automatic cache update triggering that caused UI freezes when
switching to accounts with phishing detection access.

Root cause: The update$ observable used startWith(undefined) which
triggered an immediate cache refresh whenever a new subscription was
created. On account switch, phishingDetectionSettingsService.on$ emits
true, creating a new subscription and triggering a full ~800K entry
fetch that blocks the UI thread.

Fix:
- Remove startWith(undefined) to prevent auto-triggering on subscription
- Add MIN_UPDATE_INTERVAL (5 min) constant for cache freshness checks
- Add _updateInProgress flag to prevent concurrent updates
- Add filter() to skip updates when one is already in progress
- Add cache freshness check (skip if updated within 5 minutes)
- Add finalize() to reliably reset _updateInProgress flag (per ADR)
- Replace share() with shareReplay() to prevent duplicate work
- Add triggerUpdateIfNeeded() public method for explicit update requests

The scheduled 24-hour update interval is unaffected - it still calls
_triggerUpdate$.next() via the task scheduler.

* trigger cache updates asynchronously on account switch

Update PhishingDetectionService to explicitly trigger cache updates
when phishing detection becomes active for an account, using a
non-blocking pattern.

Changes:
- Add call to phishingDataService.triggerUpdateIfNeeded() when on$ emits true
- Use of(null).pipe(delay(0)) to defer update to next event loop tick
- This prevents the update from blocking the account switch UI flow

The delay(0) pattern is preferred over setTimeout per codebase conventions
(RxJS over native JS). The subscription auto-completes since of() emits
once and completes, so no manual cleanup is needed.

Combined with the previous commit's safeguards (cache freshness check,
concurrent update prevention), this ensures:
1. Account switch completes immediately (non-blocking trigger)
2. Cache updates only run when actually needed (< 5 min freshness)
3. Concurrent updates are prevented (_updateInProgress flag)

Fixes: PM-30319

* decouple cache update subscription from UI event merge

Move phishingDataService.update$ to a separate subscription outside the
merge() stream to prevent blocking the service worker during critical
initialization and account switch flows.

Background:
The service worker is single-threaded. When the phishing cache update
runs, it downloads a 25MB file and parses 800K entries using .split(),
which is CPU-intensive synchronous work. During this parsing, the
service worker cannot respond to popup requests, causing the extension
UI to appear frozen when the user clicks the extension icon.

Previously, update$ was included in the merge() alongside UI event
handlers (onTabUpdated$, onContinueCommand$, onCancelCommand$). When
on$ emitted true (user has phishing access), the merge subscription
was created as part of the same synchronous flow, coupling the heavy
cache work with the UI event setup.

Changes:
- Create separate updateSub subscription at initialization
- Remove update$ from merge() - now only contains UI event streams
- Keep delay(0) trigger for triggerUpdateIfNeeded()

How delay(0) works:
JavaScript's event loop must complete all synchronous code before
processing async callbacks. delay(0) schedules the trigger for the
next event loop tick, meaning:
1. initialize() completes and returns
2. Service worker is 'free' to handle other tasks
3. Next tick: triggerUpdateIfNeeded() fires
4. Cache update runs in background

The cache parsing will still block the thread when it eventually runs,
but this is now decoupled from the critical initialization path. The
window where blocking can affect user interaction is minimized.

PM-30319

* comment

* account for new changes in spec file

* prevent UI blocking during cache updates

Problem:
- Switching accounts caused 5+ second UI freeze
- Even when data unchanged, 789K entries were rewritten to IndexedDB
- Set was rebuilt from 789K entries on every state emission

Solution:
- Skip state update when checksum matches (return null instead of full data)
- Cache Set in memory, only rebuild when checksum changes
- Track last check time in memory instead of state
- Use streaming fetch to prevent Firefox memory explosion
- Add comprehensive logging for debugging

Performance improvement:
- Checksum match: ~5 seconds → ~10ms (no blocking)
- Full update: Still required when data changes, but with streaming

* pre-populate cache on install/update and optimize Set building

Problem:
Premium users experienced a 5+ second UI freeze on first login after
install because the phishing list (~63MB, 789K entries) was downloaded
synchronously when phishing detection was enabled.

Solution:
1. Pre-populate cache on extension install/update
   - Added triggerPhishingCacheUpdate() to MainBackground
   - RuntimeBackground calls this on "install" and "update" events
   - Cache is ready before user logs in, eliminating first-login lag

2. Chunked Set building for UI responsiveness
   - Build Set in 50K-entry chunks with event loop yields
   - Changed from synchronous map() to async switchMap() + buildSetInChunks()
   - Prevents UI blocking when Set is rebuilt from cached data

3. Streaming with yields
   - Added yield after each network chunk during streaming fetch
   - Keeps service worker responsive to popup messages during download

4. Log cleanup for production
   - Converted verbose debugging logs from info → debug level
   - Kept important operational events (daily/full updates) at info
   - Removed timing logs and progress banners
   - Fixed comment accuracy: 100MB → 63MB uncompressed

Performance impact:
- First login after install: 5+ seconds → near-instant (cache pre-populated)
- Set rebuild: non-blocking via chunked processing
- Subsequent updates: already optimized via checksum matching

* spec

* add allowlist for bare amazon.com domain

Problem:
The upstream Phishing.Database contains a false positive entry
`https://www.Amazon.com` (line 666495), causing the real Amazon
website to be incorrectly blocked.

Solution:
Add BARE_DOMAIN_ALLOWLIST that skips blocking for exact hostname
matches (amazon.com, www.amazon.com) when the URL has no path,
query, or hash. This protects users from false positives while
still detecting phishing URLs that use Amazon in paths or
subdomain tricks.

Allowed:
- https://amazon.com
- https://www.amazon.com

Still blocked:
- https://amazon.com/phishing/path
- https://amazon.com-malicious.xyz
- https://fake.com/amazon.com/steal

* logging

* update our links source url

* Fix Chrome memory leak in phishing detection service

* reduce memory leaks

* optimize phishing detection performance and fix memory leaks

This commit addresses critical performance issues and memory leaks in the
phishing detection feature, particularly for non-premium users and during
extension reloads.

Storage Isolation:
- Created BrowserIndexedDbStorageService for large data storage
- Separated PHISHING_DATA_DISK (60MB+ phishing URLs) from PHISHING_DETECTION_DISK
- Prevents popup from loading large dataset when accessing small settings
- Fixed UI freeze when navigating to Settings -> Account security -> back arrow

Lazy Loading Optimizations:
- Converted _cachedState, _webAddresses$, and update$ to lazy getters
- Only accesses IndexedDB when phishing detection is actually used
- Prevents blocking service worker initialization on extension reload
- Added guard in triggerUpdateIfNeeded() to skip if no observers

Performance Improvements:
- Modified buildEnabledPipeline$() to check available$ first
- Uses startWith(true) to emit immediately, preventing on$ from blocking
- Skips IndexedDB reads for non-premium users during unlock/account switch
- Prevents 3+ second UI freezes for non-premium users

Memory Leak Fixes:
- Added static interval cleanup to prevent accumulation on service recreation
- Fixed tab listener cleanup by storing bound handler reference
- Fixed triggerUpdateSub subscription cleanup on account switches
- Prevents exponential memory growth from undestroyed subscriptions

Test Fixes:
- Updated tests to set up available$ prerequisites before testing enabled$
- Fixed tests to wait for actual state values after startWith(true) emission
- Uses filter() to wait for expected state values in async tests

Files Changed:
- apps/browser/src/platform/services/browser-indexed-db-storage.service.ts (new)
- apps/browser/src/platform/storage/browser-storage-service.provider.ts
- apps/browser/src/dirt/phishing-detection/services/phishing-data.service.ts
- apps/browser/src/dirt/phishing-detection/services/phishing-detection.service.ts
- apps/browser/src/background/runtime.background.ts
- libs/common/src/dirt/services/phishing-detection/phishing-detection-settings.service.ts
- libs/common/src/dirt/services/phishing-detection/phishing-detection-settings.service.spec.ts
- libs/state/src/core/state-definitions.ts
- libs/storage-core/src/client-locations.ts

* fix test type errors

* remove allowlist

* storage isolation revert

The initial implementation of storage isolation was used to fix a specific navigation scenario that lead to freezing of the ui ("Settings → Account Security" and clicking the back button)

Why disk-large instead of memory-large-object:

- **Problem**: Users experienced infinite loading (2+ minute freezes) when navigating to "Settings → Account Security" and clicking the back button. The Popup would freeze because `chrome.storage.local` broadcasts 60MB writes to all contexts, causing the Popup to deserialize data it never requested.
- **Fix**: Created `disk-large` storage location using native IndexedDB, which persists data (unlike `memory-large-object`) and doesn't broadcast events (unlike `chrome.storage.local`), isolating large datasets from the Popup context.

**Key Difference:**
- `memory-large-object`: **Non-persistent** in-memory storage. Data is lost when the service worker restarts or the extension reloads.
- `disk-large`: **Persistent** storage using native IndexedDB. Data survives service worker restarts and extension reloads.

**Why We Need Persistence:**
The phishing dataset (~60MB, 780K entries) must persist across:
- Service worker restarts (Chrome terminates service workers after inactivity)
- Extension reloads/updates
- Browser restarts

If we used `memory-large-object`, the extension would need to re-download the entire 60MB dataset every time the service worker restarts, which happens frequently in Chrome. This would:
1. Waste bandwidth (60MB downloads on every restart)
2. Cause UI freezes on every restart (same problem we're trying to fix)
3. Fail offline scenarios

**Why Not Use Existing `disk` Location:**
The existing `"disk"` location uses `chrome.storage.local`, which has a critical flaw for large datasets:
- **Event Broadcasting**: Any write to `chrome.storage.local` triggers `onChanged` events broadcast to **all** extension contexts (Background, Popup, Sidebar)
- **The UI/UX Problem**:
  - Users experienced **infinite loading** or **2+ minute freezes** when navigating to "Settings → Account Security" and clicking the back button
  - When Background writes 60MB, Chrome serializes and IPCs it to Popup, causing Popup's main thread to freeze while deserializing this massive object, even if Popup never requested the data
  - The Popup would become completely unresponsive, showing a spinning cursor or blank screen
- **The Fix**: Native IndexedDB doesn't broadcast events across processes, isolating the storage so Background can write 60MB without disturbing the Popup

* remove implementation comments from jsdoc

* renaming

* new domains source

* remove unnecessary complexity from buildEnabledPipeline and remove all IndexedDB references

* fix pre-population on install/update

* handle null webAddresses

---------

Co-authored-by: maxkpower <mpower@bitwarden.com>
2026-01-07 07:21:19 -08:00
Bernd Schoolmann
c2d42f286e
Add error toast for upgrade encryption step (#18161) 2026-01-07 16:20:23 +01:00
neuronull
1eebee535b
Add CI validations install and run Desktop client (Windows) (#18141) 2026-01-07 08:12:27 -07:00
Daniel Riera
c85e66f563
[PM-29516] Remove ts strict ignore in utils index (#18047)
* use type safe generics for throttle and debounce, account for the change were event isn't passed

* read gloabl once

* check for styles before setting

* narrow keywords index

* narrow bitwardenAutofillInit for callback

* nullish coalescing operator on value for prop attributes
2026-01-07 09:59:33 -05:00
Bryan Cunningham
54b42001d2
[CL-1006] fix nav hover and update resize handle animation (#18219)
* fix nav logo hover alignment

* update grab handle animation timing
2026-01-07 09:08:43 -05:00