feat: add main mail bridge lifecycle process - #1502
AlexisMora wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| if (status.status === 'stopped') setMailBridgeViewModel(MailBridgeModule.createInitialViewModel()); | ||
| if (status.status === 'starting') setMailBridgeViewModel({ status: 'starting', error: null }); | ||
| if (status.status === 'error') setMailBridgeViewModel({ status: 'error', error: status.error }); |
There was a problem hiding this comment.
nit: You can extract this to a separated function, using a switch and checking the status. Then, you can use it below, in onStatusChanged, as it is the same.
What is Changed / Added
In this pull request I introduce mail bridge ipc handlers for status, activation, and shutdown, and exposes it through electron preload. It also adds the mail bridge section and connects the core mail bridge views to real lifecycle states, including startup failures and the Mail-account-required state
Why
This change connects settings view to that lifecycle through a small ipc surface, allowing users to activate and manage the local bridge