* show full urls for autofill confirmation dialog
* add tooltip for autofill confirmation dialog
* add word-break for tooltips
* update tests
* update functionality to account for startsWith and Regular expression
* fix typings
* fix test types that were breaking build
Updates the `ChangePasswordService` (`changePassword()` and `changePasswordForAccountRecovery()`) to use the new KM data types :
- `MasterPasswordAuthenticationData`
- `MasterPasswordUnlockData`
This allows us to move away from the deprecated `makeMasterKey()` method (which takes email as salt) as we seek to eventually separate the email from the salt.
Also moves current password validation into the default and web change password services.
Behind feature flag: `pm-27086-update-authentication-apis-for-input-password`
* [PM-27772] Add TrendWidget component with Chart.js implementation (#19078)
Add reusable TrendWidget component with Chart.js line chart for displaying risk trends over time in Access Intelligence.
- Configurable datetime/linear x-axis scales
- Theme-aware colors from design system (brand-700/400, gray-200/600)
- Full i18n support (10 new translation keys)
- Loading spinner and error state handling
- Proper Chart.js lifecycle management
* [PM-28530] Implement period selector UI component (#19162)
* feat(dirt): define TimePeriod type for risk-over-time period selector
Add const object type for 5 time periods (month, 3mo, 6mo, 12mo, all)
following ADR-0025 no-enum pattern. Includes PeriodOption interface
and PERIOD_OPTIONS config for rendering.
[PM-28530]
* feat(dirt): create PeriodSelectorComponent using bit-menu
Custom trigger button with bit-menu dropdown for risk-over-time
time period selection. No clear button, neutral styling matching
Figma design. Check icon marks current selection.
[PM-28530]
* feat(dirt): add barrel export for period selector
[PM-28530]
* feat(dirt): add i18n strings for period selector options
Add translation keys for time period labels: pastMonth, last3Months,
last6Months, last12Months, and timePeriod placeholder.
[PM-28530]
* feat(dirt): add Storybook stories for PeriodSelectorComponent
Stories for default state, pre-selected 3 months, and disabled state.
[PM-28530]
* test(dirt): add unit tests for PeriodSelectorComponent
Tests cover default state, period options with pre-translated labels,
selection changes, and selected label reactivity.
[PM-28530]
* feat(dirt): integrate PeriodSelector into TrendWidget component
Replace placeholder with dirt-period-selector dropdown. Add TimePeriod
to TrendWidgetTimespan mapping layer to bridge the two type systems.
Remove standalone Storybook story and disabled input per review feedback
— component now lives inside TrendWidget, not standalone.
[PM-28530]
* refactor(dirt): replace model() with signal() + output() for PeriodSelector
Switch from Angular's model() API to the signal() + output() pattern
used throughout the Access Intelligence module. This matches the
existing convention in TrendWidget (selectedTimespan/timespanChanged),
app-table-row-scrollable (checkboxChange/selectAllChange), and
review-applications-view (onToggleSelection/onToggleAll).
Changes:
- Replace model<TimePeriod>() with signal<TimePeriod>() for internal state
- Add explicit selectedPeriodChange output for parent notification
- Manual .emit() in selectPeriod() to match module convention
- Update test to verify output emission via subscribe spy
No functional change — both patterns emit selectedPeriodChange events.
The template binding (selectedPeriodChange)="..." is unchanged.
* refactor(dirt): update labels to match Figma and unify type system
Update period selector labels per Figma design:
- "Last 3 months" → "Past 3 months" (past3Months)
- "Last 6 months" → "Past 6 months" (past6Months)
- "Last 12 months" → "Past year" (pastYear)
- "All" → "All time" (allTime, new key — pre-existing "all" key untouched)
Rename TimePeriod const keys to match labels:
- Last3Months → Past3Months
- Last6Months → Past6Months
- Last12Months → PastYear
- All → AllTime
Wire values unchanged ("month", "3mo", "6mo", "12mo", "all") to
preserve server API compatibility.
Remove TrendWidgetTimespan entirely — TrendWidget now uses TimePeriod
directly for signals, outputs, and data model. Eliminates the temporary
mapping layer (timePeriodMap + onPeriodSelectorChange). Period selector
wires directly to onTimespanChange().
[PM-28530]
* [PM-28533] Add view selector to TrendWidget component (#19163)
Adds the view selector button group to the TrendWidget component. Hooks up to existing signal and emits events when the view mode is changed. In future development, the parent component of TrendWidget will need to handle these events to fetch updated chart data from the API.
View options are:
Applications
Passwords
Members
* Fix TimePeriod type errors in TrendWidget stories (#19239)
Replace invalid "past-month" string literals with TimePeriod.PastMonth
constant to match the TimePeriod type definition. The TimePeriod const
object uses "month" as the value for PastMonth, not "past-month".
* [PM-32056] Add feature flag for access intelligence trend chart (#19164)
* feat(dirt): add feature flag for access intelligence trend chart
Register the `pm-26961-access-intelligence-trend-chart` feature flag
to gate the upcoming TrendChart widget in the Activity tab. Default
is FALSE (disabled). PM-32057 will consume this flag when wiring up
the widget component.
[PM-32056]
* feat(dirt): read trend chart feature flag in activity component
Inject ConfigService into AllActivityComponent and read the
AccessIntelligenceTrendChart flag on init. This prepares the
component for the TrendChart widget to be conditionally rendered.
[PM-32056]
* feat(dirt): add conditional wrapper for trend chart widget
Add an @if block gated by the AccessIntelligenceTrendChart feature
flag in the Activity tab template. The TrendChart widget will be
placed inside this block when wired up.
[PM-32056]
* reset package files to main
* install chartjs using node v22
* add chartjs to dirt team deps (#19244)
* [PM-32055] Download TrendWidget chart to PNG and CSV (#19245)
This PR adds a download button to the TrendWidget component that supports downloading the "Risk over time" chart data as a PNG or in CSV format.
Logic to dynamically add a chart title and x/y axis labels is included. This required creating a service that recreates a copy of the chart with title and axis labels applied, in an off screen canvas element, and then exporting to blob for file download. This logic is owned by the ChartExportService.
* Fix readonly variables. Update chart variable to use signal
* Fix any type in test file
---------
Co-authored-by: Brad <44413459+lastbestdev@users.noreply.github.com>
Co-authored-by: Alex <55413326+AlexRubik@users.noreply.github.com>
Co-authored-by: Brad Deibert <bdeibert@bitwarden.com>
Updates import statements in autofill-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
* adds premium-upsell service
* adds and updates tests
* changes name and type in test file
* fixes strict ts
* Update libs/angular/src/vault/services/premium-upsell.service.spec.ts
fix import
Co-authored-by: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com>
* change initial value and fix import order
---------
Co-authored-by: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com>
* fix(phishing): check alternate protocol when matching URLs against block list
The phishing blocker's IndexedDB lookup only checked the exact URL href.
When the block list contains http:// entries but the browser auto-redirects
to https://, the lookup failed silently. This adds O(1) alternate-protocol
lookups (swapping http:// ↔ https://) with the same trailing-slash
normalization.
[PM-32843]
* test(phishing): add unit tests for alternate-protocol URL matching
Covers HTTP→HTTPS and HTTPS→HTTP matching, trailing slash normalization
with protocol swap, short-circuit when exact match is found, no false
positives, and non-HTTP protocol handling.
[PM-32843]
Adds a containsChildFormElement guard to left-label, right-label, and
recursive sibling traversal so that text inside a sibling DOM container
that holds its own input/select/textarea is not absorbed as label text
for the target field. This prevents Yahoo's country-code dropdown
container ("Enter Country Code") from contaminating the username field's
label-left, which caused a false TOTP classification via the word "code".
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 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
* 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
* [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>
* [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>