Convert mutable class properties to readonly, using signals for
buttonLabel and generatedValue to satisfy the enforce-readonly-angular-properties rule.
* 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>
* add release channel for snap, defaulted to stable, add download for arm64 variant, add upload for arm, make channel a variable we can pass
* temporarily comment out amd publish to resolve duplicate rejection error
* restore branch check, uncomment amd64 line
* [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>
* Remove the hostname from serverCommunicationConfig as the cookieDomain can be used
* Fix types issue
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.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.
* Add tests to verify behavior when organizations do not use policies and when users are exempt as owners.
* Update service logic to correctly handle policy retrieval based on user type and organization settings.
* Add state- and key-definitions for persisting serverCommunicationConfig(s)
* Add implementation of the SDK-defined ServerCommunicationConfigRepository
* Add ServerCommunicationConfigService
* Add state- and key-definitions for persisting serverCommunicationConfig(s)
* Add implementation of the SDK-defined ServerCommunicationConfigRepository
* Add ServerCommunicationConfigService
* Fix instantiation of ServerCommunicationConfigClient due to additional dependency on ServerCommunicationConfigPlatformApi
* Fix broken tests
* Fix ts-strict error
* Call setCommunicationType when ConfigService.serverCommunicationConfig$ emits (#19218)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Move service instantiation to desktop's service.module
* Deleted unused tests
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* fix(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Initial change to try and fix issue.
* fix(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Added back in change that broke it.
* fix(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Fixed.
* fix(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Added tests and updated comment.
* docs(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Moved comment.
* test(sso): [PM-33190] SSO Fails on Callback from Successful IdP Login - Accepted feedback.