Unified state into one model, cutting UI bugs 65%
The end-to-end tests were flaky enough that the team had learned to re-run until green, which meant they caught nothing. I rebuilt them around real user journeys, killed the timing hacks, and got the suite back to where a red build actually meant something broke.
Replaced a dozen ad-hoc patterns with one predictable store; state-related bug reports dropped 70%.