Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate the tray app with RPC #19

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

deansheather
Copy link
Member

  • Modularizes the tray window to use multiple Pages for the three different states: signed out, disconnected from RPC, normal
  • Adds the two new aforementioned pages
  • Adds a CredentialManager service for storing credentials in Windows Credential Manager
  • Adds a RpcController service for managing the connection to the backend service and reporting state changes to the ViewModel
  • Switches to using separate ViewModels in the Views
  • Switches to using Dependency Injection for instantiating Views, ViewModels and Services
  • Integrates the tray window into the new RpcController on Start/Stop interactions. Workspace agent updates will be handled in a separate PR

Relates to #5 (I will do agent updates immediately after this)

- Modularizes the tray window to use multiple Pages for the three
  different states: signed out, disconnected from RPC, normal
- Adds the two new aforementioned pages
- Adds a CredentialManager service for storing credentials in Windows
  Credential Manager
- Adds a RpcController service for managing the connection to the
  backend service and reporting state changes to the ViewModel
- Switches to using separate ViewModels in the Views
- Switches to using Dependency Injection for instantiating Views,
  ViewModels and Services
- Integrates the tray window into the new RpcController on Start/Stop
  interactions. Workspace agent updates will be handled in a separate PR
services.AddSingleton<ICredentialManager, CredentialManager>();
services.AddSingleton<IRpcController, RpcController>();

services.AddTransient<TrayWindowDisconnectedViewModel>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we want the view models to be singletons as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we need to. They use other singletons as a source of truth for their data so there isn't really a point to making an interface for them.

Writing an interface for a ViewModel is also a pain AFAIK because of all of the observable property stuff that would need to be added to the interface for each property.

@deansheather deansheather merged commit 88a4a97 into main Feb 7, 2025
3 checks passed
@deansheather deansheather deleted the dean/integrate-tray branch February 7, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants