From da0f44b09ea3108da06e19c2042dd5758b044151 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Wed, 9 Jul 2025 15:22:17 -0500
Subject: [PATCH 01/10] Added placeholder for angular signals adr. Added ADR
0028 Adopt ngrx signals for component state stores
---
...opt-angular-signals-for-component-state.md | 10 ++
...ngrx-signals-for-component-state-stores.md | 94 +++++++++++++++++++
2 files changed, 104 insertions(+)
create mode 100644 docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
create mode 100644 docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
diff --git a/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md b/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
new file mode 100644
index 000000000..85e40f443
--- /dev/null
+++ b/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
@@ -0,0 +1,10 @@
+---
+adr: "0027"
+status: "Draft"
+date:
+tags: [client]
+---
+
+# 0026 - Adopt Angular Signals for Component State
+
+Placeholder for documentation
\ No newline at end of file
diff --git a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
new file mode 100644
index 000000000..f15434a03
--- /dev/null
+++ b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
@@ -0,0 +1,94 @@
+---
+adr: "0026"
+status: "Proposed"
+date: 2025-05-30
+tags: [client]
+---
+
+# 0026 - Adopt `@ngrx/signals` for Component State Stores
+
+
+
+## Prior Reading
+
+- [ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
+- [Angular Signals](https://angular.dev/guide/signals)
+- [NgRx Docs](https://ngrx.io/guide/signals)
+
+
+## Context and Problem Statement
+
+Building on [ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529) decision to adopt Angular signals for component state, this ADR addresses state management patterns across our application on the component level.
+
+The DIRT team frequently interacts with multiple services on the domain layer and exposes this data to various components. Current implementation shows duplicate patterns for managing service data, transforming it for UI consumption, and sharing it between components.
+
+### Problem
+
+We need a standardized approach to manage cross-component state that leverages Angular signals while reducing code duplication and improving developer experience.
+
+### Context
+
+@ngrx/signals provides a signal store that captures these repeating patterns and centralizes state management in a way that complements our existing signal adoption
+
+## Considered Options
+
+- **Continue with Angular Signals only**
+ - Maintain current approach using signals within individual components
+ - Does not provide the state management features and cross-component patterns that @ngrx/signals offers through the signal store
+- **Alternative state management solutions**
+ - Explore other state management libraries
+ - Existing options like the original NgRx store involve significant boilerplate, don’t leverage signals, and lack team support
+- **Adopt @ngrx/signals package**
+ - Implement the signal store to capture repeating patterns and manage state across components
+ - Builds upon our existing signal adoption
+
+## Decision Outcome
+
+**Adopt @ngrx/signals for state management on the component level**
+
+The benefits significantly outweigh the costs of learning curve and dependency addition. The potential negatives can be addressed through phased implementation and clear documentation.
+
+### Positive Consequences
+
+- Improved developer experience
+- Captures repeating patterns (huge bonus)
+- Creates single source of truth from services to UI layer
+- Builds existing signal adoption
+
+### Negative Consequences
+
+- Learning curve (though minimal compared to other state management solutions like NgRx store)
+- Potential confusion if different state management patterns emerge or exist in the code-base
+- May require refactoring existing service-level shared data patterns
+- Need to establish organization-level guidance/examples (not just team-level)
+- Introduces another dependency
+- Limited debugging tools
+
+### Plan
+
+**Learning curve mitigation:** Presentation on the @ngrx/signals package for detailed tutorial/documentation (refinement if needed)
+
+**Pattern standardization:** Establish guidelines for when to use different state management approaches and document existing state management patterns
+
+**Phased implementation:** Start with DIRT proof of concept, then expand to organization level with clear folder structure and guidelines
+
+**Refactoring support:** Use current proof of concept as a template for migration patterns
+
+**Limited debugging:** Current NgRx DevTools don’t fully support signal stores; Expose manual debugging through a feature until NgRx team releases updated tooling
+
+## Guidelines
+
+**When to use a signal store:** Cross-component state management, service data aggregation, repeating UI patterns
+
+**Security considerations:** Do not store decrypted sensitive data in signal stores; use for UI state, metadata, and non-sensitive application data only
+
+**Data types:** Suitable for display preferences, loading state, filtered/sorted lists, navigation state - not for decrypted vault data
+
+**Team coordination:** Coordinate with security experts for any questions about data classification
+
+## Further reading
+
+- [NgRx Signal Store POC by Banrion](https://github.com/bitwarden/clients/pull/15186)
+- [The new NGRX Signal Store for Angular: 3+n Flavors - ANGULARarchitects](https://www.angulararchitects.io/en/blog/the-new-ngrx-signal-store-for-angular-2-1-flavors/)
+- [Rethinking Reactivity w/ Alex Rickabaugh | Dec '23 | AngularNation.net](https://www.youtube.com/watch?v=_yMrnSa2cTI)
+- [NgRx Signals Introduction Slides](https://docs.google.com/presentation/d/1vHVLlSmc51emZS6t_9MwEoH7FBp-yVovMgNPSOqaP_k/edit?usp=drive_link)
\ No newline at end of file
From e7e876ff92917851f3e3fb7d429ff016c12da6c8 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Wed, 9 Jul 2025 15:23:14 -0500
Subject: [PATCH 02/10] Update adr number and date
---
.../0028-adopt-ngrx-signals-for-component-state-stores.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
index f15434a03..7b7566de4 100644
--- a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
+++ b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
@@ -1,11 +1,11 @@
---
-adr: "0026"
+adr: "0028"
status: "Proposed"
-date: 2025-05-30
+date: 2025-07-08
tags: [client]
---
-# 0026 - Adopt `@ngrx/signals` for Component State Stores
+# 0028 - Adopt `@ngrx/signals` for Component State Stores
From fe6f2b2d30595e5a30665a9d4bb0752dcf06aa9d Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Wed, 9 Jul 2025 15:27:39 -0500
Subject: [PATCH 03/10] Update link title
---
.../adr/0028-adopt-ngrx-signals-for-component-state-stores.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
index 7b7566de4..b6fdc0a2c 100644
--- a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
+++ b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
@@ -88,7 +88,7 @@ The benefits significantly outweigh the costs of learning curve and dependency a
## Further reading
-- [NgRx Signal Store POC by Banrion](https://github.com/bitwarden/clients/pull/15186)
+- [NgRx Signal Store POC](https://github.com/bitwarden/clients/pull/15186)
- [The new NGRX Signal Store for Angular: 3+n Flavors - ANGULARarchitects](https://www.angulararchitects.io/en/blog/the-new-ngrx-signal-store-for-angular-2-1-flavors/)
- [Rethinking Reactivity w/ Alex Rickabaugh | Dec '23 | AngularNation.net](https://www.youtube.com/watch?v=_yMrnSa2cTI)
- [NgRx Signals Introduction Slides](https://docs.google.com/presentation/d/1vHVLlSmc51emZS6t_9MwEoH7FBp-yVovMgNPSOqaP_k/edit?usp=drive_link)
\ No newline at end of file
From e24abd26b80be38e8e500781354cee7d4fe49ea9 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Thu, 10 Jul 2025 09:48:53 -0500
Subject: [PATCH 04/10] Fix linting
---
...opt-angular-signals-for-component-state.md | 4 +-
...ngrx-signals-for-component-state-stores.md | 48 ++++++++++++-------
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md b/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
index 85e40f443..4794a2979 100644
--- a/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
+++ b/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
@@ -1,10 +1,10 @@
---
adr: "0027"
status: "Draft"
-date:
+date:
tags: [client]
---
# 0026 - Adopt Angular Signals for Component State
-Placeholder for documentation
\ No newline at end of file
+Placeholder for documentation
diff --git a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
index b6fdc0a2c..bfb63ffc2 100644
--- a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
+++ b/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
@@ -15,29 +15,37 @@ tags: [client]
- [Angular Signals](https://angular.dev/guide/signals)
- [NgRx Docs](https://ngrx.io/guide/signals)
-
## Context and Problem Statement
-Building on [ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529) decision to adopt Angular signals for component state, this ADR addresses state management patterns across our application on the component level.
+Building on
+[ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
+decision to adopt Angular signals for component state, this ADR addresses state management patterns
+across our application on the component level.
-The DIRT team frequently interacts with multiple services on the domain layer and exposes this data to various components. Current implementation shows duplicate patterns for managing service data, transforming it for UI consumption, and sharing it between components.
+The DIRT team frequently interacts with multiple services on the domain layer and exposes this data
+to various components. Current implementation shows duplicate patterns for managing service data,
+transforming it for UI consumption, and sharing it between components.
### Problem
-We need a standardized approach to manage cross-component state that leverages Angular signals while reducing code duplication and improving developer experience.
+We need a standardized approach to manage cross-component state that leverages Angular signals while
+reducing code duplication and improving developer experience.
### Context
-@ngrx/signals provides a signal store that captures these repeating patterns and centralizes state management in a way that complements our existing signal adoption
+@ngrx/signals provides a signal store that captures these repeating patterns and centralizes state
+management in a way that complements our existing signal adoption
## Considered Options
- **Continue with Angular Signals only**
- Maintain current approach using signals within individual components
- - Does not provide the state management features and cross-component patterns that @ngrx/signals offers through the signal store
+ - Does not provide the state management features and cross-component patterns that @ngrx/signals
+ offers through the signal store
- **Alternative state management solutions**
- Explore other state management libraries
- - Existing options like the original NgRx store involve significant boilerplate, don’t leverage signals, and lack team support
+ - Existing options like the original NgRx store involve significant boilerplate, don’t leverage
+ signals, and lack team support
- **Adopt @ngrx/signals package**
- Implement the signal store to capture repeating patterns and manage state across components
- Builds upon our existing signal adoption
@@ -46,7 +54,8 @@ We need a standardized approach to manage cross-component state that leverages A
**Adopt @ngrx/signals for state management on the component level**
-The benefits significantly outweigh the costs of learning curve and dependency addition. The potential negatives can be addressed through phased implementation and clear documentation.
+The benefits significantly outweigh the costs of learning curve and dependency addition. The
+potential negatives can be addressed through phased implementation and clear documentation.
### Positive Consequences
@@ -66,23 +75,30 @@ The benefits significantly outweigh the costs of learning curve and dependency a
### Plan
-**Learning curve mitigation:** Presentation on the @ngrx/signals package for detailed tutorial/documentation (refinement if needed)
+**Learning curve mitigation:** Presentation on the @ngrx/signals package for detailed
+tutorial/documentation (refinement if needed)
-**Pattern standardization:** Establish guidelines for when to use different state management approaches and document existing state management patterns
+**Pattern standardization:** Establish guidelines for when to use different state management
+approaches and document existing state management patterns
-**Phased implementation:** Start with DIRT proof of concept, then expand to organization level with clear folder structure and guidelines
+**Phased implementation:** Start with DIRT proof of concept, then expand to organization level with
+clear folder structure and guidelines
**Refactoring support:** Use current proof of concept as a template for migration patterns
-**Limited debugging:** Current NgRx DevTools don’t fully support signal stores; Expose manual debugging through a feature until NgRx team releases updated tooling
+**Limited debugging:** Current NgRx DevTools don’t fully support signal stores; Expose manual
+debugging through a feature until NgRx team releases updated tooling
## Guidelines
-**When to use a signal store:** Cross-component state management, service data aggregation, repeating UI patterns
+**When to use a signal store:** Cross-component state management, service data aggregation,
+repeating UI patterns
-**Security considerations:** Do not store decrypted sensitive data in signal stores; use for UI state, metadata, and non-sensitive application data only
+**Security considerations:** Do not store decrypted sensitive data in signal stores; use for UI
+state, metadata, and non-sensitive application data only
-**Data types:** Suitable for display preferences, loading state, filtered/sorted lists, navigation state - not for decrypted vault data
+**Data types:** Suitable for display preferences, loading state, filtered/sorted lists, navigation
+state - not for decrypted vault data
**Team coordination:** Coordinate with security experts for any questions about data classification
@@ -91,4 +107,4 @@ The benefits significantly outweigh the costs of learning curve and dependency a
- [NgRx Signal Store POC](https://github.com/bitwarden/clients/pull/15186)
- [The new NGRX Signal Store for Angular: 3+n Flavors - ANGULARarchitects](https://www.angulararchitects.io/en/blog/the-new-ngrx-signal-store-for-angular-2-1-flavors/)
- [Rethinking Reactivity w/ Alex Rickabaugh | Dec '23 | AngularNation.net](https://www.youtube.com/watch?v=_yMrnSa2cTI)
-- [NgRx Signals Introduction Slides](https://docs.google.com/presentation/d/1vHVLlSmc51emZS6t_9MwEoH7FBp-yVovMgNPSOqaP_k/edit?usp=drive_link)
\ No newline at end of file
+- [NgRx Signals Introduction Slides](https://docs.google.com/presentation/d/1vHVLlSmc51emZS6t_9MwEoH7FBp-yVovMgNPSOqaP_k/edit?usp=drive_link)
From 1f4753dee7542726301e3429a99276c0b4ab75c8 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Thu, 10 Jul 2025 10:38:23 -0500
Subject: [PATCH 05/10] Add custom word
---
custom-words.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/custom-words.txt b/custom-words.txt
index f74477dff..e858158be 100644
--- a/custom-words.txt
+++ b/custom-words.txt
@@ -1,7 +1,6 @@
# Custom dictionary for spellchecking. Before adding a word here, consider whether you can put
# it in a single (`) or multiline (```) code snippet instead, as they are automatically ignored
# by the spellchecker. Please keep the list sorted alphabetically.
-
AndroidX
AOSP
Bitwarden
@@ -94,3 +93,4 @@ YubiKeys
# Forbidden words
!auto-fill
!auto-filled
+Rickabaugh
From ce35d0c5e9143466748fea1e49ba155069370ea1 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Tue, 22 Jul 2025 08:35:46 -0500
Subject: [PATCH 06/10] Sort added custom word
---
custom-words.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/custom-words.txt b/custom-words.txt
index e858158be..c10d47238 100644
--- a/custom-words.txt
+++ b/custom-words.txt
@@ -58,6 +58,7 @@ precompiler
proxied
recompositions
refactorings
+Rickabaugh
roadmap
roadmaps
rustup
@@ -92,5 +93,4 @@ YubiKeys
# Forbidden words
!auto-fill
-!auto-filled
-Rickabaugh
+!auto-filled
\ No newline at end of file
From 8bb9e0fd49a575b4af7076d4f5d18cc9f16fc103 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Tue, 22 Jul 2025 08:51:47 -0500
Subject: [PATCH 07/10] Remove placeholder adr now that a pull request has been
created
---
.../0027-adopt-angular-signals-for-component-state.md | 10 ----------
1 file changed, 10 deletions(-)
delete mode 100644 docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
diff --git a/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md b/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
deleted file mode 100644
index 4794a2979..000000000
--- a/docs/architecture/adr/0027-adopt-angular-signals-for-component-state.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-adr: "0027"
-status: "Draft"
-date:
-tags: [client]
----
-
-# 0026 - Adopt Angular Signals for Component State
-
-Placeholder for documentation
From 25e7090148264b7acb1d638b2a939419a8b5a3b9 Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Tue, 22 Jul 2025 09:05:21 -0500
Subject: [PATCH 08/10] Rename file
---
...signals-for-component-state-stores.md => 0028-ngrx-signals.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename docs/architecture/adr/{0028-adopt-ngrx-signals-for-component-state-stores.md => 0028-ngrx-signals.md} (100%)
diff --git a/docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md b/docs/architecture/adr/0028-ngrx-signals.md
similarity index 100%
rename from docs/architecture/adr/0028-adopt-ngrx-signals-for-component-state-stores.md
rename to docs/architecture/adr/0028-ngrx-signals.md
From fb8c3fe3c6333ed88d82a595cdc72c0a280f353a Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Tue, 22 Jul 2025 09:09:08 -0500
Subject: [PATCH 09/10] Updated links to adr
---
docs/architecture/adr/0028-ngrx-signals.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/architecture/adr/0028-ngrx-signals.md b/docs/architecture/adr/0028-ngrx-signals.md
index bfb63ffc2..f3aaee982 100644
--- a/docs/architecture/adr/0028-ngrx-signals.md
+++ b/docs/architecture/adr/0028-ngrx-signals.md
@@ -11,14 +11,14 @@ tags: [client]
## Prior Reading
-- [ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
+- [ADR 0027 - Adopt Angular Signals for Component State](./0027-angular-signals.md)
- [Angular Signals](https://angular.dev/guide/signals)
- [NgRx Docs](https://ngrx.io/guide/signals)
## Context and Problem Statement
Building on
-[ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
+[ADR 0027 - Adopt Angular Signals for Component State](./0027-angular-signals.md)
decision to adopt Angular signals for component state, this ADR addresses state management patterns
across our application on the component level.
@@ -52,7 +52,7 @@ management in a way that complements our existing signal adoption
## Decision Outcome
-**Adopt @ngrx/signals for state management on the component level**
+Chosen option: **Adopt @ngrx/signals for state management on the component level**
The benefits significantly outweigh the costs of learning curve and dependency addition. The
potential negatives can be addressed through phased implementation and clear documentation.
From 004bce1496002d00cb2e9bc670362f9a50d2b40f Mon Sep 17 00:00:00 2001
From: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
Date: Tue, 22 Jul 2025 09:18:15 -0500
Subject: [PATCH 10/10] Run linter
---
docs/architecture/adr/0028-ngrx-signals.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/docs/architecture/adr/0028-ngrx-signals.md b/docs/architecture/adr/0028-ngrx-signals.md
index f3aaee982..b51d146db 100644
--- a/docs/architecture/adr/0028-ngrx-signals.md
+++ b/docs/architecture/adr/0028-ngrx-signals.md
@@ -17,8 +17,7 @@ tags: [client]
## Context and Problem Statement
-Building on
-[ADR 0027 - Adopt Angular Signals for Component State](./0027-angular-signals.md)
+Building on [ADR 0027 - Adopt Angular Signals for Component State](./0027-angular-signals.md)
decision to adopt Angular signals for component state, this ADR addresses state management patterns
across our application on the component level.