Commit Graph

2778 Commits

Author SHA1 Message Date
Will Martin
d763590ce6
[CL-1023][CL-1031] Design system refresh: Milestone 1 (#19061)
* [CL-1009] button style updates (#18301)

* add new button styles

* update disabled styles

* updated size stories

* update disabled button story names

* updated button stories

* add more explicit screenshots

* make class list a computed signal

* updated button docs

* allow unstyled button to inherit color

* use unstyled button in callouts until callout updates

* base button directive WIP

* add base button directive

* fix focus and hover styles

* fix lint error

* remove commented code that moved to base directive

* ensure buttonStype defaults correctly

* migrate legacy icon button types

* contrast button wips

* pull in latest and fix disabled with attr

* fix legacy variant

* add back nav contrast button variant

* updated icon button docs

* rename nav contrast variant and fix contrast focus

* fix button sizing

* fix product switcher button classes

* add contrast icon button story

* fix border color

* update to primaryGhost variant

* [CL-1025] icon font refresh (#18727)

* adding new icons

* migrate to new icon names

* updated icon build docs

* resolve conflicts and re-run migration

* add icons deps to uif ownership

* fix incorrect migration

* fix misnamed icon

* create filter icon and fix mapping error

* updated readme and add migration script to package.json

* fix prettier warnings

* remove browser alt from definition list

* add missing icon types

* fix image name migrated in error and update regex to not change these

* ensure icon array is updated automatically

* updated build comment

* remove unnecessary direct execution command

* remove direct run command

* allow legacy icon names to map to new icons

* [CL-1025] Icon font refresh - Temporary migration state with legacy names (#18948)

* Revert icon name migrations, preserve migration tooling

Reverted all icon name changes that were applied by the migration scripts,
while preserving:
- New icon SVG files in libs/assets/src/material-icons/
- Icon font files in libs/angular/src/scss/bwicons/
- Migration scripts in scripts/material-icons/
- NPM scripts and dependencies for icon tooling

This allows running the migration fresh when ready.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Build icon font with bidirectional legacy/new name mapping

Ran icons:build to generate bidirectional icon mappings:
- SCSS now includes 155 icons (both Figma and legacy BWI names)
- TypeScript icon.ts updated with all 155 names
- All legacy names (e.g., bwi-question-circle, bwi-plus) point to new icon assets
- All new names (e.g., bwi-help, bwi-add) also available
- Codebase can continue using legacy names with new icon designs

This enables the temporary migration state where code uses existing
legacy icon names but displays the new refreshed icon assets.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix: revert bwi-filter back to bwi-grid across codebase

bwi-grid is the correct new icon name and should not be reverted.
The changes from bwi-filter to bwi-grid were manual corrections,
not part of the automated migration.

Updated 16 files to restore bwi-grid icon references.

Addresses feedback from Bryan Cunningham on PR #18948

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* remove duplicate key and add back dep ownership change

* fix formatting errors

---------

Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix button variant

* [CL-1040] updated palette colors (#19401)

* [CL-973] chip component (#18798)

* wip

* WIP

* create chip filter component

* trying to get truncation to work

* fix truncation

* create chip-action component

* fix type errors

* add chip component

* add shared story args

* have chips take label input

* fix test template and imports

* fixing arg types and disabled states

* simplify disabled logic

* fix dimssis button alignment

* update menu focus color

* updated chip docs

* update chip-select usage to chip-filter

* fix full width icon layout

* remove commited code

* export chip component

* remove commented code

* expose full width

* chip component should not go full width

* use bit-icon in filter template

* remove commented code

* updated chip docs

* remove extra truncate class

* fix dupe input definitions

* move import to correct line

* read base chip values directly

* remove standlaone as it's the default

* forward size correctly

* create full width arg type

* let type be infered

* updated jsdoc comments

* use more modern angular syntax

* rename components to use kebab case

* remove redundant docs

* remove inaccurate link docs

* remove enum like types

* remove dead code

* remove unused spec

* remove host bindings

* restructure chips folders

* add max width class

* remove full width docs

* add internal comment

* bind to missing controls

* fixing docs

* replace disabled verbiage with inactive

* remove unnecessary comment

* default to primary

* do not allow end icon in action chip

* take chip action screenshots in both themes

* use selected input for base directive

* fix width error

* coerce to boolean

* fixed end icon reference

* fix code reference to endIcon

* fixing chip filter specs

* fix missing input transform

* fix docs

* fix input and add truncate

* ensure chip content truncates

* updated slot naming

* updated example to use new flow control

* fix typing for option.icon

* fix failing test, fix filter type, and support colored icons in filter options

* fix failing test

* doc updates

* change dismissed event name

* remove standalone

* fix selector

* fix docs

* remove unused fvw data property and fix docs links

* use base as host directive in chip

* fix spec button selectors

* fix duplicate class binding

* fix incorrect variant resolution

* handle undefined size

* fix signal type

* remove duplicate input

* fix failing spec

* updated styles for trailing icon spacing and font size

* padding tweaks for visual design

* make variant a writable model

* use logical text align

* update slot names

* remove dismissible input

* add back missing import

* remove ability to set chip filter to small size

* create size arg type

---------

Co-authored-by: Vicki League <vleague@bitwarden.com>

* [CL-987] Update Nav Group and Nav Item components (#18965)

* updated side nav `nav-group` and `nav-item` components

* - added focus states
- set cursor pointer for nav-item
- updated arrow orientations

* - updated `navItemIndentationPadding`
- reverted `[treeDepth]` for `nav-group`
- removed placeholder arrow

* - removed text style from starting slot container
- fixed routes in story

* created shared container classes var

* fixes from rebase, override `border-radius` for collapse arrow button

* updated `tw-theme`: reverted `--color-bg-hover` and added `--color-bg-sidenav-hover`

* removed end slot `div` styles from rebase, updated `buttonType` in `nav-group` story

* added dark mode `--color-bg-sidenav-hover`

* added `xsmall` size variant to 'Icon Button'

* - updated navs to use 'xsmall' button
- fixed container padding
- removed custom arrow button styles

* fixed type error

* fixed focus-visible state by adding `tw-outline-none` to `nav-item`

* fixed type error

* placed arrow button directly in start slot

* defined `containerClasses` in template

* renamed 'item-active-hover' to 'active-item-hover' for consistency

* missed renaming from `item-active-hover` to `active-item-hover`

* fixed 'hover' and 'active' colors, added colors for arrow hover states

* - separated buttons sizes for 'Button' and 'Icon Button' from `BaseButtonDirective` into respective components
- moved `border-radius` style from Directive into own components

* fixed/simplified focus colors, added sidenav specific focus colors

* updated 'arrow' icon size for nav group, updated 'xsmall' font size

* trigger Claude review

* removed `tw-text-2xl` in nav-group for arrow button

* removed unused `NgClass` import

* more cleanup, removed unused `Ng` imports

* converted `_isActive` to signal and `showActiveStyles` to computed

* removed instances of `variant="tree"`

* renamed color variables from `admin-sidenav` to `sidenav-secondary`

---------

Co-authored-by: Will Martin <contact@willmartian.com>

* fix lint

* [CL-1096] Fix icon button width shrinking in flex containers (#19529)

Add tw-shrink-0 to prevent icon buttons from shrinking below their
fixed size when placed inside flex containers.

* [CL-1101] Fix chip dismiss button hover style and add interaction state stories (#19530)

Use the correct bg-bg-hover token for dismiss button hover background, matching
the Figma spec. The previous hover-contrast token was invisible on light backgrounds.
Add InteractionStates story showing Default, Hover, Focus, and Inactive states
for both large and small sizes.

* [CL-1098] Fix danger icon button color in form field suffix (#19532)

* [CL] Fix danger icon button color in form field suffix

Don't apply tw-text-muted to icon button suffixes — icon buttons manage
their own text color via buttonType, so the muted class was overriding
danger/primary colors (e.g. blue icon on red background in Cipher Form).

* [CL] Fix danger icon button color in form field suffix

Don't apply tw-text-muted to icon button suffixes — icon buttons manage
their own text color via buttonType, so the muted class was overriding
danger/primary colors (e.g. blue icon on red background in Cipher Form).

Also adds a DangerButtonInputGroup story to capture this case.

* [CL-1094] Update icon button default variant to primaryGhost (#19534)

* [CL-1094] Update icon button default variant to primaryGhost

Change buttonType from input to model in BaseButtonDirective, and set
the default to primaryGhost in the icon button constructor.

* [CL-1094] Fix icon button default variant using own input + effect

Using model.set() in the constructor is overridden by Angular's input
initialization lifecycle. Instead, own buttonType as an input directly
on BitIconButtonComponent with primaryGhost as the default, and sync to
the base directive via effect.

* [CL-959] update badge component styles (#19026)

* badge wip

* dynamic truncated badge tooltip

* support legacy variants for now

* add deprecation types and remove hover styles

* updated story docs

* add default icons for badges

* fix incorrect color mapping

* add ability to hide start icon

* take snapshot in both themes

* add icon size styles

* remove tooltip code

* update at risk password to use actual buttons

* more specific badge truncation docs

* remove badge module from imports

* use chip action for link

* fix missing import

* use chip in multi-select inputs

* update org badge to use primary chip

* update premium badge to accent primary action chip

* use chip action for vault item fill

* remove unnecessary icon in badge

* update obsolete notification variant

* replace usage of bitBadge on button in stories

* remove explicit input to hide startIcon

* use berry instead of badge

* fix type error

* fixing imports and badge usage

* use logical text align

* remove dead code and update jsdoc comment

* add back ability to not truncate

* remove default icon for accent-primary

* add missing translation keys to multi select story

* allow null as default icon type

* add element selector and update stories to use it

* conditionally apply truncate class

* conditionally apply title text

* migrate badge to berry

* use correct input for content

* use berry in toggle group stories

* remove unused template reference

* remove unused import of badge

* remove unused custom color code

* remove unused service injection

* [CL-1102] Fix help icon size in bit-label (#19533)

* [CL-1102] Fix help icon size in bit-label

Target bwi icons inside bit-label with [&_.bwi]:tw-text-xl to restore
correct icon sizing after recent icon style changes.

* [CL-1102] Fix text alignment regression in bit-label

Add tw-leading-none to bwi icons to prevent the line-height from
tw-text-xl from disrupting baseline alignment.

* remove bwi-sm from label icon

---------

Co-authored-by: Bryan Cunningham <bryan.cunningham@me.com>

* [CL-964] Update Callout Component (#19424)

* updated callout component

* renamed consumer bit-callout `type` from 'default' to 'subtle'

* updated callout 'end' slot

* migrated spotlight to callout, deleted spotlight

* - updated `title` comment
- updated stories and mdx

* removed `useAlertRole`

* added `CommonModule` import and updated `buttonType` in stories

* updated 'Accessibility' guidelines

* updated 'close' button

* - updated stories for clearer code
- set `(onDismiss)` only for WithCloseButton story

* added boolean switch for `persistent` to story

* fixed tests

* prettier fix

* - updated `bit-callout` instances of `buttonType="unstyled"` to use appropriate `buttonType`
- updated story for correct usage of button styles

* fixed `type` in `vault-list`

* updated to use `bit-icon`

* - fixed vertical centering of icon and text
- updated to 'OnPush' change detection

* fixed error: added 'close' to `mockLayoutI18n`

* updated `bit-callout` jsdoc comment and mdx

* fixed `persistent` callout in `admin-settings`

* removed "interrupt" language

* reverted fix for `bit-callout` `persistent`

* fixed type error

* added `close` translation to stories utilizing `bit-callout`

* converted to JSDoc comments

* updated 'close' button to check if `dismiss` output is bound

* fix: removed `readonly` from `isDismissible`

* converted `isDismissble` to signal

* added translation to `phishing-warning' story

* added bottom margin back in to callout component

* fixed type error,  fixed `icon` values

* revert subscription-card callout icon to default if not defined

* fix: update 'bit-callout' type to 'subtle'

* updated colors in `tw-theme`

* added conditional check to compute vertical alignment class

* updated more colors, slight restructure to match design

* fixed vertical alignment with 'close button', avoid long text crowding/overflowing

* remove default icons on non-semantic variants (#19614)

* remove default icons on non-semantic variants

* add back info icon to info variant

* remove info icon again

* [CL-1095] add expanded state for disclosure button (#19637)

* add brand stronger colors

* add aria-expanded styling for primary ghost button

* make all variants aria-expanded style match hover styles

* update orage-600 color value to fix contrast

* minor spacing update to account for expanded button style

* do not show expanded state on sidenav buttons

* no expanded style on toggle width button

* remove extra letter spacing and update story copy (#19668)

* [CL-1123] fix ghost button inactive styles (#19669)

* fix ghost button inactive styles

* remove type declaration

* [CL-1119] toggle berry update (#19609)

* update toggle groups to use berry

* set berry variant based on selected state

* fix failing spec

* add spec to test berry variant set correctly

* fix import errors caused by bad merge conflict resolution

* remove unnecessary variant delaration

* update kitchen sink stories to use berry

* [CL-1122] BUG FIX: Migrated Icon Buttons with button type 'danger' to 'dangerGhost' (#19677)

* migrated `bitIconButton` with 'danger' `buttonType` to 'dangerGhost'

* reverted icon-button story

* fix button variant from merge

* [CL-1117] BUG FIX: Side nav collapse arrow is placed too far left (#19623)

* - updated spacing for side-nav collapse arrow button
- updated collapsed nav-item button spacing and dimensions
- moved individual nav-item wrapper padding into side-nav component
- added button to 'WithLongText' nav-item story

* added sidenav specific hover style to toggle collapse button

* - set horizontal padding back to 'nav-item'
- updated 'bit-divider' color to 'bg-border-brand'

* updated hover styles for interactive trailing elements

* added '4px' more end padding to trailing buttons

* updated 'bit-divider' colors for secondary and dark theme

* moved button hover styles into 'side-nav' button variant

* updated sidenav-divider color for dark theme

* removed `tw-w-10` on nav-item collapsed

* updated inline padding to `12px` for both collapse and expanded states

* [CL-1117] cleaned up, renamed, and organized sidenav color variables (#19665)

* - unified 'strong' styles and `showActiveStyles` into `[style]`
- updated 'side-nav' button variant's `aria-expanded` and `focus-visible` styles

* - inherit bg and fg from parent `sidenav`
- allow trailing buttons set own fg

* updated nav group story for trailing elements

* updated nav-logo 'focus' to nav focus style

* let toggle width arrow inherit 'aria-expanded' style from 'side-nav' buttontype

* removed danger button variants from nav group story

---------

Co-authored-by: Bryan Cunningham <bcunningham@bitwarden.com>
Co-authored-by: Vicki League <vleague@bitwarden.com>
Co-authored-by: Leslie Xiong <lxiong@livefront.com>
2026-03-25 10:55:06 -05:00
Jake Fink
91aa106b93
use getExtensionViews for isPopupOpen on MV2 (#19742) 2026-03-24 17:26:05 -04:00
Thomas Rittson
577bfbb231
Update all event import statements and remove re-exporting files (#19545)
Final import statement update after moving files to DIRT ownership
2026-03-24 16:00:39 -04:00
Jonathan Prusik
a966e75576
[PM-27368] Injected Autofill experiences should respect the user's "show animations" setting (#19622)
* toggle autofill animation based on user setting

* toggle inline-menu animation based on user setting

* toggle notification animation based on user setting

* review feedback changes

* add tests

* reformat comments
2026-03-24 15:48:17 -04:00
Daniel Riera
daa6e7ba41
[PM-29524]Remove ts strict ignore in collect autofill content service (#19525)
* initialize observer fields as nullable lifecycle properties

* [PM-29524]Remove @ts-strict-ignore in collect-autofill-content.service

* formatting

* address feedback

* update jsdoc

* prettier

* dead code path
2026-03-24 07:45:59 -05:00
Jared Snider
ebd896f91a
Auth/PM-33261 - Multi-client Password Management (new for desktop & extension) (#19289)
* PM-32413 - Add hasPassword guard for future use.

* PM-32413 - Web - PasswordSettingsComp - add TODO for using new guard.

* PM-32413 - ChangePasswordComp - Add output emitter for when a password has been changed successfully.

* PM-32413 - Add feature flag

* PM-32413 - Desktop - implement change password component in a dialog.

* PM-32413 - Add change password to extension

* PM-32413 - Fix translations

* PM-32413 - Desktop - menu - add clean up todo

* PM-32413 - Feature flags - reset hardcoded true values

* PM-32413 - Add clean up todos

* PM-32413 - Extension Routing module - add hasPassword guard

* PM-32413 - add todo

* PM-32413 - Desktop / Extension - use  InputPasswordFlow.ChangePassword instead of  InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation

* PM-32413 - Finish last AI review items

* PM-32413 - Per PR feedback, update change-password-dialog title translation to one that we don't plan on removing.

* PM-32413 - Per PR feedback, update menu item id

* PM-32413 - Per local claud review - modify has-password to use UrlTree pattern.

* PM-32413 - ChangePassword comp - add  this.passwordChanged.emit(); in newly flagged code branch
2026-03-23 16:47:50 -04:00
bmbitwarden
099a8fa45e
PM-31418 implemented password generator inside drawer (#19521)
* PM-31418 implemented password generator inside drawer

* PM-31418 resolved pr comment

* PM-31418 resolved layout of save and cancel buttons

* PM-31418 restore password generator menu in browser
2026-03-23 09:16:22 -04:00
bitwarden-devops-bot
7f0ebed6d0
Bumped client version(s) 2026-03-23 10:44:20 +00:00
Daniel Riera
9f115703c6
[PM-33106]Harden WebAuthn message listener against sandboxed iframe (#19339)
* PM-33106 Harden WebAuthn message listener against sandboxed iframe (null origin)

* add tests

* update overrides

* add comment

* fix test
2026-03-23 06:39:55 -04:00
bw-ghapp[bot]
86bd44f1e8
Autosync the updated translations (#19704)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-03-23 02:42:38 -05:00
SmithThe4th
bc1e01993d
Added error message to desktop and browser (#19692) 2026-03-20 19:14:35 +00:00
Nick Krantz
e6ecca1b54
[PM-30284] Autofill confirmation dialog (#19352)
* 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
2026-03-20 11:18:30 -05:00
bw-ghapp[bot]
4f66762e40
Autosync the updated translations (#19541)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-03-20 10:48:12 -05:00
John Harrington
4c9965a75f
[PM-33232] Update UX implemented in PM-33219 to resolve VULN-458 (#19514)
* send AuthType in request payload and allow empty email field

* re-introduce validation enforcing non-empty email field
2026-03-19 13:36:32 -07:00
Jason Ng
5ff9b64925
[PM-33199] update lint rules intro carousel (#19670) 2026-03-19 16:07:36 -04:00
Jason Ng
4a10aaa75e
[PM-33199] Intro Carousel Unit Tests and OnPush (#19396)
* add unit tests. add onPush. update spec to use router
2026-03-19 14:24:30 -04:00
rr-bw
411156aeaa
refactor(input-password-flows): [Auth/PM-27086] Use new KM Data Types in InputPasswordComponent flows - Change Password (#18507)
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`
2026-03-19 10:40:14 -07:00
Jordan Aasen
50cc059943
Revert "[PM-33426 ] - add popup focus wrap directive (#19508)" (#19661)
This reverts commit e78eca7cdb.
2026-03-19 09:57:45 -07:00
Leslie Tilton
bfb47cc9da
Add TrendWidget Feature Work (#19639)
* [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>
2026-03-18 16:04:04 -05:00
Jordan Aasen
e78eca7cdb
[PM-33426 ] - add popup focus wrap directive (#19508)
* add popup focus wrap directive

* fix comment
2026-03-18 09:17:23 -07:00
Jonathan Prusik
a883fe5192
[PM-29525] Typefixes in services/autofill-overlay-content.service.ts (#19555)
* fix typing issues

* replace ts-strict-ignore for remaining work
2026-03-18 12:05:09 -04:00
Jonathan Prusik
aaf239a2c5
[PM-33568] Add Claude guidance on injected content script exceptions (#19559)
* add Claude guidance on injected content script exceptions

* update CODEOWNERS

* update CODEOWNERS

* remove high-level Claude guidance

* update CODEOWNERS

* execute PR feedback

* include all autofill content files in the rule
2026-03-18 12:04:29 -04:00
Thomas Rittson
1545a9716e
[Autofill] Update event-related import statements (#19547)
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
2026-03-18 08:58:17 -04:00
Thomas Avery
51c2ac2f16
[PM-31928] Cleanup backwards compatibility code in extension lock service (#19354)
* Cleanup backwards compatibility code in extension lock service

* Add unit test coverage
2026-03-17 18:02:58 -05:00
Jackson Engstrom
56ef1dd3f4
[PM-32180] Change when premium upgrade happens (#19593)
* 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>
2026-03-17 14:11:04 -07:00
Daniel Riera
0071c3221e
WIP (#19423) 2026-03-17 11:56:21 -04:00
Daniel Riera
01ef859e97
[PM-29527]Remove @ts-strict-ignore in fido2.component.ts (#19464) 2026-03-17 10:30:49 -05:00
Bernd Schoolmann
e97450abba
chore: bump sdk-internal to 0.2.0-main.608 (#19587)
* chore: bump @bitwarden/sdk-internal to 0.2.0-main.608

* [PM-30584] Move key-connector migration to sdk (#19360)

* Move key-connector migration to sdk

* Remove unused import

* Fix DI

* Fix dependencies on cli

* Fix types

* Fix import order

* fix tests

* Remove unused import

* Rename feature flag
2026-03-17 08:24:44 -05:00
Alex
41c547015d
[PM-32843] Fix phishing blocker not blocking HTTPS variants of HTTP URLs (#19265)
* 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]
2026-03-16 11:21:50 -07:00
✨ Audrey ✨
f48647e2f1
[PM-31646] stop label collection from crossing into sibling form-field containers (#19452)
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".
2026-03-16 15:23:29 +00:00
✨ Audrey ✨
877598ec9c
[PM-31646] prioritize usernames ahead of ambiguous TOTPs (#19453)
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.
2026-03-16 10:21:45 -05:00
Daniel Riera
852e5015a7
[PM-33019] Add is trusted check in messenger.ts (#19329)
* PM-33019 Add isTrusted check in messenger.ts

* update tests to accomodate isTrusted

* return comment
2026-03-16 09:56:56 -05:00
Thomas Rittson
124c04503d
[Vault] Update event-related import statements (#19546)
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
2026-03-14 09:10:57 +10:00
Jason Ng
55d0595184
[PM-29250] remove browser premium spotlight flag. update spec files (#19364) 2026-03-13 14:56:40 -04:00
Ben Brooks
c2493674d7
[pm-33048] Exclude non-text inputs from multi-step qualification (#19493)
* [pm-33048] Exclude non-text inputs from multi-step qualification
* [pm-33048] Guard against null pageDetailsField.type under ts-strict

---------

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
2026-03-13 09:48:39 -07:00
Nick Krantz
bc0a369106
refer to folderViews$ directly to avoid circular dependency (#19376) 2026-03-13 09:44:33 -05:00
Daniel Riera
4cc607612a
PM-33023 Utilize currentlyInSandboxedIframe() method within fido2 to give parity to password autofill (#19335) 2026-03-12 12:53:46 -04:00
Nick Krantz
2d702e0eac
[PM-32661] Update Transfer Items Dialog (#19498)
* 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
2026-03-11 16:19:09 -05:00
Daniel Riera
25dda0c78c
[PM-29528]Remove @ts-strict-ignore in autofill.service.ts (#19032)
* [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>
2026-03-11 10:36:38 -04:00
Daniel Riera
cd2b708982
[PM-29526]Remove ts strict ignore in settings autofill component (#19012)
* remove ts strict

* explicit null check on handleAdvanceMatch

* handle null appropriately in uriMatchOptions

* add explicit null checks

* clean up code

* Update autofill.component.ts
2026-03-11 10:21:32 -04:00
Andreas Coroiu
35d25b7f8e
[PM-24047] Make popout windows respect vault timeout when unfocused (#19019)
* 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>
2026-03-11 14:10:32 +01:00
Daniel Riera
628d155498
[PM-29521]Remove ts strict ignore in fido 2 background (#19473)
* [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>
2026-03-11 08:10:11 -04:00
bmbitwarden
8108a09701
PM-31202 implmeneted password modal menu (#18829)
* PM-31202 implmeneted password modal menu

* PM-31202 resolved lint issues

* PM-31202 included password generator inside navigation container for browser

* PM-31202 resolved lint issue

* PM-31202 resolved pr comments

---------

Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
2026-03-10 19:26:49 -04:00
Daniel Riera
a1c0c6fac3
[PM-29529]Remove @ts-strict-ignore in background-notification.background.ts (#18850)
* [PM-29529]Remove @ts-strict-ignore in background-notification.background.ts

* address feedback

* explicit check in container to match notification bg
2026-03-10 14:43:48 -05:00
Thomas Avery
c842f76539
[PM-27297] Remove ConsolidatedSessionTimeoutComponent feature flag (#18616)
* Remove flag

* Remove legacy components

* Update unit tests

* update messages json
2026-03-10 13:09:35 -05:00
Brad
11a5c662de
[PM-29841] Account Security page: fix flickering form values (#19272)
* add loading state until form values are provided
2026-03-10 09:05:32 -07:00
Jeffrey Holland
aefbbd4705
Add debouncing to setupOverlayOnField (#17860)
* Add debouncing to `setupOverlayOnField`

* add teardown of debounce to deleteCachedAutofillElement calls

---------

Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2026-03-10 11:46:17 -04:00
Will Martin
5e90565a79
[CL-1063] add enforce-readonly-angular-properties ESLint rule (#19201)
* Add enforce-readonly-angular-properties ESLint rule
2026-03-09 10:26:42 -07:00
Ben Brooks
c3c067865e
[pm-32250] fix: default to "No Folder" in cipher save prompt (#19342)
* [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>
2026-03-09 09:58:34 -07:00
bw-ghapp[bot]
c5e8f7fb44
Autosync the updated translations (#19443)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2026-03-09 02:20:30 -05:00