A small notes screen shows a list and allows opening item editing in a bottom panel. After a recent PR, the behavior became unstable: sometimes the editor shows the wrong text, and confirming changes may run more than once for a single opening.
NotesScreen displays a list of notes from the ViewModel.Edit on an item opens a bottom panel with a TextField filled with the current title of the selected note.Save must invoke saving of the current text for the selected note exactly once.Edit on note n1.Draft for n1.Shuffle titles.TextField contents.Save, close the panel, open Edit for another note, and press Save again.TextField stays exactly as entered by the user, even if the list was updated externally.Save results in exactly one save.ComponentActivity, single process, no navigation between screenscollectAsStateWithLifecycle()MainActivity in a debug build for reproductionUse line comments to explain the problem, its impact, the fix and how to test it.