Skip to content

Conversation

Banrion
Copy link

@Banrion Banrion commented Jul 9, 2025

📔 Objective

This pull request adds ADR 0028 - Adopt @ngrx/signals for Component State Stores to expose the ADR to a greater audience and receive feedback.

Note: This pull request also adds a placeholder file for the 0027 ADR to Adopt Angular Signals for component state that this ADR builds upon.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@Banrion Banrion requested a review from a team as a code owner July 9, 2025 20:26
@github-actions github-actions bot added the adr label Jul 9, 2025
Copy link

cloudflare-workers-and-pages bot commented Jul 9, 2025

Deploying contributing-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 58effff
Status:🚫  Build failed.

View logs

Copy link

github-actions bot commented Jul 9, 2025

Logo
Checkmarx One – Scan Summary & Details17b29f96-f4c9-46d6-aa58-e75abc656f1f

Great job! No new security vulnerabilities introduced in this pull request

@Banrion Banrion requested a review from a team as a code owner July 10, 2025 15:38
@willmartian willmartian self-requested a review July 10, 2025 15:39
custom-words.txt Outdated
# Forbidden words
!auto-fill
!auto-filled
Rickabaugh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Did lint need this? Your only usage is in a link which wasn't checked I thought.

We keep this alphabetically sorted by the way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, it's specifically the cspell check that causes the failure. Thanks for catching that it wasn't sorted!

@@ -0,0 +1,10 @@
---
adr: "0027"
status: "Draft"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status: "Draft"
status: "Proposed"

Comment on lines 8 to 10
# 0026 - Adopt Angular Signals for Component State

Placeholder for documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ What's happening with this whole file? Not understanding. You can have one proposed ADR as 27 most likely.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a placeholder for the 0027 - Angular signals ADR. Now that there is an active pull request, #638, I can remove the file

tags: [client]
---

# 0028 - Adopt `@ngrx/signals` for Component State Stores
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 Can your code reference be simplified somehow? Maybe just say "Angular Signals"? A lot of title usages can't render the preformatted text, but you can use the code in paragraphs.


## Prior Reading

- [ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ This document should be retired in favor of the ADR, and therefore won't be linkable.

## Context and Problem Statement

Building on
[ADR Draft - Adopt Angular Signals for Component State](https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1538326529)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ These are also not available to the community, so content should all be here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've updated the links now that the Draft ADR references is in a pull request.


## Decision Outcome

**Adopt @ngrx/signals for state management on the component level**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Adopt @ngrx/signals for state management on the component level**
Chosen option: **Adopt @ngrx/signals for state management on the component level.**

Comment on lines 97 to 98
**Security considerations:** Do not store decrypted sensitive data in signal stores; use for UI
state, metadata, and non-sensitive application data only
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not storing decrypted data. What would we be using it for? Purely concerns like "is drawer open"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! We should still store the encrypted data in the stores. There are a few methods we can use to expose the decrypted data while it's in flight. When we start the migrations, we should and plan to explore the different methods to determine which best suites our security policies. This statement is to cover the overall idea that encrypted data is encrypted at rest. The main two methods to explore are using signal store computed signals, could be considered in flight but these are still exposed from the store, or expose a feature to signal stores that provides the functions to encrypt and decrypt within the component itself. The main difference is where we want the responsibility of encrypting and decrypting to lie architecturally.

Copy link

claude bot commented Oct 6, 2025

Claude finished @Banrion's task —— View job


PR Review: ADR 0028 - Adopt @ngrx/signals for Component State Stores

I've completed my review of this ADR documentation. Here are my findings and recommendations:

Overall Assessment

This is a well-structured ADR that follows the established repository patterns and provides clear technical reasoning for adopting @ngrx/signals. The document effectively builds upon ADR 0027 and presents a compelling case for standardized component state management.

Detailed Review Feedback

Strengths

  1. Strong Technical Foundation: The ADR clearly articulates the problem and builds logically on ADR 0027
  2. Well-Structured Content: Follows the established ADR format with appropriate sections
  3. Comprehensive Analysis: Covers positive/negative consequences and mitigation strategies
  4. Practical Guidelines: Provides specific guidance on when to use signal stores and security considerations
  5. Good References: Includes relevant external resources and proof-of-concept links

⚠️ Issues to Address

High Priority

  1. File Naming Convention (docs/architecture/adr/0028-ngrx-signals.md:1)

    • Issue: Filename doesn't follow the established convention (####-title.md)
    • Current: 0028-ngrx-signals.md
    • Expected: 0028-adopt-ngrx-signals-for-component-state-stores.md
    • Impact: Inconsistent with repository naming standards seen in other ADRs
  2. Broken Internal Reference (docs/architecture/adr/0028-ngrx-signals.md:14)

    • Issue: Reference to ./0027-angular-signals.md - this file doesn't exist in the codebase
    • Current: [ADR 0027 - Adopt Angular Signals for Component State](./0027-angular-signals.md)
    • Impact: Dead link that will break navigation and user experience
  3. External Link Dependency (docs/architecture/adr/0028-ngrx-signals.md:106-109)

    • Issue: Links to external Google resources that may become inaccessible to community users
    • Concern: Goes against repository guidelines for content accessibility
    • Recommendation: Either embed key content or provide alternative public resources

Medium Priority

  1. Title Formatting (docs/architecture/adr/0028-ngrx-signals.md:8)

    • Issue: Uses backticks in title which may not render properly in all contexts
    • Current: # 0028 - Adopt \@ngrx/signals` for Component State Stores`
    • Recommendation: Consider simplifying to # 0028 - Adopt @ngrx/signals for Component State Stores
  2. Word Ordering in Custom Dictionary (custom-words.txt:45)

    • Issue: "NGRX" should be alphabetically ordered before "OIDCS"
    • Impact: Violates repository's alphabetical sorting requirement

Low Priority - Style & Clarity

  1. Grammar Issues:

    • Line 36: "that complements" should be "that complement"
    • Line 64: "Builds existing signal adoption" should be "Builds on existing signal adoption"
  2. Repetitive Language (docs/architecture/adr/0028-ngrx-signals.md:61-62):

    • "Captures repeating patterns (huge bonus)" - the parenthetical adds unnecessary informality

🎨 Suggestions for Improvement

  1. Enhanced Security Section: Consider expanding the security guidelines with specific examples of what constitutes "sensitive data" in Bitwarden's context

  2. Implementation Timeline: The "Plan" section could benefit from more specific timelines or milestones

  3. Migration Strategy: More detailed guidance on migrating existing component state would be valuable

What's Working Well

  • Proper frontmatter structure with all required fields
  • Appropriate use of AdrTable component
  • Clear problem statement and context
  • Balanced consideration of alternatives
  • Practical guidelines section
  • Good use of repository conventions for most formatting

Recommendation

CHANGES REQUESTED - The broken internal link and external dependencies need to be resolved before merge. The filename convention should also be addressed for consistency.

Priority Actions:

  1. Fix the broken reference to ADR 0027
  2. Address external link accessibility concerns
  3. Correct filename to follow naming convention
  4. Fix alphabetical ordering in custom-words.txt

Once these issues are addressed, this will be a solid addition to the architecture documentation that provides clear guidance for the development team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants