Skip to content

Conversation

@willmartian
Copy link

@willmartian willmartian commented Jul 22, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/CL-875

📔 Objective

Adds an ADR that describes our preference for signals over RxJS in Angular components.

⏰ 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

@github-actions github-actions bot added the adr label Jul 22, 2025
@cloudflare-workers-and-pages
Copy link

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

Deploying contributing-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: b796954
Status:🚫  Build failed.

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2025

Logo
Checkmarx One – Scan Summary & Details3d361284-1b7c-4549-8e2d-281d729d3422

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

@willmartian willmartian changed the title 0027 - Adopt Angular Signals for Component State 0028- Adopt Angular Signals for Component State Nov 24, 2025
@willmartian willmartian requested a review from Hinton November 24, 2025 18:54
@willmartian willmartian marked this pull request as ready for review November 24, 2025 18:59
@willmartian willmartian requested a review from a team as a code owner November 24, 2025 18:59
@willmartian willmartian changed the title 0028- Adopt Angular Signals for Component State [CL-875] 0028 - Adopt Angular Signals for Component State Nov 24, 2025
@claude
Copy link

claude bot commented Nov 24, 2025

Claude finished @willmartian's task in 1m 55s —— View job


Code Review Complete

  • Starting review of ADR 0029 - Angular Signals
  • Analyzing documentation quality and technical accuracy
  • Posting inline comments and summary

Review agent has completed analysis and posted findings to the PR.

Services tightly coupled to Angular should use signals. Services with business logic should prefer
RxJS for portability. Use `toSignal()` and `toObservable()` to bridge between the two when needed.

Existing code will be migrated gradually. New code must use signal-based APIs.
Copy link

Choose a reason for hiding this comment

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

💭 Consider adding guidance on the migration strategy. Should this happen incrementally per feature area? Are there any teams or components that should be prioritized? ADR 0027 had a detailed "Implementation Plan" section which was helpful.

Copy link
Contributor

@theMickster theMickster Nov 25, 2025

Choose a reason for hiding this comment

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

🎨 I agree that this ADR needs an Implementation Plan section. I do not think that it needs to be overwhelming and could even point to some of the specific sections in the Angular Migrations Wiki

Copy link
Member

Choose a reason for hiding this comment

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

My suggested approach would be for all teams to run the signal related migrations for all code they own, ideally feature by feature. But if we define a plan we also need to put weight behind it, we have plenty of existing ADRs with implementation plans that are pending.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, yes, the primary intent of a plan in an ADR is the steps by which each team will go through to accomplish the goal. We cannot set the timing of when the plan is done, but it does help to influence the timing when we can approach stakeholders showing a prescriptive plan on how to do the work.

@withinfocus
Copy link
Contributor

I like the Claude feedback as of this writing so let's continue improving that. There's also https://contributing.bitwarden.com/contributing/code-style/web/angular/#reactivity-adr-0003--adr-0028 which can get a formal link.


As such, Signals should be the default when operating _in the view layer_: components, directives,
pipes, and services that are tightly coupled to the UI/Angular. Services that primarily deal with
business logic should prefer RxJS to maximize portability (or, even better, be moved to the Rust
Copy link
Contributor

@theMickster theMickster Nov 25, 2025

Choose a reason for hiding this comment

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

🎨 I am good with the comment that suggests the usage of the Rust SDK.
That being said, I think it is important that an ADR be written to clearly describe that process. I do not currently see one published to our ADR Wiki.

I think it important for a few reasons:
A.) The codifying of the decision and migration plan to the Rust SDK aligns perfectly with our ADR mission statement
B.) Crafting it leaves behind a clear trail for teammates new and old to follow; minimized tribal knowledge around the migration
C.) Claude Code (or other agents) will hopefully be able to leverage the ADR to make suggestions to teammates working in the clients repo to move said business logic to the Rust SDK.

💭@Hinton, @withinfocus, @MGibson1?

Services tightly coupled to Angular should use signals. Services with business logic should prefer
RxJS for portability. Use `toSignal()` and `toObservable()` to bridge between the two when needed.

Existing code will be migrated gradually. New code must use signal-based APIs.
Copy link
Member

Choose a reason for hiding this comment

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

My suggested approach would be for all teams to run the signal related migrations for all code they own, ideally feature by feature. But if we define a plan we also need to put weight behind it, we have plenty of existing ADRs with implementation plans that are pending.

@Hinton
Copy link
Member

Hinton commented Nov 25, 2025

Can we add a admonitions to https://contributing.bitwarden.com/architecture/adr/observable-data-services linking to this ADR? I think it slightly supersedes the existing one.

@withinfocus
Copy link
Contributor

ADR 28 has just been taken by the way: https://contributing.bitwarden.com/architecture/adr/adopt-fusion-cache

@willmartian willmartian requested a review from a team as a code owner December 15, 2025 18:55
Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

Lint.

@willmartian willmartian changed the title [CL-875] 0028 - Adopt Angular Signals for Component State [CL-875] ADR 0029 - Adopt Angular Signals for Component State Dec 15, 2025
withinfocus
withinfocus previously approved these changes Dec 15, 2025
Hinton
Hinton previously approved these changes Dec 16, 2025
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

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

nits

@willmartian willmartian dismissed stale reviews from Hinton and withinfocus via b796954 December 17, 2025 03:39
@willmartian willmartian requested a review from a team as a code owner December 17, 2025 03:39
@withinfocus
Copy link
Contributor

Broken links looks like though:

Error: Docusaurus found broken links!

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.

5 participants