Simplify MR error state calculation
Problem to solve
The frontend receives a bunch of input parameters about the MR state instead of the end result after all parameters are combined. This requires the frontend to have complex business logic to determines an MR's error state based on all parameters received.
Proposal
We can do two things to make this easier:
- Move this to the backend
- We should have all business logic in the backend.
- Having a complex branching logic around this isn't ideal, but it helps isolate the technical debt and shift the load off frontend.
- Simplify the calculation of the error state (maybe have an enum for it or even a state machine if that makes sense)
Edited by Thao Yeager