A small screen shows a list of drafts and a confirmation button. After tapping it, the app should apply the changes to local storage and then reflect the new final result in the UI.
DraftStore works as an in-memory data source and must be updated only on Dispatchers.IO.DraftViewModel publishes state through StateFlow and must preserve the last result after the screen is recreated.Apply button.Expected: the list is empty, the counter is 3, the state survives recreation.
Actual: the UI may show the old list or an unstable counter after the background work completes.
Use line comments to explain the problem, its impact, the fix and how to test it.