Split isFillableTotpField into isFillableTotpField (TotpFieldNames /
one-time-code autocomplete) and maybeFillableTotpField (AmbiguousTotpFieldNames
only) and reorder the classification switch so that a reliable TOTP signal
still wins unconditionally, but a username match beats a purely ambiguous TOTP
match. This fixes Yahoo's login-username field being misclassified as TOTP
because 'code' appears in AmbiguousTotpFieldNames.
Updates import statements in tools-related files to use direct imports
instead of re-exported paths. This prepares for removal of re-exporting
files in a follow-up PR.
Part of PM-33381
Updates import statements in vault-related files to use direct imports
instead of re-exported paths. This prepares for removal of re-exporting
files in a follow-up PR.
Part of PM-33381
* fix(register): [PM-27085] Account Register Uses New Data Types - Initial changes.
* test(register): [PM-27085] Account Register Uses New Data Types - Fixed tests.
* test(register): [PM-27085] Account Register Uses New Data Types - Updated tests.
* feat(register): [PM-27085] Account Register Uses New Data Types - Added feature flag.
* fix(register): [PM-27085] Account Register Uses New Data Types - Removed unnecessary part of the payload.
* fix(register): [PM-27085] Account Register Uses New Data Types - Changed the feature flag to be gated with the other password input changes.
* fix(register): [PM-27085] Account Register Uses New Data Types - Added protection for feature flagged state.
* fix(register): [PM-27085] Account Register Uses New Data Types - Removed unnecessary comment.
* fix(register): [PM-27085] Account Register Uses New Data Types - Addressed feedback.
* fix(register): [PM-27085] Account Register Uses New Data Types - Fixed tests and added comment.
* fix(register): [PM-27085] Account Register Uses New Data Types - Fixed another test.
* fix(register): [PM-27085] Account Register Uses New Data Types - And last test fix.
* fix(register): [PM-27085] Account Register Uses New Data Types - Removed unneeded code.
* fix(register): [PM-27085] Account Register Uses New Data Types - Updated comments and fixed code from feedback.
* fix(register): [PM-27085] Account Register Uses New Data Types - Updated comments again with small styling fix.
* fix(register): [PM-27085] Account Register Uses New Data Types - Switched to snapshot testing and explicit checks for unlock and authentication data for feature flag on. Also addressed pr comments.
* test(register): [PM-27085] Account Register Uses New Data Types - Made explicit checks for critical pieces of data in tests.
* fix(feature-flag): [PM-27085] Account Register Uses New Data Types - Added in feedback from comments. Default registration tests have snapshots now and web registration has more dry code.
* [CL-1033] Migrate remaining CTAs to new icon API
Migrates buttons and links in settings and secrets manager components to use the new icon API.
* Revert unrelated .vscode/settings.json change
Removes angular.enable-strict-mode-prompt setting that was accidentally included from the source branch.
* Apply suggestion from @claude[bot]
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* feat(event): add support for self-revocation event type and corresponding localization messages
* fix(tests): update transfer rejection logging test to ensure no event is logged when a user rejects a transfer
* feat(event-logs): add OrganizationUser_SelfRevoked event type and logging
* Handle corrupted encrypted project names gracefully
- Add decryptionError flag to ProjectView, ProjectListView, and SecretProjectView
- Wrap all project name decryption in try-catch blocks across services
- Use DECRYPT_ERROR constant instead of hardcoded strings
- Display corrupted names as clickable warning text in projects list
- Show warning badges for corrupted project names in secrets list
- Add i18n keys for error tooltips
- Add keyboard accessibility (role, tabindex, enter/space handlers)
* fixing tests
* fixing jittery loading
* refactor decline and leave to be a link button rather than a secondary button
* update supporting text for transfer dialog
* add aria-label for learn more link
* Add cookie acquisition to ServerCommunicationConfigService
* Fix DI for ServerCommunicationConfigPlatformApiService
* Rename param for acquireCookie from hostname to url
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* feat: remove reference to otp_invalid response since it is not used anymore
* remove usage of otpInvalid in CLI receive command
* fix: remove vestigial error types.
* chore: update sdk
* chore: fix failing test
---------
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
* Make TwoFactorIconComponent standalone
* Angular updates to TwoFactorIconComponent
- Migrate TwoFactorProviderType from enum to const (ADR25)
- Migrate Inputs to Signals
- Make provider a required input
- Use new Control Flow syntax
- Use OnPush change detection
- Memoize function for legacy providers (providers with png image)
- Add documentation
- Remove @ts-strict-ignore
- Fix type in TwoFactorSetupDuoComponent as it would default to number because of the migration of TwoFactorProviderType (enum to const). Now it can be overridden with any value of TwoFactorProviderType
* Add type guard for TwoFactorProviderType and fix CLI
* PM-32915 - Update TwoFactorProviderType to mark U2f as deprecated in favor of WebAuthn
* PM-32915 - TwoFactorIconComp - refactor to eliminate legacy providers and just use new, already available duo and yubikey SVG icons.
* PM-32915 - Add TODOs for cleaning up mfaType usages.
* PM-32915 - Remove unncessary ng-container
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
* [PM-29528]Remove @ts-strict-ignore in autofill.service.ts
* remove redundant explicit checks
* implement a discriminated union to account for forms with no username
* add reducer and move up const for field opid
* Update apps/browser/src/autofill/services/autofill.service.ts
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
* revert suggestion
---------
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
* PM-24047: Make popout windows respect vault timeout when unfocused
Replace the heartbeat message-passing mechanism for popup detection
with direct browser API queries (getContexts on MV3, getExtensionViews
on MV2/Safari) that can distinguish focused from unfocused popout
windows. Unfocused popout windows no longer prevent vault timeout.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* PM-24047: Add isAnyViewFocused(), revert isPopupOpen() to simple popup detection
Addresses PR review feedback by separating focus-aware logic from the
isPopupOpen() semantics, which other callers depend on for simple
popup detection:
- BrowserApi.isPopupOpen(): reverted to return views.length > 0 for
popup-type views only (original behavior)
- BrowserApi.isAnyViewFocused(): new method that checks popup views
(always focused), sidebar tab views (always focused), and popout
tab views (focused only if document.hasFocus() is true)
- BrowserPlatformUtilsService.isPopupOpen(): simplified MV3 path
uses getContexts({ contextTypes: ['POPUP'] })
- BrowserPlatformUtilsService.isAnyViewFocused(): new method with
MV3 (POPUP/SIDE_PANEL/focused TAB) and MV2/Safari paths
- PlatformUtilsService: adds isAnyViewFocused() to the interface
- Web/Desktop/CLI stubs return false (no popout windows)
- VaultTimeoutService now calls isAnyViewFocused() instead of
isPopupOpen() so unfocused popouts don't block vault timeout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Move MV3/MV2 routing into BrowserApi
isPopupOpen() and isAnyViewFocused() now use feature detection for
chrome.runtime.getContexts to select the right API internally,
rather than having the routing in BrowserPlatformUtilsService.
This means BrowserApi is the single owner of view-detection logic,
and the service methods are simple one-line delegations.
Using typeof getContexts === "function" rather than isManifestVersion()
handles Safari naturally: if Safari doesn't support getContexts it
falls back to getExtensionViews, without needing an explicit isSafari()
exclusion.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Scope MV3/MV2 routing refactor to isAnyViewFocused only
isPopupOpen() keeps its existing pattern (MV3/MV2 routing in the
service, simple getExtensionViews in BrowserApi) to avoid touching
unrelated code. Only isAnyViewFocused() has its routing moved into
BrowserApi via feature detection.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Restore isPopupOpen to main branch implementation
isPopupOpen() and its tests are restored exactly to the main branch
version (heartbeat-based approach). Only isAnyViewFocused is new code.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Refactor isPopupOpen() to use getContexts/getViews instead of heartbeat
Replaces the message-passing heartbeat approach with the same
chrome.runtime.getContexts() (MV3) / chrome.extension.getViews() (MV2/Safari)
introspection pattern used by isAnyViewFocused(). This eliminates the need
for a heartbeat listener in the popup and makes both methods consistent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Simplify isAnyViewFocused() using Array.some()
Collapse the two separate POPUP/SIDE_PANEL checks into a single .some()
call, and replace the synchronous MV2/Safari tab view loop with .some().
The async TAB/popout window check stays as a for loop.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: improve tabs loop readability somewhat
* PM-24047: Fix MV3 popout focus check using wrong uilocation filter
The TAB context filter was checking for `uilocation=sidebar` instead of
`uilocation=popout`. In MV3, sidebars are SIDE_PANEL contexts (already
handled above), so this filter never matched, causing focused popout
windows to be silently ignored and the vault to timeout while a user was
actively viewing one.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PM-24047: Rename isViewOpen to isViewFocused for semantic accuracy
The variable and parameter previously named isViewOpen reflected
the old "is any view open?" semantics. After the refactor to
isAnyViewFocused(), the naming is updated to match the actual
behavior: checking whether a view is focused, not merely open.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* [PM-29521]Remove @ts-strict-ignore in fido2.background.ts
* reduce expanded pattern used while testing
* Update apps/browser/src/autofill/fido2/background/fido2.background.ts
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
* account for slash or colon on local host
* fix lint format
---------
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
* [PM-29529]Remove @ts-strict-ignore in background-notification.background.ts
* address feedback
* explicit check in container to match notification bg
* Add debouncing to `setupOverlayOnField`
* add teardown of debounce to deleteCachedAutofillElement calls
---------
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
* feat: add bit-header component to component library
Add new bit-header component to libs/components with:
- Header component with left, center, and right content projection
- Storybook stories for documentation
- Export from component library index
* refactor: update web header to use bit-header component
- Refactor web-header to use new bit-header component from libs/components
- Extract account menu to separate component
- Update header module to import HeaderComponent
* delete web-header stories
---------
Co-authored-by: Will Martin <wmartin@Wills-MBP.attlocal.net>
* feat(billing): add taxId to upgrade organization request type
* feat(billing): implement tax ID validation for organization upgrades
* feat(billing): conditionally display tax ID field in upgrade form
* test(billing): add tax ID validation tests for organization upgrades
* fix(billing): PR feedback update
* fix(billing): remove tax id requirement for non-US billing
* test(billing): update tests for non-US billing address
* [pm-32250] fix: default to "No Folder" in cipher save prompt
* [pm-32250] add tests for button-row.ts
---------
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
* refactor: Adjust icon placement in org-switcher and nav-group components
* Move icons from 'end' to 'start' slot in org-switcher component for better alignment.
* Add conditional rendering for content in the 'start' slot of nav-group component.
* feat: Add warning icon support to navigation components
* Introduce `warningIcon` and `warningIconLabel` inputs in nav-base component for customizable warning icons.
* Update org-switcher and nav-group components to utilize the new warning icon functionality.
* Implement conditional rendering of warning icons in nav-item component for better user feedback.
* Enhance org-switcher component by replacing warning icon logic with a dedicated bit-icon element for better accessibility. Also, import IconModule to support the new icon usage.
* Refactor navigation components to remove deprecated warning icon properties and enhance structure. Updated org-switcher to utilize a dedicated bit-icon for accessibility improvements.
* Enhance org-switcher component by adding a margin utility class for improved layout consistency. Clean up nav-group component by removing deprecated slot logic for better maintainability.